Integrating ejabberd in to existing nodejs app using Bosch and Strophe

I'm trying to integrate chat functionality and features in to existing node.js app (Expressjs) that is consumed by the native mobile apps (iOS and Android). One way is to use socket.io and provide chat functionality but ejabberd is obviously with more chat features such as group chat and so on. So, my question is if all the business logic, user registration and authentication is within node.js app, how can I connect or integrate to ejabberd server. The mobile clients will use RESTful APIs to connect to the nodejs app server.

How to connect two servers and how to exchange info? IS it Strophe.js? didn't find a reputable npm library.
Do mobile clients needs to connect to both servers? meaning nodejs for user login, etc. and ejabberd for actual chat conversations?
Any help appreciated it - I'm installing the servers and trying to integrate them...

Thanks!

You likely will use backend

You likely will use backend link between ejabberd and NodeJS, not XMPP directly. You have many options: ejabberd custom module, ejabberd XMLRPC API, Database sharing, for example.

great - thanks. Do you have

great - thanks.
Do you have any recommendations?
I found https://github.com/Wiredcraft/node-ejabberd/ as one of the modules.

Sorry, I am not really in

Sorry, I am not really in Javascript, so no recommandation, but please send us your feedback :)

Thanks - so how would the

Thanks - so how would the backend link between the two servers work? Do you have any recommendations in other tech stacks such as Ruby on Rails or PHP? Is my understanding then correct that when the clients want to send a chat message to the other recipients or create a chatroom, download the rosters, etc. they would use a simple REST call to the app server and then app server will use some sort of line interface to talk to the ejabberd server? for example - mod_rest? mod_muc_admin? Do you have any good working examples for such integrations?

2nd option:
Would it make sense and perhaps easier/scalable if the mobile clients were to directly talk to ejabberd server using XMPP protocol and then send the same message to the app server using RESTful interface? I'm trying to achieve something similar to WhatsApp architecture...any thoughts?

Thanks!

Hi Team, Hope you all are

Hi Team,

Hope you all are doing well,

I have successfully installed Ejabberd (Erlang (ASYNC_THREADS) (BEAM) emulator version 5.10.4) on Ubuntu 14.04.2 LTS.

Our Requirement:
1) Andriod Chat similar to WhatsApp.
2) Database MongoDb (Please Suggest if you know better option)
3) API (Nodejs )

Please suggest how do integrate above functions with Ejabberd.

Note- > initially we are using ejabber on single server but we will live it in multiple servers

Did you implement? I have

Did you implement? I have almost same requirement. I have tried external authentication, and it's working as expected, but I am not sure about my approach is correct or not?
1) Android APP as client
2) Ruby on Rails as API server

Syndicate content