L
L
lavezzi12015-08-26 09:28:12
Ruby on Rails
lavezzi1, 2015-08-26 09:28:12

Websocket\long poling on rails, best practice?

Hello.
With grief in half I write a chat like VK or Facebook for my application. I read the topics on the toaster, googled how this function is implemented in VK. Someone for long polling, someone for websocket, someone generally sends to node.js. I have a server on digitalOcean with nginx. For deployment I use Puma.
In general, I would like to hear the opinion of users. Perhaps for RoR there is some kind of implementation method.
Or what to read on this topic, for a quick start. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dima, 2015-08-26
@MAXOPKA

About 2-3 months ago I wrote a chat using this wonderful gem . The bottom line is that in parallel with the application, the Websocket server starts, hangs on a specific port, and accepts incoming websocket requests.

J
Jeiwan, 2015-08-26
@Jeiwan

Ruby usually uses faye.jcoglan.com and in particular for rails https://github.com/ryanb/private_pub
Both options involve the parallel launch of a separate server (thin), which serves WebSocket requests.
Rails 5 will have https://github.com/rails/actioncable , which is an interface to work with WebSocket.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question