I intend to implement XEP-0313 on top of mod_archive2. I will probably do it as a fork initially, and not worry about breaking XEP-0136 support in the process.
I will be using this issue to track my progress. If you have any hints, give me a shout.
Sorry for not answering in time, I wasn't working on this project for quite a while.
Not sure if it's still relevant (likely not?), but here are some points, just in case it's useful for anyone:
I'm not sure if mod_archive2 is a good base for XEP-313 implementation, it's quite different protocol after all and most data structures / tables schemes will be different. Some utility functionality might be re-used indeed, but see below.
I'd re-evaluate whether it makes sense to base any new implementations on exmpp library - it doesn't seem to be developed anymore, and considering ejabberd migrated away from it - its future might me uncertain.
Unless you really need mnesia storage support - I'd consider dropping it & basing all implementation on RDBMS only. While current mod_archive2 code base contains uniform & backend-independent storage layer - you still need to revert to direct storage access here & there (most notably for efficient collections expiration).
I strongly recommend against using Erlang terms representation for "goldens" in regression tests (like I did) - it makes any changes & fixes really painful, use textual XML representation instead. It requires more complex comparison routine (as variable parameters, like IDs, need to be excluded), but it's totally worth it.
If you need the implementation to be scalable:
Think about proper RDBMS balancing at early implementation stage.
Make sure binary representation for strings is used everywhere in the code, do not use any list-based representations.
Probably smth else I forgot - just ping me if there are more questions.
I intend to implement XEP-0313 on top of mod_archive2. I will probably do it as a fork initially, and not worry about breaking XEP-0136 support in the process.
I will be using this issue to track my progress. If you have any hints, give me a shout.