JT Smith wrote:
Yup, I've actually already done it that way with both Parallel::ForkManager in one instance and Proc::Queue as an alternative. I added in event handling with both Event and Event::Lib as seperate trials. All those implementations were relatively easy to do. But the question becomes, why? If everything else is running in Apache, why start a seperate service to run these tasks? And again, I said I want to go crazy. Let's not figure out how else we could do that (I already know that), but how could we do it using Apache?

Here at mailchannels.com we have first used mp2 to handle the email traffic shaping entirely inside mod_perl2, but the nature of our product is so different from serving HTTP, it just won't scale (mostly memory-wise, but also too many processes). We have now switched to having Event::Lib (over libevent) doing all the non-blocking IO and using mp2's protocol handler to do blocking IO (like network-bound operations). The performance is just amazing, hardly any memory used and we can easily handle a thousand concurrent connections on very low-end hardware.

Switching to event based flow was a challenge, since you no longer have the normal logic flow. But we have written a few abstraction layers and now it's almost easy. We are planning to release our AsyncIO abstraction module on CPAN once we have some spare resources.

I highly recommend Event::Lib, at least for its wonderful maintainer: Tassilo von Parseval, who's a great perl/C/XS expert and who is resolving any problems with Event::Lib almost as soon as we are posting the bug reports. I wish more CPAN authors were as responsive as Tassilo is :)

--
_____________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED]  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/

Reply via email to