Sponsored Links
-->

Saturday, June 30, 2018

HTTP Request VS Polling VS Server Sent Events(SSE) - Client Server ...
src: i.ytimg.com

Server-sent events (SSE) is a technology where a browser receives automatic updates from a server via HTTP connection. The Server-Sent Events EventSource API is standardized as part of HTML5 by the W3C.


Video Server-sent events



History

The WHATWG Web Applications 1.0 proposal included a mechanism to push content to the client. On September 1, 2006, the Opera web browser implemented this new experimental technology in a feature called "Server-Sent Events".


Maps Server-sent events



Overview

Server-sent events is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established. They are commonly used to send message updates or continuous data streams to a browser client and designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client requests a particular URL in order to receive an event stream.

Web browsers


WebAPIs - Server Sent Events Demo - YouTube
src: i.ytimg.com


Libraries

.Net

  • Service Stack EventSource library for .Net, with both server and client implementations.

ASP.NET

  • SignalR - Transparent implementation for ASP.NET.

C

  • HaSSEs Asynchronous server side SSE daemon written in C (It uses one thread for all connected clients).

Erlang

  • Lasse EventSource server handler for Erlang's cowboy
  • Shotgun EventSource client in Erlang

Go

  • eventsource EventSource library for Go.

Java

  • jEaSSE - Server-side asynchronous implementation for Java servlets and Vert.x
  • Akka HTTP has SSE support since version 10.0.8
  • alpakka Event Source Connector EventSource library for alpakka which supports reconnection
  • Spring WebFlux Server and client side java implementation built on reactive streams and non-blocking servers

Node.js

  • sse-stream - Node.js/Browserify Server-Sent Events implementation (client and server).
  • total.js - web application framework for node.js - Server-Sent Events example + supports WebSockets (RFC 6455)
  • eventsource-node - EventSource client for Node.js

Objective C

  • TRVSEventSource - Server-sent events EventSource implementation in Objective-C for iOS and OS X using NSURLSession.

Perl

  • Mojolicious - Perl real-time web framework.

PHP

  • Hoa\Eventsource - PHP Server-Sent Events implementation.

Python

  • Python SSE Client - EventSource client library for Python using Requests library.
  • Server Side Events (SSE) client for Python - EventSource client library for Python using Requests or urllib3 library.
  • django-sse - HTML5 Server-Sent Events integration for Python/Django.
  • flask-sse - A simple Flask extension for HTML5 server-sent events support, powered by Redis.
  • sse - Server Sent Events protocol implementation on python2 and python3 in the same codebase.
  • event-source-library - Server Sent Events protocol implementation in python2 with Tornado. Client and server implementations.

Scala

  • Akka HTTP has SSE support since version 10.0.8
  • alpakka Event Source Connector EventSource library for alpakka which supports reconnection

Swift

  • EventSource - Server-sent events EventSource implementation in Swift using NSURLSession

Java on Twitter:
src: pbs.twimg.com


See also

  • Chunked transfer encoding
  • Push technology
  • Comet

Streaming Updates With HTML5 Server Sent Events - YouTube
src: i.ytimg.com


References


Java on Twitter:
src: pbs.twimg.com


External links

  • Server-Sent Events. W3C Recommendation.
  • HTML5 Server-push Technologies, Part 1. Introduction into HTML5 Server-push Technologies. Part 1 covers ServerSent Events.
  • Using server-sent events. Concise example how to use server-sent events, on the Mozilla Developer Network.
  • EventSource reference on MDN
  • Django push: Using Server-Sent Events and WebSocket with Django Django push: Using Server-Sent Events and WebSocket with Django.

Source of article : Wikipedia