| because PHP provides practically NO means for async I/O whereas the other languages do. One of the reasons for this is because PHP was designed to quickly handle single HTTP requests. The scaling is ment to be done on the app-server side and that single request that your script is serving at a given time will take as long as it will take anyways. So you don't really need the async I/O (in theory). Python and Javascript (and to some degree ruby) rely on their own web servers implemented in their own language, in many cases with no or bad (GIL) concurrency at which point it gets more interesting to move into an event based model where it becomes imperative that operations don't block. There async I/O becomes important. So: PHP: concurrency by firing off another apache/fastcgi process or thread. Don't worry about blocking on I/O. node.js and some python/ruby frameworks: concurrency by using an event based system. Because one operation blocks the whole server, they need to be quick. async I/O becomes important. Of course the evented model has huge advantages too: You worry much less about races, you get huge performance with a simple architecture and you can potentially handle much more concurrency (because each thread/process consumes resources that your one evented process does only once). Both paradigms are interesting, but having first-class functions certainly makes an evented model more convenient to work with. |