Skip to content
University of Manchester

Distributed Messaging System

Fault-Tolerant Chat Server and Hospital Messaging Client in Python

PythonTCP SocketsThreading

Completed across two related University of Manchester courseworks covering distributed systems and networking. The first deliverable was a general-purpose multi-client chat server; the second extended the concepts into a structured hospital communications protocol with message routing between wards.

The Problem

Building reliable messaging over raw TCP requires handling connection drops, partial reads, concurrent clients, and protocol framing — all without the scaffolding that higher-level frameworks provide.

The Approach

Used Python's socket and threading libraries to implement a non-blocking concurrent server. Designed a lightweight message framing protocol (length-prefixed payloads) to handle partial TCP reads. The hospital client added routing logic with named channels (wards) and message persistence.

The Outcome

Both systems passed all functional tests, handling concurrent connections cleanly and recovering gracefully from client disconnections. Demonstrated solid understanding of TCP internals and distributed state coordination.

Distributed Messaging System