hi, pooling connections seems to be a standard way of eliminating the cost
of getting them on the fly. so i coded up a simple console app that pools
*threads* with connections to a mysql database (which is multithreaded). i
seemed to get about a 10x improvement (over a dialup line) by placing 100
queries into a queue that has 20 threads (that already have a connection)
emptying the queue (compared with placing 100 queries into a queue that has
1 thread with a connection emptying the queue).

this seems like a remarkable speedup - almost too good to be true (am i
doing something wrong?). for the test, i canned each "query" as 3 simple
queries. are result like this typical?

they currently use a cgi script to fork a process that queries the database
(apache on linux). other than having jsp by hunter and crawford, i am
ignorant of servlets (as well a databases).

the idea is to have the servelet call the pooling logic thus avoiding a
fork and getting a connection as well as running the queries as fast as
possible. has this type of thing been done? does anyone have any examples
or pointers? (i've found a few examples that pool connections, but none
that pool threads with connections)

thanks

Ray (will hack java for food) http://home.pacbell.net/rtayek/
hate Spam? http://www.blighty.com/products/spade/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to