Hi, guys.
I’m working on a project of simple network game server. The point is: the server can host several game sessions. For example: 20 users can play chess simultaneously on 10 boards.
I’ve come to an issue that seems nontrivial to me. I’m making decision between single-threaded architecture vs thread-pool architecture of turn processing. The point is: single threaded architecture is far easier to implement (you don’t have to care about synchronization) but thread-pools looks like more robust. For example if (for some weired reason) turn processing took more then usual for one board: then all boards will suffer from delay (because all requests are processed in one thread). There’s no such problem with thread-pools.
Tomcat uses thread pools to process requests. HSQLDB uses single-threaded architecture.
I’m bit confused, plz help.