Answer the question
In order to leave comments, you need to log in
How to implement long polling in Ruby [on Rails]?
Hey! We have a chat room on our website. It is implemented via web socket. We used the rails-websocket gem.
Recently connected to CloudFlare site which is known to block sockets for non-enterprise users.
It was decided to change sockets to long polling. After googling it was not possible to find gems for this technology.
Please tell me where to dig?
PS: Puma is worth it (if there are suggestions to change to EventMachine based, throw a link to the server :)
PPS: You can, of course, use NodeJS for these purposes, but I would like to keep everything at the level of one language :)
Answer the question
In order to leave comments, you need to log in
You can pull the chat to another domain / bypass CloudFlare, and leave everything else as it is.
And if you use server side events? You can see the implementation here: https://github.com/Shopify/dashing/blob/master/lib...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question