There's more...

It's important to mention that SSE is not supported in MS IE/Edge web browsers and that it is not as scalable as web sockets. In case you want to have full cross-browser support in the desktop side and/or better scalability (so, not only mobile apps, but also web apps which can open many more connections per instance), then WebSockets should be considered instead. Fortunately, standard Java EE has supported WebSockets since 7.0.

Get Java EE 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.