Does Ejabberd only support chat functionality or can i extend it to support my whole website hosted on apache server

StackOverflow https://stackoverflow.com/questions/22224556

Question

I am planning to build a social networking website like facebook supporting chat functionality . I want to implement chat functionality through Ejabberd server . Rest of the features are implemented in apache server .

I am not sure whether i need to extend Ejabberd server and port website from apache server to Ejabberd server or find a way to connect apache server to ejabberd server in case of chat request .

If i connect apache server to ejabberd server then should i go with default mnesia database or mysql.

Was it helpful?

Solution

There's no need for Apache to know about ejabberd's database — why should it?

Instead, you code your website as usually and then hook ejabberd up to it to provide the chat functionality using BOSH (for instance, via Strophe.js or something other. "Full-blown" web chat clients exist as well — there are hordes of them (plus just search the web).

There will be the problem of user authentication/registration but you can either have transient users (if you unly need public chats (rooms) or make ejabberd use the same MySQL database the website engine uses — ejabberd can do that. Another solution is to enable external authentication in ejabberd — where it uses a program (written by you) to authenticate its users; such a program is then free to query the same database the website engine uses which solves the problem of imposing a specific schema in the data base. Another bonus is that it's easier to change the database backend when needed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top