on 2005-12-23 18:47
on 2005-12-23 19:14
on 2005-12-23 20:29
on 2005-12-23 20:48
Just a thought, but couldn't you make an AJAX call back to the server, and the server, instead of replying right away, waits until an event happens and then replies to the AJAX request? This gets the "open connection waiting for an event" and lets you stay in ruby/rails (assuming you can wait on the reply like that without adverse effects on the server). I think for this to work you'd have to unhook the AJAX call from being tied to a particular button/link (like how rails does it), and instead make the AJAX call as part of the page onLoad handler, so it could be listening in the background. You'd also need a way to start a new AJAX request after you received each event. Sounds like it could work ...
on 2005-12-23 21:12
On 12/23/05, Jeff de Vries <firstname.lastname@example.org> wrote: > Just a thought, but couldn't you make an AJAX call back to the server, > and the server, instead of replying right away, waits until an event > happens and then replies to the AJAX request? This gets the "open > connection waiting for an event" and lets you stay in ruby/rails > (assuming you can wait on the reply like that without adverse effects on > the server). I thought about this, but you might face a browser or server timeout error.
on 2005-12-23 21:24
Josh C. wrote: >> > >I thought about this, but you might face a browser or server timeout error. > > what about using periodically_call_remote? call the server every 30 seconds or so. the server would only hold the connection open for 29.5 seconds. The client would reestablish the connection every x seconds. call