instant messenger implementation for rails?

前端 未结 2 902
执笔经年
执笔经年 2021-02-06 07:31

I have searched for some time investigating several technologies to build an simple instant messaging system for a ruby on rails app. It seems very complicated as I haven\'t fou

2条回答
  •  梦毁少年i
    2021-02-06 08:03

    As Eric said, there isn't one. Messaging is a very difficult thing to do.

    Right now I'm using Pubnub, which is an external service. There isn't very good documentation on Rails integration, so you'll just have to try to do it yourself.

    On the better documented side, there's Faye, but this is an internal process and requires two instances to be running (one to respond to Faye requests, and one to run your app). This was a little trickier (and more expensive) to do on Heroku, so I just stuck to Pubnub.

    In terms of Faye documentation, check out this Railscast, and for privacy, check out Private Pub.

    edit: if you think Private Pub is hard to integrate.. well, not to be mean, but perhaps you should try to learn more about Rails and Javascript before you delve into this matter, as it's not an easy thing to do (even though it seems like it should be)

    edit 2: Also, for faye, this tutorial might help you out.

    You might be better off using Node.js for this type of thing.

提交回复
热议问题