Subject Re: [firebird-support] Event notification through ODBC or Linux app - use PHP?
Author Milan Babuskov
Alan McDonald wrote:
> Perl and PHP type connection environments are very short lived by nature.
> you connect - do some work and disconnect. If you are disconnected, you are
> no registered for an event. So you connect, register, do some work,
> unregister and/or disconnect. You spend more time disconnected (unregistered
> for an event) than you do connected and registered.
> Are there environments in perl/php which rely on holding/looping states
> which allow persistent connections long enough for registering against
> events to make sense?

There is. I wrote a custom replication software using PHP and Firebird.
Users at remote sites run the script manually. It runs in shell, and
synchronizes the data. The current version does not use events as event
support wasn't available when I wrote it. Anyway, there is a lot of
data, and it is sometimes run through slow dial-up modem, so script
could take hours to complete. I could foresee the need for events
sometimes (instead of polling values from database constantly).

One could write a real replication software using PHP, the same way it
is done in C++, Java, Delphi or whatever. There isn't much difference.

Also, there is PHP-gtk wrapper, using which you can write GUI apps with
PHP. So, even though it is not common, there are possible uses.

Milan Babuskov