This project is a Distributed File System developed in C using UNIX socket programming. It simulates a real-world system where files are routed and stored based on their type, all through a centralized interface. Below are the key highlights:
-
๐ Modular Server Architecture
S1
: Main server that handles client requests and routes filesS2
: Stores.pdf
filesS3
: Stores.txt
filesS4
: Stores.zip
files
-
๐ป Client Interface (
w25clients
)- Command-line based client tool
- Interacts only with
S1
, unaware of other servers - Allows upload, download, delete, list, and tar operations
-
๐ Concurrent Processing
S1
usesfork()
to serve multiple clients simultaneouslyS2
,S3
,S4
use threads (pthreads
) for parallel handling of requests
-
๐ง Intelligent File Routing
.c
files are stored directly in~/S1
.pdf
,.txt
, and.zip
files are forwarded toS2
,S3
, andS4
respectively- Non-
.c
files are deleted fromS1
after being forwarded
-
๐ File Operations Supported
uploadf <filename> <~S1/path>
downlf <~S1/filepath>
removef <~S1/filepath>
dispfnames <~S1/dir>
downltar <filetype>
-
๐ Core Concepts Demonstrated
- Socket programming
- Inter-process and multi-threaded communication
- File I/O and directory management
- Distributed system behavior using local simulation
This project is ideal for understanding system-level programming and networking in a Linux environment. It provides hands-on experience with real-world tools like sockets, processes, threads, and file systems.