This project implements a distributed messaging system consisting of a centralized Registry and multiple Messaging Nodes. The system builds a logical overlay network over TCP, where nodes communicate by routing packets along a Minimum Spanning Tree (MST) computed from dynamic link weights.
The system ensures reliable, loop-free message delivery and provides detailed traffic summaries to verify data integrity across the entire distributed environment.
Handles:
- Node registration and de-registration.
- Randomized link weight assignment (1-10).
- Orchestrating the connection topology to prevent network partitions.
- Aggregating global traffic statistics.
Responsible for:
- Establishing server sockets and managing concurrent TCP connections.
- Computing the MST rooted at themselves to determine routing paths.
- Relaying packets en route to their final destination.
- Maintaining long-integer summations of payloads to verify data integrity.
- Language: Java (Standard Edition)
- Networking: TCP/IP (Sockets & ServerSockets)
- Concurrency: Multi-threaded message handling and relaying.
- Algorithms: Minimum Spanning Tree (MST), Breadth-First Search (BFS) for tree visualization.
- Data Integrity: Validated via global summation of 32-bit random integer payloads.
- Start the Registry:
java csx55.overlay.transport.Registry [port]
- Start Messaging Nodes (on different terminals or machines):
java csx55.overlay.transport.MessagingNode [registry-host] [registry-port]
- Setup the Network:
In the Registry CLI, run:
setup-overlay 4(Sets 4 connections per node)send-overlay-link-weightsstart 5000(Initiates 5000 rounds of messaging)