Thursday, November 10th, 2005
“Realtime on Rails” - real time chat using XHR Push
Martin Scheffler posted this morning on the Ruby on Rails list about a new realtime chat application called Realtime on Rails. If you are using a Mozilla based browser, it will keep open a HTTP connection and push the chat data as JSON. In other browsers the server is polled every five seconds or when you are actively typing.
For more details and the full docs check out Martin’s blog entry, or grab the source (GNU GPL). Or just go to the demo and play around with it - keep in mind its the first release so no guarantees about stability!
The responsiveness in Firefox was very impressive, better then any I’d seen from similiar Ajax chat apps. Very nice work, guys!













Very cool app, and I’m glad you snapped it just after I asked him about building it up to be an editor.
Very neat…like the fade ins. Check out meebo.com as well, it’s an IM chat app that shoots for the same level of responsiveness. Needs to roll out group chat!
The way it push the content is similar to pushlets (www.pushlets.com), which can run also on IE.
A great job!
Have you guys seen Quek (http://www.quek.nl)? That is an Ajax based chatbox that has been doing exactly this in both browsers for a few years now. BTW: Try fart, dance and superman :)
I would prefer the method I used some years ago (yes, Remote Scripting is way older than all of this Ajax stuff) to make a Chat app. When you make a Chat, you need instant notification from the server, so the typical polling is not a good idea, because the user perceives the lag and the server is overloaded for no reason.
Flash has a XML Socket connection available and Flash can be used from Javascript. So you can use a permanent connection with the server to send messages in both directions (server->client and client->server).
By the way, this method can also improve the responsiveness of any Ajax application, because the communication channel is yet stablished and all the stuff of making the connection with the server for each query is avoided. You can send XML through this channel and make the data available to Javascript faster.
Imagine being able to transform your look in two seconds fl at! The latest eyeglass framework let you do just that. But for craze devotee, it’s his adroit-cash act that’s most impressive. Know exactly what you want? READ MORE SUPERMAN!