I researched a little bit these two days about Real-Time Application(RTA), I found many useful solution to build real-time application.
First, a RTA is an application program that functions within a time frame that the user senses as immediate or current. The latency must be less than a defined value, usually measured in seconds. The use of RTAs is called real-time computing (RTC).
There are some example use cases of RTAs, including:
* Videoconference applications * VoIP (voice over Internet Protocol) * Online gaming * Community storage solutions * Chatting * IM (instant messaging)
Mainly, I am interested in two solutions, which are Cramp based RTA and a NR2J(Node.js+Redis+Juggernaut+Jquery) solution, both of these two solutions have existing samples, I suggest you should go through all of them to understand RTA well.
Cramp based RTA Cramp is a ruby web framework with asynchronous feature, which is always running inside EventMachine reactor loop, there is a detailed introduction for it. A sample code is available here.
NR2J solution Introduction is here and sample code is here. I tried Node.js before, it’s getting popular recently, but I still don’t be used to implementing server side code with JS. I love Ruby and Rails anyway.
Other RTA resources: Real-Time/WebSocket/Rails3: http://laktek.com/tag/realie/ JSChat.org: http://jschat.org/