A distributed chat server system supporting multiple chat rooms with different message ordering guarantees. The system consists of servers and clients, where each client connects to one server, and servers communicate with each other using UDP-based multicast.
Server Capabilities:
- Supports multiple chat rooms (minimum 10)
- Handles up to 250 clients total
- Implements three ordering modes:
- Unordered multicast
- FIFO multicast
- Totally ordered multicast
- Static membership configuration
- Verbose logging option (-v)
Client Features:
- Connection to single server
- Command-line interface
- Nickname support
- Room management
Prerequisites
C++ compiler
Make build system
UDP socket support
bash make
bash ./chatserver <config_file> <server_index> [-v] [-o <ordering_mode>]
Ordering modes:
unordered (default)
fifo
total
bash ./chatclient <server_address:port>
Without Proxy
text
127.0.0.1:5000 127.0.0.1:5001 127.0.0.1:5002
With Proxy
text
127.0.0.1:8000,127.0.0.1:5000 127.0.0.1:8001,127.0.0.1:5001 127.0.0.1:8002,127.0.0.1:5002
Automated Testing Use the provided stress tester:
bash
./stresstest -o <ordering_mode> -m <messages> -c <clients> -g <groups> <config_file>