Files
2012-02-21 01:15:00 -05:00

1 line
3.4 KiB
JSON

[{"user_id": 1648, "stars": [], "topic_id": 41094, "date_created": 1309755808.562283, "message": "So if that's important to you, what about having the node.js app just publish into a resque queue?", "group_id": 447, "id": 1557687}, {"user_id": 15887, "stars": [], "topic_id": 41094, "date_created": 1309755359.180692, "message": "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.\n\nI'm debating whether to use HTTP callbacks for this on the Rails side, or possibly using Redis Pubsub.\n\nThe question is: how do you get Rails to subscribe and listen to Redis? In the examples for Juggernaut, 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.\n\nOne way I did get this to work is use the daemons gem and the daemon_generator (https://github.com/dougal/daemon_generator)\n\nThis actually worked (https://gist.github.com/1062924 for the daemon)", "group_id": 447, "id": 1557624}, {"user_id": 1648, "stars": [], "topic_id": 41094, "date_created": 1309755725.8214149, "message": "One thing to keep in mind when doing this is that, if I'm not mistaken, redis pubsub channels have no storage. So if your ruby app goes down for some reason, any messages that the node app posts will just be lost.", "group_id": 447, "id": 1557672}, {"user_id": 15887, "stars": [], "topic_id": 41094, "date_created": 1309757946.2360799, "message": "Do you know of a node client for rescue. I can't seem to find one.", "group_id": 447, "id": 1557848}, {"user_id": 4935, "stars": [], "topic_id": 41094, "date_created": 1309761301.30814, "message": "@ethankap https://github.com/technoweenie/coffee-resque", "group_id": 447, "id": 1558198}, {"user_id": 4935, "stars": [], "topic_id": 41094, "date_created": 1309761329.5392461, "message": "also here's the announcement: http://thechangelog.com/post/1407662872/coffee-resque-coffeescript-node-js-port-of-resque", "group_id": 447, "id": 1558201}, {"user_id": 15887, "stars": [], "topic_id": 41094, "date_created": 1309904119.4458239, "message": "As an update, I ended up doing this by creating a daemon that runs outside of Rails (but includes the Rails libraries). Upon receiving a message it creates a PubSubMessage (which subclasses Activemodel). \n\nSince it subclasses ActiveModel, it notifies anything observing pubsub_message_received (PubsubOserver class).\n\nSo you can have as many observers of the Pubsub queue as you want.\n\nLooking to package this up as a plugin soon since I don't think anyone made a Redis Pubsub client yet :)", "group_id": 447, "id": 1571011}, {"user_id": 2204, "stars": [], "topic_id": 41094, "date_created": 1310676788.484298, "message": "@ethankap wondering if you got around to publishing your redis pubsub client?", "group_id": 447, "id": 1640318}, {"user_id": 15887, "stars": [], "topic_id": 41094, "date_created": 1310678337.7141881, "message": "I have not. I accidentally deleted it and it wasn't git tracked. I'm rewriting parts anyhow. I also got it working inside of Resque so the daemon is maintained through there, which seems like a nice option too.", "group_id": 447, "id": 1640444}, {"user_id": 24402, "stars": [], "topic_id": 41094, "date_created": 1312535958.3048429, "message": "faye?", "group_id": 447, "id": 1800593}]