hasanimran96/Distributed-File-System — reverse-engineered prompt
Reverse engineered prompt
Build me a Python distributed file system simulation for a class project. I want to be able to run three server processes and one or more clients, either on separate machines or on localhost with different ports.
From the client, a user should connect to any server and use simple commands to list, create, read, write, append, and delete files. The user shouldn’t need to know which server actually has the file. If the file is somewhere else, the system should automatically find it or redirect the client.
Files should be stored in each server’s own Root folder, and the servers should keep a shared list of where files live. When a file is created, copy it to another server too, and keep replicas updated after writes or appends. Support basic text, C, and Python files.
Please make it runnable from the terminal with clear setup instructions, using Python 3 sockets and threads. Include simple client commands and make sure multiple clients can connect safely at the same time.
Want more depth? Deep Reverse