Presentation is loading. Please wait.

Presentation is loading. Please wait.

Event Application Using Pushlets by Patricia Ferrao December, 2002.

Similar presentations


Presentation on theme: "Event Application Using Pushlets by Patricia Ferrao December, 2002."— Presentation transcript:

1 Event Application Using Pushlets by Patricia Ferrao December, 2002

2 What Is A Pushlet?  Java servlet application designed by Just van den Broecke from Just Objects B.V  Allows a web server to push information to a client browser  Pushes events to clients using javascript  Browsers use javascript to register for events with pushlets

3 What Is My Event Application? Uses pushlets to generate a particular type of event, called “eventapp” Uses pushlets to generate a particular type of event, called “eventapp” Events are generated and cleared randomly every few seconds Events are generated and cleared randomly every few seconds Up to 10 events can be active at one time Up to 10 events can be active at one time Events contain an event number, description and severity Events contain an event number, description and severity Browser javascript allows a client to register with pushlets for “eventapp” events Browser javascript allows a client to register with pushlets for “eventapp” events Client-side javascript displays “eventapps” as they come in Client-side javascript displays “eventapps” as they come in

4 Advantages of using Pushlets Run as a standard servlet application Run as a standard servlet application Don’t require any Java applets or plug-ins Don’t require any Java applets or plug-ins Integrate well with DHTML Integrate well with DHTML Use standard HTTP connection Use standard HTTP connection Pushlets are simple Pushlets are simple Can send as little information as required as soon as it becomes available Can send as little information as required as soon as it becomes available

5 Disadvantages of Pushlets Cross-browser DHTML compatibility Cross-browser DHTML compatibility Hogs resources such as threads and sockets Hogs resources such as threads and sockets Can we redesign Tomcat such that for pushlets, connection control is transferred to one main thread?? Can we redesign Tomcat such that for pushlets, connection control is transferred to one main thread??

6 What Can You Do With Pushlets Chat groups Chat groups Stock feed application Stock feed application Alarm reporting for servers or embedded systems Alarm reporting for servers or embedded systems Can have events generated by outside source (other servers or other clients) through postlets Can have events generated by outside source (other servers or other clients) through postlets Servlet can do event manipulation such as filtering, merging, etc Servlet can do event manipulation such as filtering, merging, etc Can have a central server push events to multiple edge servers who handle local clients. (Scalability) Can have a central server push events to multiple edge servers who handle local clients. (Scalability)

7 Distributed Pushlet Architecture

8 Competing Technologies HTML Refresh Refresh is at a fixed time interval, but events can be generated anytime. Not good for real- time response! Refresh is at a fixed time interval, but events can be generated anytime. Not good for real- time response! Forces Server to make connection even if there is no new data available. Not good for server load! Forces Server to make connection even if there is no new data available. Not good for server load!

9 Competing Technologies (Con’t) Server Side RMI or CORBA Requires use of client-side applets Requires use of client-side applets Need to learn RMI or CORBA. Java is more mainstream Need to learn RMI or CORBA. Java is more mainstream Difficult to integrate with HTML web page Difficult to integrate with HTML web page

10 Competing Technologies (Con’t) Messaging Needs client side application Needs client side application Uses non-standard ports and protocols Uses non-standard ports and protocols Difficult to integrate with HTML web page Difficult to integrate with HTML web page

11 Observations Tomcat does not time-out pushlet connections, even if not frequently used Tomcat does not time-out pushlet connections, even if not frequently used Pushlet servlet does hold up Tomcat client thread Pushlet servlet does hold up Tomcat client thread

12 Future Of Pushlets The author is continuing to evolve the technology The author is continuing to evolve the technology Use UDP to send events back to client (no connection hold-up) Use UDP to send events back to client (no connection hold-up) Allow events to be generated externally over RMI or UDP/TCP Allow events to be generated externally over RMI or UDP/TCP Have pushlets keep state or history information for new clients Have pushlets keep state or history information for new clients Use multicast to send events back to clients Use multicast to send events back to clients

13 References http://www.pushlet.com/ for source code, installation guide, demos, whitepaper http://www.pushlet.com/ for source code, installation guide, demos, whitepaper http://www.pushlet.com/ http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet_p.html “Pushlets: Send events from servlets to DHTML client browsers”, Just van den Broecke, JavaWorld, March 2000. http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet_p.html “Pushlets: Send events from servlets to DHTML client browsers”, Just van den Broecke, JavaWorld, March 2000. http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet_p.html


Download ppt "Event Application Using Pushlets by Patricia Ferrao December, 2002."

Similar presentations


Ads by Google