in reply to Re: Apache or Daemon in Perl ?
in thread Apache or Daemon in Perl ?
I have to agree with Corion's design here.
collector (mod_perl) -> MySQL -> sender (LWP?)
Use a mod_perl handler with persistent database connections (ala Apache::DBI) to write the incoming info to a suitably fast database (like MySQL). Have a separate daemon written in Perl (or something compiled if performance dictates) that reads from the DB and sends the responses.
Make sure the DB stores timestamps for request received and response transmitted. Your sending daemon fetches a 'worklist' by querying for records w/o transmitted timestamp. The table can be archived/summarized/cubed periodically during slow periods. If there are no slow periods, you might need to investigate 'breaking-the-mirror' type solutions to get an offline snapshot for reporting.
--Solo
--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
|
|---|