On Mon, Sep 22, 2014 at 12:17 PM, Chanan Berler <[email protected]> wrote:
> Hello All, > > I need to create a module that opens a persistent SSH connection between X > servers > and send same system commands to all of them. > > I have used Net::OpenSSH to open a persistent connection to a list of > servers > and send them the same request. I then wrapped the module that handles the > request with HTTP::Server::Simple::CGI that made it as a demon that awaits > request. > > Problem: demon is a single thread request, therefore if i have 2 requests > comming > they will wait for the first to end. I have made a simple test creating 2 > is_alive requests > one sleeps for 10sec the other does not. I then restarted and send 2 > different request > and noticed that the second request awaits for the first request :( > > Q1: is there any Server like Simple I can use? instead of > HTTP::Server::Simple::CGI > You might want to take a look at https://metacpan.org/pod/Net::Server or https://metacpan.org/pod/AnyEvent I have bunch of articles about them at http://perlmaven.com/ , but most of those for paying subscribers. > Q2: if i want to use apache as my web server, is there any way to create a > module > that loads once and can be accesses to all requests calling index.pl ? > > > As CGI I doubt. As mod_perl maybe. Using a separate server and using Apache as a reverse proxy: most probably. Gabor
_______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
