ejabberd server with ruby on rails

We are developing a web application and we want to add chatting facility in our site. We are working on ruby on rails and found the xmpp4r gem that deals to create, update, delete users in ejabberd server and we wanted that user will get logged in into Ejabberd server once it logged in into our website and can send messages to others. I went through xmpp4r documentation but unable to make it yet, how to do that all. Can somebody provide me a documentation for that and an example with ruby on rails? I have already configured ejabberd server.


Usually, this is not how you build a chat system for a website using XMPP.

The most common approach is as follow:

  • Create a Web XMPP client in Javascript.
  • Making sure the user database is shared between your Rails app and ejabberd (or use ReST authentication module from ejabberd to Rails app).
  • If you use Rails to connect to ejabberd as a proxy, you will end up in a hell trying to manage the "reactor" to runs many XMPP clients inside your Rails web application. You are not supposed to run long running "processes" into Rails. It is not designed for that (and you will get memory, scalability and responsiveness issues).

    链接地址: http://www.djcxy.com/p/94154.html

    上一篇: 用先前的流ID连接到xmpp服务器

    下一篇: ejabberd与红宝石轨道上的服务器