Zend_Console_Process
Rarely do I get excited about a Zend proposal - and I definitely don’t post about the ones in progress on my blog. However, Zend_Console_Process deserves some attention.
If you’re at all familiar with pcntl this is for you. Pcntl allows you to control processes from within PHP (essentially allowing you to run threaded PHP code; fake “real” threading, at least). Zend_Console_Process is a Zend style interface to create threaded PHP applications in a usable manner.
If you take a gander at Ben’s first example, you’ll see the advantages:
Now, there’s been some interesting discussion on the mailing list already. For instance:
… Calling this “Threading” is a major misnomer. Threading would imply it has access to the same address space and descriptor table. That is not the case if this uses fork…
-Michael
Good point; so don’t take anything you read on the ZF site (actually, anywhere on the internet for that matter) as divine writ.
Like I said in my last post, it’s all about choosing the right technology. If you need to resize a couple dozen images, this will do you fine. If you need to build a video trans-coding server that can handle hundreds of videos at a time, well… perhaps it is time to choose a different language to do your heavy lifting. The fact that it doesn’t work on windows is a large hit to the adoption of Zend_Console_Process, but in my humble opinion, it is the most interesting proposal to come into review status since Zend_Service_Amazon_S3.
Fanatic programmer, obsessive technophile, serial entrepreneur and Web 2.0 enthusiast. Zed23.com is the personal blog of Ryan Brooks, a Web Application Developer out of Calgary, Alberta.