|Subject||RE: [firebird-php] PHP-CLI and event handling|
> why do you need events instead of the just recognising that theprocess has finished?
Because the processes are not tightly coupled, nor all on the same
One process may update data or recalculate inventory, and a separate
process may then decide to run a report or push the changes onto another
system. Putting them in one script would require the rules of various
business units to be in the one script.
A concrete example is a script would wait for an event caused by our
Solomon server pushing data from its SQL Server backend into our
Firebird inventory database.
But this thread is starting to drift, I'm more interested in the how as
we've already determined the why to our satisfaction.
From: firstname.lastname@example.org [mailto:email@example.com]
On Behalf Of Alan McDonald
Sent: Wednesday, August 10, 2005 6:54 PM
Subject: RE: [firebird-php] PHP-CLI and event handling
> I wasn't clear. There is only one thread, as I assume the registeredok so why do you need events instead of the just recognising that the
> event handler will execute in the original thread.
process has finished?
> > We need to handle events from scripts running on Linux and Windows
> > servers. After a brief search we've decided that the best support
> > is offered by PHP (as an aside, does anyone know of a Firebird
> > module for Perl?).
> > Having never developed in PHP, is there any advice or tips anyone
> > wants to offer?
> > The basic script would be started by cron, register an event
> > handler, and then wait until the handler executed and notified the
> > main thread it was done, or the main thread reached a timeout
> > threshold, deregistered the event handler and exited.
> > I also want to make sure we're running a minimum install of PHP, as
> > it won't be used for HTTP traffic.
> > Thanks, Rick DeBay
> where's the main thread? in some other application? or another thread
> of the PHP script? dunno about threading php Alan