extending ejabberd with modules for custom mysql schema?

…衆ロ難τιáo~ 提交于 2019-12-06 07:52:55

EDIT Changing this answer after learning more about the OP's situation.

The use-case you have in mind calls for strong separation between your core business data and the chat service. Chat must be thought of as an external service, not something integral to the overall system (even if it is a "core" service from a user perspective, chat should never be hard-wired into, say, account management).

Use the existing infrastructure as a place where authentication takes place, and set chat up using ejabberd independently and configure it to make external authentication calls to your core service.

If you require persistence or inclusion of your legacy chat data, you can import it to the ejabberd schema (not so great), or leave the legacy chat system in "read only mode" and make all new chat go through ejabberd (better, especially if you take the time to make the interface seamless to users). If you need the legacy data for analytical purposes, then you should export it to an analytics schema and extract (batched, clumsy) or reflect (live, much better) the ejabberd data to the same schema for analysis.

Whatever you do, don't burden the core system with chat duties, and don't burden the chat system with analytical duties. These are things that should be strongly independent, even running on different hardware if your system is either very large or has significant robustness requirements (and your budget fits).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!