It's been possible to instantly push information from a web server to a web browser for at least 10 years, but this technology has finally gone mainstream. In this talk I'll cover the past, present and future of web browser technology and the realtime web.
Slides saved as PDF from HTML presentation. Original presentation available here:
http://www.leggetter.co.uk/pres/techmeetup_edi_2012-02-08/
3. Overview
What is Realtime & the Realtime web
History of browsers & the Realtime web*
What technology can we use now?
Future
Questions
* according to me
4. What is Realtime?
systems that are subject to a "real-time constraint"— e.g. operational
deadlines from event to system response
Source: Wikipedia: Realtime Computing
What is the Realtime web?
The real-time web is a set of technologies and practices that enable
users to receive information as soon as it is published by its authors,
rather than requiring that they or their software check a source
periodically for updates.
12. Java Applets
<PLTCD=ra_iesufcas WDH10
APE OE"eltm_tf.ls" IT=5
HIH=5MYCIT
EGT1 ASRP>
LiveConnect
"Allows Java and JavaScript software to
intercommunicate within a Web page"
Applets were a problem.
Microsoft had to drop support their JVM (were sued).
Sun Microsystems releases kept breaking stuff.
19. Crossdomain restrictions
www.example.com > www.example.com √
subdomain.example.com > www.example.com
√*
www.example.com > www.leggetter.co.uk X**
CORS (Cross Origin Resource Sharing)
Problem: Browser support (FF3.6+, IE8+ etc.)
* you need to set d c m n . o a n
o u e t d m i to be 'example.com'
** there are ways around this with JSONP
20. Comet
Term 'coined' in 2006 by Alex Russell
Comet is a web application model in
which a long-held HTTP request allows a
web server to push data to a browser,
without the browser explicitly requesting
it. Comet is an umbrella term,
encompassing multiple techniques for
achieving this interaction.
21.
22. WebSockets
A protocol and an API
Single bidirectional connection
Supports cross domain communication
vrw =
a s
nwWbokt"s/mwboktevrcm8";
e eSce(w:/yescesre.o:0)
w.npn=fnto( {
sooe ucin)
/ cneto etbihd
/ oncin salse
};
w.nesg =fnto(aa {/ rcieamsae
somsae ucindt) / eev esg
w.ed"e,gt "+dt) / sn amsae
ssn(Yp o: aa; / ed esg
w.ls(;
scoe)
};
w.nls =fnto(v {;
socoe ucine) }
w.nro =fnto( {;/ ?
soerr ucin) } /
23.
24. What can we use now?
HTTP Polling ç
HTTP LongPolling ç
HTTP Streaming √
HTML5 WebSockets √*
* See next slide
ß Boo!
Also checkout: http://html5please.us | http://caniuse.com | http://html5readiness.com
25. WebSocket Support
Can use on IE6, IE7, IE8, IE9 and other older
mainstream browsers with websocketjs Polyfil
Can use on Android with FlashLite or using
Firefox for Android and probably Chrome for
Android.
Source: http://caniuse.com
48. Technologies
Self Hosted:
socket.io node.js
SockJS Client library with multiple server options
(node.js/erlang/lua/python)
FAYE node.js/ruby
XSockets .NET
PHP developer? No chance! Well, there are a few options.
Hosted (platform agnostic)
Pusher
There might be others :o)
Full Guide here:
http://www.leggetter.co.uk/realtimewebtechnologiesguide
49. The future of Realtime Web
technology
WebSockets
Full native browser support
Not just web browsers
UX considerations
Performance considerations
WebHooks
We still live in a HTTP World
Realtime server to server communication