On 29-Aug-2006 David Narayan wrote:
> At a high level, I am trying to connect to many hosts and run the same
> command in a non-blocking fashion. The caveat is that not only are
> connections non-blocking, but some X number of them are simultaneous.
> 
> Since the point of the application is essentially to do the same thing
> on many hosts, I was hoping to just create a single PoCo::Generic
> object and have some number of children (of the same object) be used
> for the simultaneous bits.  It seemed like overkill to have to
> recreate essentially the same object over and over.

PoCo::Generic is not the place to implement such a feature.  Create a wrapper
around PoCo::Generic or use PoCo::JobQueue.
http://search.cpan.org/~rcaputo/POE-Component-JobQueue-0.55/

If you feel that creating a new process for each new SSH connection is bad, you
could write a better POE::Component::Generic::Net::SSH2 that would allow the
child to create other Net::SSH2 connections after the first is closed.

-Philip

Reply via email to