PDA

View Full Version : Multiclient server including database access



tma
29th June 2012, 09:01
Hello,

I've built a multithreaded TCP socket server that creates and handles the database work with a new MySql-connection for each thread/TCP client. This works well for a few clients but (as I probably should have known before doing the design) it does not scale very well when I start having hundreds of simultaneous connections going on....

I have decided to changed the socket server part to use asynchronous handling of the client data transfers (to stop wasting the threading model overhead).
But how do I handle the database work in the best possible way in the new design?

Regards,
tma