1. Comet implementations for Perl
Marian HackMan Marinov
Co-founder and CEO of 1H Ltd.
mm@1h.com
Bulgarian Perl Workshop 2013
2. Replacing browser PULL
with server PUSH
What is Comet?
AJAX Push
Reverse AJAX
Two-way-web
HTTP Streaming
HTTP Server Push
Bulgarian Perl Workshop 2013
3. Hidden iframe
XMLHttpRequest
long polling with
- AJAX
- XMLHttpRequest
- Script tag
Implementations
Bulgarian Perl Workshop 2013
5. Iframe sent as Hidden iframe
chunked blcok
Infinitely long
Works on every browser
Lacks reliable error handling
Connection state unavailable
Bulgarian Perl Workshop 2013
18. Stand alone web server
Almost no documentation Stardust
No updates since 2011
Supports:
stream and longpoll
remove With::Log from stardust.pl cpan Stardust
Bulgarian Perl Workshop 2013
20. Other Perl comet implementations:
- POE-Component-Server-Bayeux
- Tatsumaki
Additional readings:
http://toroid.org/ams/etc/mojolicious-http-streaming
http://infrequently.org/2006/03/comet-low-latency-data-for-the-browser/
http://showmetheco.de/articles/2011/2/diving-into-html5-with-websockets-and-perl.html
Bulgarian Perl Workshop 2013
21. More on the subject here:
http://www.slideshare.net/simon/time-for-comet
? ?
? ?
?
? ?
? My slides can be found here: ?
http://www.slideshare.net/azilian/perl-comet
Bulgarian Perl Workshop 2013
Hinweis der Redaktion
A lot of names for the same technology :)
Streaming Short polling Long polling
Does not support cross domain access Before IE needs minimum 256bytes of data before executing anything The same issue is present in Safari
x-mixed-replace is invented by Netscape 1995 since 2004 has support in Gecko browsers it is also included in IE 10 and newer Does not support cross domain access
Does not support cross domain access Works on all browsers
Supports cross domain access Works on all browsers