Gonzalo Monzón wrote:
I've been developing desktop applications with PHP-GTK since 2002, far
beyond the web script context, and in the more complex projects I did,
was a must to implement multi-process and IPC communication due to the
lack of threading in PHP, as to deal with some issues like multiple
tcp clients, multiple tcp server with a proxy to the application data,
webservices, handling UI, and a lot more stuff, while doing "realtime"
(the more realtime I was able of) processing of all incoming and
outgoing data, for more than 24 hours long running time. Yes, I was
able to be successful with such a developement after a lot of pain,
but it is not likely the most common usage for PHP. I finally had to
implement several parts in C, embedding PHP, and really, I was not
happy of to cope with that, but I did not have the time to switch to
another language as I had to re-use a lot of existing code that worked
smooth with a multi-process approach, but without the need of so long
running time, so many tcp clients, and so many data... I had to
implement data containers in using C structures, as handling all that
data from PHP taken more than 500Mb of RAM in no more than 8 hours of
processing, interprocess syncronization mechanisms, and a lot more stuff.
Sounds to me like you are in my boat! I have done some similar work to
create a multi-process beast. Here is an OO.o Presenter presentation I
did for the Dallas PHP User's Group back in December of 2005:
http://dantescode.com/docs/DPUG%20-%20PHP%20Server%20Applications.odp
Perhaps this will shed a little light on my very similar solution.
Seems to me we could benefit from having some kind of threading support
in the language to avoid all the headache of each of us building the
same code to solve a similar problem. I'm sure there are others like
yourself.
Dante
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php