Has anyone tried using Server-Sent Events with Caché/HealthShare/Ensemble and angularjs?
I haven't dealt with SSEs yet, but I can say that WebSockets work like a charm.
SSEs are not using a special protocol, they work within the HTTP specification and are build on the server by setting the "Content-Type" header to "text/event-stream". From my understanding, this can be easily implemented with a CSP page.
The reasons why SSEs are not as popular as WebSockets are:
- a WS is bidirectional
- WS are supported by all major browsers, while SSEs are not supported by IE and Edge (http://caniuse.com/#search=server-sent%20event)
SSEs have some interesting advantages over WS like the use of a simpler protocol, automatic reconnection, and event IDs.