Server-Sent Events experiment with Goliath
JavaScript Ruby
Switch branches/tags
Nothing to show
Latest commit 93b57e8 Jun 12, 2012 @npj npj now using pure event machine to avoid redis connection limits. there …
…is a single eventmachine channel to which all messages are published.

README.md

Real-Time, Geolocated Chat with Server-Sent Events, EventMachine and Goliath

This is more of a proof-of-concept, or experiment than anything. Chats are pushed to the server along with latitude and longitude obtained using HTML5 Geolocation. The chats are then pushed out to all connected clients via EventMachine::Channel. The client listens for new chats, which arrive as server-sent events, and displays an info window on the map at the specified coordinates, along with the chat message.

To run it locally, just cd to the app directory and type ruby server.rb -sv. Then, point your browser to 0.0.0.0:9000. You'll probably want to use two computers to experiment, or your mobile device.

To see it in production, head to sse-goliath.herokuapp.com

Copyright © 2012 Peter Brindisi