sinatra-streaming is an example application using redis pub/sub to demonstrate streaming api endpoints
start redis server
redis-server --daemonize yesinstall gems
bundle installuse thin or rainbows
bundle exec thin start -p 9292
# OR rainbows
bundle exec rainbows -p 9292 -c rainbows.confin a terminal window
$ curl -i -N http://localhost:9292/subscribe
HTTP/1.1 200 OK
Date: Sat, 26 Apr 2014 04:40:19 GMT
Status: 200 OK
Content-Type: text/event-stream;charset=utf-8
X-Content-Type-Options: nosniff
Connection: closeanother window
$ curl -dtext="hello world" http://localhost:9292/
HTTP/1.1 204 No Content
Date: Sat, 26 Apr 2014 04:40:22 GMT
Status: 204 No Content
X-Content-Type-Options: nosniff
Connection: keep-alive