Photon: high performance PHP/Mongrel2/ZeroMQ micro framework
photon-project.com
photon-project.com
It's not a general purpose web server, but targets message passing applications that must move between transports. For instance Browser <-> Web Socket <-> ZMQ is easily possible in it.
It's based on ruby eventmachine (no external daemons needed), and lets you seamlessly pass messages between all three protocols, leveraging the differences of each in interesting ways.
Additionally, it's got tools to help you build isolated components that communicate via messaging only (preferably ZMQ). If you keep this in mind from the start, it can substantially help when it comes to scaling out.
Lastly, we're working on Mongrel2 support as a front end.
The flexibility to easily address a message to a given connection from everywhere at the backend level is what is wonderful in the protocol developed by Zed.
edit: same goes to tests on symfony's site. We've been using Symfony since pre 1.0 days and you'll be lucky to hit 25% of these request rates once you use most of the common features.
https://github.com/j2labs/brubeck
I have the proof of concept, which is more minimal as a project I'm calling mongrevent.
https://github.com/j2labs/mongrevent
Mongrevent has better documentation for how the interaction with Mongrel2 / ZeroMQ works.
With that said: Great work on an innovative framework. I applaud the effort so far.
In other words, can I implement a simple real-time chat demo using websockets with this stack?
As Photon is an application server, this means you can do what you do easily with Django/RoR or a Java application server. This breaks the traditional one request, one reply, we forget everything approach of PHP. This is now possible rather nicely as PHP has improved a lot with respect to memory management in the last releases.
Disclaimer, I am the author of Photon and I am locked out of HackerNews with my normal account because of the great anti procrastination mode :-D
I will put up a full tutorial from a bare installation of Debian up to this chat server.
Doesn't the Mongrel2 Chat demo use Flash-based socket communication?
I've haven't been able to figure out if Mongrel2 supports native websocket communications on the same port as http traffic (a la nodejs with Socket.IO).
As ugly and inconsistent as the PHP language is, this project is really cool.