G
Guest
Im starting now to write a big chat server that is built to hold a max of
1000 users.
Im having a trouble to find the best way to hold this users...
i have 2 ideas, one is to create a thread for each user
and each user thread socket will read/write in a blocking mode.
or to create 25 threads which is the max of the thread pool
and each thread will handle up to 40 socket asynchronously..
this way thread pool will work efficiently..
what to do ??
1000 users.
Im having a trouble to find the best way to hold this users...
i have 2 ideas, one is to create a thread for each user
and each user thread socket will read/write in a blocking mode.
or to create 25 threads which is the max of the thread pool
and each thread will handle up to 40 socket asynchronously..
this way thread pool will work efficiently..
what to do ??