Server-side Push in Rails

前端 未结 5 1188
萌比男神i
萌比男神i 2021-02-10 10:36

I\'d like to implement a scalable chatroom in rails using AJAX. I know from research that the only scalability happens with a server-side push.

My two questions are:

5条回答
  •  忘掉有多难
    2021-02-10 10:49

    I'm attempting to do the same right now. Juggernaut works well, but not for Rails 3, and if that isn't a requirement then I suggest using it, because it is dead easy to make a chat. My project uses Rails 3, and polls the server every 3 seconds(Campfire does 3 as well). I'm using Rails Metal to make the polling super fast. If you want to use Juggernaut, then great, 2 lines of client side js, and 1 or 2 of server side. Otherwise, get to work!

提交回复
热议问题