Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Peter J. Holzer
March 31, 2008, 8:57 am
rate this thread
Do you want to use threads or fork?
This cannot be done. Not only will the database server get a mixture of
requests from different database clients on the same connection (this
could be solved), but it also has to send back all replies via the same
connection: Which client will receive the response? There is no way to
(There is at least one RDBMS where the client automatically opens a new
connection when it detects a pid change - presumably the new connection
will be pre-authenticated and faster to establish).
Your best bet is probably to use a pre-forked approach like some web
servers. Run a number of your your daemons in parallel, all listening on
the same port. A client connecting to that port will get any of them.
If all are busy, the client has to wait, or a controlling process can
start more worker processes.
- » FAQ 8.5 How do I read just one key without waiting for a return key?
- — Previous thread in » PERL Discussions