Search code examples
javascriptbrowserreal-time-data

Real time server Updates to the Browser


I'm searching for a framework which can provide real time updates form a server to the browser like it is used in web chats, google wave, google buzz, facebook etc.

I found Rocket GWT but the last update was over a year ago...

The best implementation for me would use GWT on the client, JSON as the communication protocol and C++ on the server but any other frameworks are welcome too just to see that it is possible:) Which framework is used by google?

Best regards, Stefan


Solution

  • Take a look at websockets, which will eventually become a standard for bidirectional client-server web communication.

    Current support can be checked in these tables:

    Since in near future (from August 2011) support is available only in Safari, Firefox and Chrome, maybe some failover lib would came in handy:

    You want it to work in all browsers, no matter if they have WebSocket support or not? You don't want to rely on proprietary technology such as Flash to provide a fallback And naturally, you don't want to write more than one implementation?

    Introducing, the gracefulWebSocket jQuery plugin: Implements the w3c WebSocket interface Wraps the native WebSocket if support is detected Provides a default fallback using traditional AJAX polling over HTTP Requires no extra code on the frontend, allows you to target the WebSocket API today and let users take advantage of it as more browsers add support. Default fallback behavior can be overridden by plugin options