Answer the question
In order to leave comments, you need to log in
What is the best way to use web sockets in RoR?
There is a ready project on RoR. There is a desire to use web sockets for chat and other real-time notifications in it.
What is the best way to integrate?
Before that, I came across EventMachine and made api for ios applications. Now I wondered how it would be more expedient to connect EM and RoR
UPD1:
Should I use Goliath?
Answer the question
In order to leave comments, you need to log in
There is a websocket-rails
gem to link EM and RoR .
Apparently, he is relatively alive (inside him, by the way, faye ). In general, web sockets and RoR work according to fundamentally different schemes of interaction with the client, and I would consider not mixing them together. In order for web sockets to work, you need an asynchronous web server - websocket-rails uses Thin, you can adapt Puma, but Unicorn will no longer work.
Look at https://github.com/kenichi/angelo like a sinatra-DSL on top of Celluloid that just knows websockets and event-source out of the box. The main disadvantage is that you can’t shove it inside the rails (it doesn’t know how to rack), but if you put it next to it, it will come out very nice
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question