ndl / mod_archive2

mod_archive2 is new ejabberd module implementing server-side instant messaging history support specified in XEP-136.
http://www.ndl.kiev.ua/content/modarchive2
27 stars 5 forks source link

Implement XEP-0313 #1

Closed alsuren closed 10 years ago

alsuren commented 11 years ago

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.

ndl commented 10 years ago

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:

  1. 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.
  2. 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.
  3. 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).
  4. 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.
  5. 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.
  6. Probably smth else I forgot - just ping me if there are more questions.