The real time web is not about adding chat on your website. It's not really about having stock tickers. The most interesting aspect of the realtime web is to be found in augmenting the web that we already know. We can add realtime functionally to our applications as another layer of fidelity.
This is our story (New Bamboo, London, UK) of experimenting various real time web technologies and coming up with our own solutions (http://www.pusherapp.com). This is not about explaining how to use our solutions, but about sharing exciting opportunities and new technical challenges HTML5 WebSocket brings when you build real time web.
22. http://bit.ly/9tKdeK
http://github.com/makoto/wsbench
This is example of using 2 small size ec2 instance, making 5000 ~ 20000 number of connections , send 1 message to distribute to all
connections, and majored the average of how long it took to be delivered to each connection (DRAFT 75 ONLY)
Friday, 27 August 2010
37. server = new Pusher(Pusher.key, Pusher.channel);
server.bind('note-create', function(note) {
generateNote(note);
});
post '/notes.json' do
content_type 'text/json', :charset => 'utf-8'
n = Note.new(params[:note])
n.save
Pusher[CHANNEL].trigger('note-create', n.to_json)
end
We enhanced WebSocket by adding channel and event
Friday, 27 August 2010