Little redis backed auction site. It's an auction. It's awesome. It's an awection!
AuctionEngine (Sinatra) --publish--> Redis <--subscribe-- WebSocket Handler (Node.JS / Socket.io)
AuctionEngine (Sinatra) <--bids (JSON)-- view (Backbone.js) <--top bids (JSON)-- WebSocket Handler (Node.JS / Socket.io)
It's a sinatra app using the asset pack to serve my CoffeeScript files. The view is build with Backbone.js.
I'm using a Redis queue to process bids. When a bid comes in which is currently the highest it's published to a redis channel.
The Websocket handler is a Node.js app using Socket.io for the fallback. The Websocket handler subscribes to the redis top bids channel. When a bid comes in it's broadcasted to the clients.
Make sure you have installed the following dependencies
- Node.js 0.10.5
bundle install foreman start node lib/websocket_handler/app.js