Search code examples
xmppejabberdxmppframeworkejabberd-saas

Suggestion or help needed for implementing stateless ejabberd architecture


I want to implement a real-time chat application. Technologies, database and OS used for this purpose:

  • Node.JS
  • Ejabberd as XMPP server
  • MySQL Database
  • React-Native (Front-End)
  • OS - Ubuntu 18.04

By far, I have achieved setting up ejabberd and registering the user and getting status from both the API and command line. For example, I can register a user from any other device/system and from the command line too. But the problem with this is that all the data gets stored in ejabberd database on the Ubuntu server due to which there are data duplication chances also I already have a database structured and defined and already have data in that.

In ejabberd tutorials, there is a part where they have mentioned stateless architecture where the ejabberd server manages XMPP part with our database (I didn't understand a lot about this stateless thing). So I need some help, example or tutorials where there is more understanding about the stateless architecture.

Already gone through below mentioned links -

Not-helpful links -


Solution

  • To configure stateless ejabberd, you need to configure your storage module to store the data using ReST API. Stateless ejabberd was designed for fluux.io service, but you can also implement it yourself using contributions or ejabberd API. For example, for user based, you can rely on ejabberd_auth_http: https://github.com/processone/ejabberd-contrib/tree/master/ejabberd_auth_http