开发者

What is the best way to implement subscription to a Redis pub sub in Rails?

The scenario I am working with is that I have a node.js engine which is receiving web-hook and pubsubhubhub queries from various services. It needs to send the incoming data to Rails for processing and storage.

I'm debating whether to use HTTP callbacks for this on the Rails side, or possibly using Redis Pubsub.

The question is: how do you get Rails to subscribe and listen to Redis? In the examples for Juggernaut开发者_如何学Python, they have it implemented as a loop, but if I put a subscribe loop in a library and initialize it on application load, it blocks the loading.


Have you looked at something like this?

https://github.com/technoweenie/coffee-resque

I am not sure if it totally fits your problem domain but it seems to have all the right parts, but maybe not in the right order.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜