The class MessagingServer is responsible for network communication among clients and server replicas. It does socket programming.
For now, it creates new Sockets for each message to send, which results in big performance issue.
To fix: create and store a (bidirectional) connection between each client and each server replica. All the messages involving a pair of client and server are sent via the single connection between them.
The class MessagingServer is responsible for network communication among clients and server replicas. It does socket programming.
For now, it creates new Sockets for each message to send, which results in big performance issue.
To fix: create and store a (bidirectional) connection between each client and each server replica. All the messages involving a pair of client and server are sent via the single connection between them.