Carlsbad Cubes Wolf Paulus

java

Turning the Web on its head - let's have the server call the client
By Wolf Paulus <wolf@wolfpaulus.com>

Posted Sunday, January 20th, 2008

Code Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at Cal State Fullerton on January 26 and 27, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be the 3rd time for me, driving up to Cal State Fullerton, and for the 3rd time, I have been given the early morning spot for my talk. Now, like probably most participants, I would not consider myself a morning person - still, I'm confident that this topic will fill a room: Turning the Web on its head - let's have the server call the client.

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, to 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. Honestly, all the code, (client and server) that makes this 'Stock Quote Client' an event-consumer, instead of a stupid poller, will be shown.


Disclosure: This blog is written and edited by me, it contains my words and my opinions only, and does not contain any content which might present a conflict of interest.
I am not compensated to provide opinion on products, services, websites and various other topics. This blog does not accept any form of cash advertising, sponsorship, or paid topic insertions. However, I will and do accept and keep free products, services, and other forms of compensation from companies and organizations. All advertising is in the form of advertisements generated by a third party ad network and identified as such.
I will only endorse products or services that I believe, based on my expertise, are worthy of such endorsement. Any product claim, statistic, quote or other representation about a product or service should be verified with the manufacturer or provider.

Published on: Sunday, January 20th, 2008  •  Category: [java]

Article URL : http://wolfpaulus.com/journal/java/ccfullerton08.html