All Projects → nicmarti → play2-serverside-sample

nicmarti / play2-serverside-sample

Licence: other
A play2 server side sample with stream, Enumerator, Enumeratee

Programming Languages

scala
5932 projects

play2-serverside-sample

This is a play2 sample to demonstrate SSE (Server Sent events) with Play2.

I really encourage you to have a look at EventSource specification on W3.org which describe EventSource. Using this API rather than emulating it using XMLHttpRequest or an iframe allows the user agent to make better use of network resources in cases where the user agent implementor and the network operator are able to coordinate in advance. Amongst other benefits, this can result in significant savings in battery life on portable devices. This is discussed further in the section below on connectionless push.

The application has been tested successfully with Play 2.0.3-RC2, with Safari and Chrome.

For more details about Server sent events, read this blog article : http://www.html5rocks.com/en/tutorials/eventsource/basics/

Thanks to Sadek Drobi (CTO at Zenexity for its help. This sample is similar to https://gist.github.com/3072893.

EventSource is supported by all modern browser except Microsoft Internet Explorer. See this Matrix for more details.

Nicolas @nmartignole

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].