Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the POE-Component-NonBlockingWrapper-Base CPAN distribution.

Report information
The Basics
Id: 55097
Status: rejected
Priority: 0/
Queue: POE-Component-NonBlockingWrapper-Base

People
Owner: Nobody in particular
Requestors: hinrik.sig [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Use an external program instead of forking
I have a POE::Component::IRC bot in which I was using your GoogleCalculator plugin, but I decided to stop using it when I realized that the POE component behind it uses a POE::Wheel::Run which forks. This is not very appealing for long-running applications. My IRC bot already takes 38MB of RAM without the calc plugin and I don't want the memory usage to more than double just by loading that one little plugin. I realize that POE::Component::WWW::Google::Calculator doesn't use POE::Component::NonBlockingWrapper::Base but you probably have plans to make it do that eventually, which is why I'm filing the bug here. I suggest you look into wrapping the non-blocking modules with a POE::Wheel::Run which executes an external program. You could use POE::Component::Generic and enable its 'alt_fork' option which does exactly that. Or you could roll your own. I recently ported one of my own POE components to do this: http://github.com/hinrik/poe-component-hailo/blob/master/lib/POE/Component/Hailo.pm
I really don't understand what you're suggesting. My module uses POE::Wheel::Run; and then you suggest that I use POE:Wheel::Run but execute a program instead of a code? Lost me here.. and in either case "POE::Wheel::Run executes a program or block of code in a subprocess, created the usual way: using fork" POE::Component::Generic is not suitable for my needs, which is why this module was created. I have a bot that uses 90% of my POE modules and I've just checked its memory usage is 31MB after 4days 18 hours uptime....