Skip to content

About

Multithreaded socket-based replicated file server with graceful disconnection, thread safety, and partial failure handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replicated File Server using Multithreaded Socket Programming

Overview

This project implements a replicated file server using multithreaded socket programming. A master server receives a file upload from one client and replicates it to all other connected clients.


Problem Statement

  • Implement a parallel programming problem using multithreaded socket programming.
  • Handle graceful disconnection
  • Manage partial failures
  • Ensure thread safety when multiple clients update shared server data
  • Implement proper connection teardown
  • Detect when all clients have finished
  • Shut down the master server cleanly

Architecture

Client 1 uploads file
        ↓
Master Server
        ↓
Replicates file to all other clients
        ↓
Client 2, Client 3, Client N

Concepts Demonstrated

  • Socket programming
  • Multithreading
  • Distributed file replication
  • Server-client architecture
  • Thread synchronization
  • Failure handling
  • Connection teardown
  • Parallel programming

Technologies Used

  • Python
  • Socket Programming
  • Multithreading
  • File I/O
  • Test scripts

How to Run

1. Start the master server

python server.py

2. Start clients in separate terminals

python client.py

3. Run tests

python test.py

Update command names according to your actual file names.


Author

Arfa Riaz BS Computer Science COMSATS University Islamabad, Lahore Campus

About

Multithreaded socket-based replicated file server with graceful disconnection, thread safety, and partial failure handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages