Search code examples
ejabberd

Ejabberd couples application logic with backends


We're building an XMPP application where we have chosen ejabberd as our server. We have done lots of changes on protocol level to match our use case. However, we not satisfied with how ejabberd couples application logic with its mnesia backends. We want to move all mnesia tables except the ones holding sessions to other nodes in order to decouple our system for easy maintainance and debugging and to avoid resource competion with the ejabberd controlling logic. We know that will suffer from latency if that is the case. Our question are, is it a better design with that approach? Are we gonna face more problems with distribution? Or what else? Please give a detail reason for your option.


Solution

  • Actually, module that store data are designed around the concept of backend. They are not tight to Mnesia. You can check the API for each module backends in existing code. You will see that there is usually modules available to store in relational DB, Riak, Redis, etc.

    You can use that exact same API to implement your own custom backends.