[cgiapp] Threading Question

Mike Tonks fluffymike at googlemail.com
Tue Nov 17 06:22:59 EST 2009

Hi Folks,

I'm just considering a problem that I think requires a bit of multi-threading.

It's a new one for me so wondered if anyone has advice or experience
of using threading with CGI::Application.

Scenario is: We have 5 database servers at different sites.  We would
like to create a search function that queries all of the databases.
The web server is on an intranet and can open connections to all of
the database servers.

So - I imagine it would be sensible to fire 5 queries on 5 threads,
and wait for them all to return?  Then combine the results in some
way.  The results sets will be fairly small, say no more than 50

Seems likely to be quicker than to fire one, wait for it, fire
another, and so on.

Also I guess there could be server issues with the use of multiple threads?



More information about the cgiapp mailing list