Question

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

Was it helpful?

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

OTHER TIPS

WebSockets is an emerging standard (currently in draft) that aims to do just that - provide low-latency, bidirectional sockets for you to provide send and receive data. There are a bunch of server libraries for every major programming language, as well as fallbacks (to flash, for example) for browsers which don't (yet) support it. You can try some demos to see what it's all about:

Otherwise, the technique of long-polling and other Comet techniques has been used for a long time, so they'll have to suffice if you're not ready to give WebSockets a go. I don't think I need to provide any implementation examples - they are ubiquitous - Facebook, Hotmail, Twitter, Gmail... the list goes on. There's also lots of source code available - just Google! (or Bing, or whatever your preferred search engine is)

Notes: Currently, Google Chrome 10, Apple Safari 5, Firefox 6 and Opera 10 and above support WebSockets natively. Firefox 4 and 5 have it disabled by default.

You can try a ready-to-use framework such as Realtime.co (for whom I work). It has APIs for several languages and platforms, allowing you to have all the cool real-time features in your browser, mobile applications, etc..

You can get a free account at www.realtime.co and check out the APIs at www.xrtml.org.

Developing from scratch is fun but if you want to move on quickly and spend time developing your application and not waste time working on the communication layer, frameworks such as Realtime are the way to go since they remove a lot of the hassles and problems such as scalability, SLA, performance, security, etc..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top