1. Introduction

Server-side notification to browser-clients is often implemented using applets with RMI, CORBA or custom TCP/IP messaging. These techniques are often complex to implement, have firewall restrictions, and require additional server development/maintenance. Also it is hard to integrate the state of the client-applet with the browser's page-content other than refreshing the page or doing all content-layout within the applet.

Pushlets are a servlet-based mechanism where data is pushed directly from server-side Java objects to (Dynamic) HTML pages within a client-browser without using Java applets or plug-ins. This allows a web page to be periodically updated by the server. The browser client uses JavaScript/Dynamic HTML features available in type 4+ browsers like NS and MSIE. The underlying mechanism uses a servlet HTTP connection over which JavaScript code is pushed to the browser. Through a single generic servlet (the Pushlet), browser clients can subscribe to subjects from which they like to receive events. Whenever the server pushes an event, the clients subscribed to the related subject are notified. Event objects can be sent as either JavaScript (DHTML clients), serialized Java objects (Java clients), or as XML (DHTML or Java Clients). Several application examples are presented such as monitoring (weather, live stock feed, system status) and a multi-user applications (chat).

The mechanism is lightweight in the sense that uses the servlet server's connection management and threading facilities, the javax.servlet APIs and standard Java features such as producer/consumer through Object wait() and notify(). In principle the framework could run within any servlet-supporting server and behind firewalls. When JavaScript/DHTML is used on the client this provides a convenient way to build applications quickly through scripting and to integrate and layout new content with HTML/CSS features.