Last Friday I presented a talk on Comet and PHP during the official track of the Dutch PHP Conference 2011. Since Slideshare did not convert my slides as it should, I decided to add the links in the slides here… for your convenience. You can also download the full OpenOffice Impress file (.odp) from Slideshare (to have the video’s and everything) if you want. Guess I should finally give in and start using Keynote.
On a side note: to anyone that took the time to comment on Joind.in: thanks, really helpful input that I can use to improve my talk. Overall the response to my talk was very good and to the few critics about the lack of a real focus on PHP during my talk: you are right and yes the title would have been better ‘Using Comet and PHP’ instead of ‘Implementing Comet and PHP’. I got the idea for this talk more then a year ago and since then my interest diverted away from implementing an old-fashioned Comet-style PHP solution.
I’m much more interested in solutions like Socket.io and HTML5′s WebSockets and Server-Sent Events nowadays since I think (obviously) that this is the way to go. Anyway, I’m planning to build further on this presentation and add more concrete examples (they are in the works), with more emphasis on HTML5 related content and attempts at PHP based server-side solutions.
All in all, it was an interesting experience presenting for such a crowd and I’m looking forward to future opportunities and the feedback has been very stimulating and rewarding.
Anyway, the links that have been eaten by Slideshare conversion:
XHR Streaming
- jQuery bug that mentions the lack of XHR object access: http://bugs.jquery.com/ticket/8327
- Some code using a filter for accessing the XHR object: http://jsfiddle.net/d8ckU/1/
- A plugin allowing XHR stream support, no longer works apparently: http://plugins.jquery.com/project/ajax-http-stream
DWR
- Direct web remoting info: http://directwebremoting.org
Cometd now having WebSockets support (haven’t tested this)
- Q+A about Cometd now having WS support: http://cometdproject.dojotoolkit.org/node/124
- The JS code for WS support with long polling fallback: https://www.dojotoolkit.org/reference-guide/_static/js/dojox/socket/
Open Cooperative Web Framework (something to keep an eye on)
APE project
- Project home: http://www.ape-project.org/
- Intro on writing apps: http://www.ape-project.org/wiki/index.php/How_to_write_an_application_with_APE
Kaazing
- Overview of push technology: http://websocket.org/quantum.html
- Kaazing docs: http://tech.kaazing.com/documentation/
A very nice tool for testing your browser: http://www.html5test.com/
node.js/socket.io/npm
- node.js: http://nodejs.org
- node.js on Github: https://github.com/joyent/node.git
- node.js documentation: http://nodejs.org/docs/latest/api/
- node package manager (install node.js packages with ease): http://npmjs.org
- socket.io: http://socket.io/
- npmjs search interface for modules: http://search.npmjs.org
- socket.io server side: https://github.com/LearnBoost/Socket.IO-node
- socket.io client side: https://github.com/LearnBoost/Socket.IO
- nice series of tutorials on building a node.js, socket.io and redis based chat app
- another nice intro: http://thecoffman.com/2011/02/21/getting-your-feet-wet-with-node.js-and-socket.io/
other solutions:
- nginx push module: http://pushmodule.slact.net/ (more here and example chat js here
- Meteor (perl): http://meteorserver.org
- Freeliberator (c): http://www.freeliberator.com
- Tornado (python): http://www.tornadoweb.org
- Hookbox (pythoo): https://github.com/mcarter/hookbox (more here and a Drupal+Hookbox solution here)
- Jetty 6 (java): http://jetty.codehaus.org/jetty/
- Grizzly (java): http://grizzly.java.net/
- Tomcat 6 (java): http://tomcat.apache.org/
- Rails Juggernaut plugin (ruby/rails): http://juggernaut.rubyforge.org/
- Atmosphere (java): http://atmosphere.java.net/
- Orbited (python): https://bitbucket.org/desmaj/orbited
- Noloh (php-ish, has some push support): http://www.noloh.com
- LightStreamer (java): http://www.lightstreamer.com/
- Pushlets (java): http://www.pushlets.com/
- … and probably a whole lot more …
alternatives for comet
- Webhooks: http://www.webhooks.org/
- PubSubHubbub: http://code.google.com/p/pubsubhubbub/
- ReverseHTTP: http://reversehttp.net/
- WebSockets & Server-Sent Events (see further)
message formats
- JSON
- STOMP
- Wikipedia: http://en.wikipedia.org/wiki/Streaming_Text_Orientated_Messaging_Protocol
- ZF Stomp client: http://framework.zend.com/manual/en/zend.queue.stomp.html
- PECL Stomp extension: http://pecl.php.net/package/stomp
- AMQP
- Wikipedia: http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
- PECL AMQP extension: http://pecl.php.net/package/amqp
- RabbitMQ adapter for ZF Queue (uses AMQP and AMQP extension)
: http://riteshsblog.blogspot.com/2011/03/rabbitmq-adapter-for-zend-queue-using.html
- XMPP
- XMPP org: http://xmpp.org/
PHP and DIY
- Phico: http://www.3site.eu/phico.php
- Simplecomet: http://mandor.net/2008/12/23/12-simplecomet-http-streaming-and-toilet-scrubbing
- Comep: http://sourceforge.net/projects/comet/files/
- Phomet’s Bayeux client class in PHP: http://morglog.alleycatracing.com/bayeux.class.inc.phps
WebSockets & SSE
- Reason why disabled in FF4 for example: http://news.cnet.com/8301-30685_3-20025272-264.html
- Example for SSE: http://googlecodesamples.com/html5/sse/sse.html
- html5rocks on SSE: http://www.html5rocks.com/tutorials/eventsource/basics/
- The original Opera stuff: http://my.opera.com/WebApplications/blog/show.dml/438711
- PHP WebSocket implementation: http://code.google.com/p/phpwebsocket/
- Alternative PHP solution: http://www.waterspout.com
