Java Reference
In-Depth Information
An alternative to WebSockets
The example we presented in this chapter is possible to be implemented using an older,
lesser-known technology named Server-Sent Events ( SSE ). SSE allows for one-way com-
munication from the server to client over HTTP. It is much simpler than WebSockets but
has a built-in support for things such as automatic reconnection and event identifiers. We-
bSockets are definitely more powerful, but are not the only way to pass events, so when
you need to implement some notifications from the server side, remember about SSE.
Another option is to explore the mechanisms oriented around the Comet techniques. Mul-
tiple implementations are available and most of them use different methods of transporta-
tion to achieve their goals. A comprehensive comparison is available at ht-
tp://cometdaily.com/maturity.html .
Search WWH ::




Custom Search