HTML5 server sent events and several clients (without using a comet)

I have a usecase for which I would like to know if HTML5 Server-sent-Events is suitable.

Several clients (Javascript + HTML5 browsers) connect to a web server (with Java EE support). Each client can look at a different view at any time, depending on what is their object of interest.

My Question : How to save multiple clients (in different views) on updates occurring on the server side, without flooding all clients with all updates in all views?

The important points that I need to consider are:

  • Many customers may be interested in the same events. If two clients look at the same look, they SHOULD receive the same events.
  • The events that will be sent to the client depend on which client he is currently on.
  • Some clients may not be interested in any events (for example, they may view static data).
  • This client can dynamically change their interest. for example: close View1 and open View2.
  • A client may be interested in several channels of events (for example: two dynamically changing views can be part of one page).
  • I can only configure browsers with full SSE support.
  • 100 (). , ( SSE), .

SO/Google SSE () . Comet, SSE.

SSE ( ) ? Atmosphere, polyfill, SSE, , SSE .

, :
. .

+2
2
+2

- GET, EventSource. №4, .

, .

0

All Articles