Implementing a messenger for rails?

I was looking for some time to learn several technologies to create a simple instant messaging system for the ruby โ€‹โ€‹on rails application. This seems very complicated since I did not find any implementations that are cross browser or any proof of the 1-1 concept in general.

Looked:

  • xmpp clients (there is Candy on github only supports group chat)
  • xmpp and Rails servers (a lot of trouble without good integration)
  • Juggernaut (no 1-1, not supported by Internet Explorer for using web sockets)
  • Private pub by ryan bates (it seems like it can do the trick, but since a ruby โ€‹โ€‹newbie with a little documentation about this can't figure it out)

Can anyone suggest me an instant messenger for rails:

  • this is cross browser
  • has good documentation, implementation example
  • Instant Messenger, where User A is talking to User B and User B is talking to User A

I really have no idea how to implement this, can anyone give me advice, how can this problem be solved? THX

+6
source share
2 answers

As Eric said, he is not. Messages are very complicated.

Now I am using Pubnub , which is an external service. There is not very good documentation on Rails integration, so you just need to try to do it yourself.

On the more well-documented side of Faye , but this is an internal process and requires two instances to run (one to respond to Faye's requests, and one to launch your application). It was a bit harder (and more expensive) to do on Heroku, so I just stuck with Pubnub.

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

edit: if you find Private Pub difficult to integrate. well, rather than being average, but maybe you should try to learn more about Rails and Javascript before delving into this question, as this is not easy (although it seems like it should be)

edit 2: Also for faye this tutorial can help you.

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

+5
source

Work in progress: full facebook clone

https://github.com/rubytastic/im 

Please do your part so that the code is fixed and still stupid!

+1
source

Source: https://habr.com/ru/post/909006/


All Articles