The stupid question is the question not asked | |
PerlMonks |
Re: How to do parallel processing within mod_perlby jbert (Priest) |
on Nov 12, 2007 at 14:05 UTC ( [id://650271]=note: print w/replies, xml ) | Need Help?? |
An alternative (since you are working over your own socket layer) would be to use non-blocking sockets.
You could then dispatch your request to each db and select on your socket connections, collecting replies as they come back. Timeouts fall out of this fairly easily too, but you'll need to be careful if you subsequently re-use a socket and get a response to a timed-out query. There are various wrappers around this. You can use IO::Socket and IO::Select as a starting point, but there are probably higher-level modules. Anyone else got any ideas? So something like this:
In Section
Seekers of Perl Wisdom
|
|