开发者

Real time Alternative to polling in ruby on rails (Jruby)

开发者 https://www.devze.com 2023-03-11 12:19 出处:网络
I have a long running operation that I activate by placing a message on a ruby resque queue.The endpoint does the work which might take many minutes.

I have a long running operation that I activate by placing a message on a ruby resque queue. The endpoint does the work which might take many minutes.

I was going to periodicall开发者_如何学Pythony poll the database every few second but I think the world has moved on from polling. Is there a better way using ruby on rails to get the results as a push, perhaps using something like web sockets or comet?

Can anyone suggest anything to start my research?


Websockets is the thing to research, and Pusher is a good way to get started with it.


em-websocket..or websocket-rails

0

精彩评论

暂无评论...
验证码 换一张
取 消