The technology to ensure (sorta) real-time updates on your web app is called, COMET. This is a giant hack, basically. There are three common ways to actually implement it. Polling, Long Polling and Continuous connection, by using the forever frame pattern/trick. All of them of certain issues:
- Polling: efficient for rarely changing items, but potentially long latency
- Long Polling: Latency is the amount of time needed to make a new connection (see Jean-Francois Arcand’s blog). But this is inefficient for extremely fast (multiple times a minute) event rates and it means a heavy thread load on servers where each request is a thread, non NIO servers (see Jean-Francois Arcand’s blog)
- Continuous connection (aka HTTP Streaming): Technical issues (including proxy problems). But this approach has the lowest latency. It also has some issues on none NIO servers, as long polling.
That said… So there are (some cases) where polling is OK…
The good news is, that Trinidad actually supports polling out of the box, by its poll component. Specify a certain ping interval, to ask the server for an update… but keep in mind, the more you ping the server, the worse the client and server performance.
At Oracle we support the continuous connection as well, as part of ADF Faces 11g (Rich Client Framework).