Reputation: 1054
Is there any gem for ruby (I want to use it in a rails app) that does something like Twitter Stream API. Keep the http conection open and send information in real time basis, in a query or events.
Upvotes: 0
Views: 1005
Reputation: 1115
Twitter Gem has added streaming functionality. you can check that out
Upvotes: 0
Reputation: 3500
You need:
Then thin is an options you might consider, it has a builtin http parser for the first requirement, and eventmachine for the second.
Have a look at this example (run it with thin --rackup async_tailer.ru start). It is tailing asynchronously the /var/log/syslog through a open http connection. You can adapt this example to send data from other asynchronous sources from which you would like data to come.
Upvotes: 3