2009/3/19 mike <mike...@gmail.com>: > On Wed, Mar 18, 2009 at 10:06 PM, Cesar D. Rodas <sad...@gmail.com> wrote: >> Hey mike, > >> It is different, my idea is that the worker execute PHP code (I will >> embed PHP into C or C++), AFAIK gearman execute C code. The main >> advantage is that you can "deploy" your app. without recompile your >> worker, and would be easy to migrate from an existing php code. > > Not quite sure it is different. > > You're looking for a distributed worker mechanism, right? That's what > Gearman does. and it has a PECL module to interface with it. > > Basic example here: > http://www.oddments.org/notes/GearmanMySQLWebinar200902.pdf Great presentation
In the presentation with Gearman you have a C extension for PHP, and you code the daemon itself in PHP. My idea it's different. Let's put it simple. I am planning code a server (similar to a web server, Apache) written in C or C++ that contains PHP embed (or its own SAPI), with an efficient protocol (no xml, no http) to call PHP functions that he contains. The protocol probably would use my binary serialization class and submit objects (http://www.phpclasses.org/browse/package/5242.html) but I don't know yet. In typical installation you would have many workers, and one "master" that will be a mere php application with web interface probably that would submit PHP code to the workers. The code will be raw PHP, I mean no special API would be needed to export any function, my goal it's keep it simple to migrate. The final client wouldn't connect to the master, they will have a pull of worker and they will pick up one randomly (as many people does with memcached). Is it clear enough? > It's written in C now (was in Perl) and it can execute whatever on the > worker side it looks like, which can be PHP code to do anything. > -- Cesar D. Rodas http://cesar.la/ Phone: +595-961-974165 Rita Rudner - "Before I met my husband, I'd never fallen in love. I'd stepped in it a few times." -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php