------art_39027_4139198.1184483228798
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 7/14/07, Ricardo Jasinski <rjasinski / gmail.com> wrote:
>
> > So the data collection app stores it in the DB, and the web page just
> > retrieves the latest data
> > from the DB when a user navigates to the page. Piece of cake! 9^)
>
> Hi Chris,
>
> thanks for your input! Yes, it is really almost a piece of cake,
> except that the data displayed on the page must be updated whenever
> new information is sent by one of the sensors (without having to click
> 'refresh' on the web browser).
>
> Of course a periodic page reload could take care of this issue, but I
> believe we can do better than that...  >
> Cheers,
>
> Ricardo


Richardo

There is not really a built in way with Rails that I know of to push data
out to the client, which is what it sounds like you want to do.  Normal web
servers respond to a request from the client.  There is no mechanism to push
data out to the clients from a server side event, since there is no list of
clients stored on the server, where would you send it to?  Also browsers are
not really made for doing this.

I believe there is a solution to this called COMET

http://en.wikipedia.org/wiki/Comet_(programming)

and there is a rails plugin although I have never used it.
http://code.google.com/p/ajaxmessaging/

HTH
Daniel

------art_39027_4139198.1184483228798--