3 ms·
Your worldview ( Your last statement, that you think PHP is only suitable for a single request in a fcgi environment.) of PHP's capabilities are the pain point
by meritt 13y ago
Your worldview ( Your last statement, that you think PHP is only suitable for a single request in a fcgi environment.) of PHP's capabilities are the pain point here.
What difficulties are you encountering trying to do basic pub/sub? Application developers have solved those exact same issues for decades now. Nodejs didn't invent "event-based programming".
- deleted 13y ago[deleted]
- themstheones 13y agoTrue, PHP is a great scripting language.
- AlexanderDhoore 13y agoEvent driven programming seems tacked on to php. I don't know if I want to run php as a daemon and then do some hackery to get IPC. It's not made for that...
- wwweston 13y agoI've written a lot of PHP, and while I can think of a number of ways you might use PHP to provide the backend for websocket-like communication (writing a long-running server, using multipart responses, adaptive polling), it seems pretty fair to me to say this isn't the place where PHP is strongest out of the box. Particularly compared to nodejs. If you know of a PHP runtime-host, library, or even just a development approach that makes supporting it as easy as nodejs, though, I'm all ears.
- meritt 13y agohttp://reactphp.org/ http://reactphp.org/ ( more specifically http://socketo.me/ http://socketo.me/ ) work very well for actually implementing websockets. It's fast and incredibly easy. Igor (https://github.com/igorw https://github.com/igorw) is a really talented guy.