Turning the Web on its head
We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, imaging a scenario where the server when it has determined that something exciting just happened (e.g. the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves).
Sounds interesting and a couple of implementation ideas may come to mind. After looking briefly into some xml and binary web service protocols, we will take a closer look at the notification mechanism provided by Java's management extensions and eventually take a really close look at a full featured implementation of the above mentioned problem. Interestingly, even when looking at both, the client and the server part of this solution, there isn't really all that much code to write, which means that even in the little time we have, all the concept and patterns used can be looked at and discussed. The talk also covers a Comet-style protocol and how it can be used with a Tomcat Server and an AJAX client application.
All the code, (client and server) that makes this Stock Quote Client an event consumer, will be shown.
Tags: Tomcat | Push | non-blocking I/O | JMX | Java | Hessian | Comet | AJAX