Getting Started with WebSocket and Server-Sent Events using Java

Reza Rahman (Oracle)
Java & JVM
Location: E147 Level: Novice
Average rating: ***..
(3.67, 3 ratings)
Slides:   external link

Server-Sent Events defines a standard technology for server-push notifications. WebSocket attempts to solve the issues and limitations of HTTP for real-time communication by providing a full-duplex communication over a single TCP channel. Together, they bring new opportunities for efficient server-push and peer-to-peer communication, providing the basis for a new generation of interactive and “live” Web applications.

This session provides a primer on WebSocket and Server-Sent Events and their supported use cases. It examines the efforts under way to support WebSocket in the Java programming model, from a simple annotation-driven programming model and integration in the Java EE containers using JSR 356. The session also explains how Server-Sent Events can be easily written using Jersey, the Reference Implementation for JAX-RS 2. All of this support will be available in Java EE 7, scheduled to go final in Q2 2013.

The attendees will learn how to leverage WebSocket and Server-Sent Events in their web applications using several code samples through out the talk. Simple “Hello World” to more elaborate Collaborative Whiteboard applications will show different features of both the technologies. A complete development using NetBeans, deployment on GlassFish, and debugging using Chrome and Wireshark will be shown.

Photo of Reza Rahman

Reza Rahman


Reza Rahman is a former long-time independent consultant and now officially a Java EE/GlassFish evangelist at Oracle. He is a co-author of the popular book EJB 3 in Action. Rahman is a frequent speaker at Java User Groups and conferences worldwide, including JavaOne. He is an avid contributor to industry journals like Javalobby/DZone and TheServerSide, and has been a member of the Java EE, EJB and JMS expert groups. He implemented the EJB container for the Resin open source Java EE application server.

Comments on this page are now closed.


Picture of Reza Rahman
Reza Rahman
07/31/2013 8:23am PDT

The slide deck (and all my others) are posted on SlideShare: The deck has the demo source code URL on GitHub embedded (which houses all my demos).

BTW, if desired and there is enough people, I could do this or any other presentation I have on Google Hangout (even if for a single company).

Eric Pierce
07/30/2013 3:44pm PDT

Slides/code please?


Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at (707) 827-7065 or

Contact Us

View a complete list of OSCON contacts