Dave A. wrote:
I’m looking for a little guidance for a project I’d like to start. I’m
fairly familiar with Rails, but still new to Ajax. I want a part of an
app to include a back-and-forth between two people, kind of like a
turn-based strategy game. Is Ajax able to do something like that? Can it
observe when one person has passed it over to the other, and activate
the second person’s screen accordingly?
Google for my street name, “how to chat”, Rails, and Ajax.
The best raw Ajax can do is a periodically_call_remote with a timer set
above a second. If you try to go faster than that, the internets’ pipes
If you need split-second resolution, then you need a system that leaves
internet connection open. That would be Juggernaut; it uses a small
dot on your screen to call-back to the server and leave this connection
open. You can get sub-second resolution like this, and both browsers
generally see the update at the exact same time.
“Test Driven Ajax (on Rails)”