Currently, the chatroom server uses a Semi NIO (Non-Blocking IO) socket system that doesn’t have any form of thread pool but rather creates a thread per connection. Whereas this approach can work for now, it is extremly unscalable and can cause expensive CPU usage when loads of clients are connecting.
Solutions
A few solutions are possible:
Remake the socket server from scratch and using Java’s NIO package
Remake of the socket server from scratch and using a thread pool system.
Vulnerability
Currently, the chatroom server uses a Semi NIO (Non-Blocking IO) socket system that doesn’t have any form of thread pool but rather creates a thread per connection. Whereas this approach can work for now, it is extremly unscalable and can cause expensive CPU usage when loads of clients are connecting.
Solutions
A few solutions are possible: