Skip to content

ankushbisht01/Distributed-File-Management-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed File Management System

This project implements a basic Distributed File Management System using a client-server architecture. It demonstrates how files can be stored, retrieved, and managed across multiple server nodes, providing a foundation for understanding distributed storage concepts like replication and fault tolerance.

Table of Contents

Project Description

The Distributed File Management System aims to provide a robust way to handle files across multiple storage nodes. The system is designed to allow clients to interact with a central coordinator (or a set of coordinators) that manages the distribution and replication of files among various storage servers. This setup enhances data availability and reliability by storing multiple copies of files across different servers.

Features

  • File Upload: Clients can upload files to the distributed system.

  • File Download: Clients can download existing files from the system.

  • File Deletion: Clients can delete files from the system.

  • File Listing: Clients can view a list of all files stored in the system.

  • Distributed Storage: Files are stored across multiple server instances.

  • Basic Replication (Inferred): The presence of multiple servers (server1, server2) suggests the potential for file replication to ensure data availability and fault tolerance.

Project Structure

The repository is organized into the following main directories:

. ├── client/ # Contains the client-side application logic │ └── client.py # Main client script ├── server1/ # Contains the code and storage for the first server node │ └── server1.py # Main script for server 1 │ └── files/ # Directory where server1 stores its files ├── server2/ # Contains the code and storage for the second server node │ └── server2.py # Main script for server 2 │ └── files/ # Directory where server2 stores its files └── README.md # This README file

Technologies Used

  • Python: The primary programming language used for both client and server applications.

  • Socket Programming (Inferred): Likely used for inter-process communication between clients and servers.

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.x installed on your system.

Installation

  1. Clone the repository:

git clone https://github.com/ankushbisht01/Distributed-File-Management-.git cd Distributed-File-Management-

  1. Create file storage directories: Ensure the files directory exists within each server folder. If not, create them:

mkdir -p server1/files mkdir -p server2/files

Usage

To run the distributed file management system, you need to start the server instances first, and then you can run the client.

Running the Servers

Open separate terminal windows for each server.

  1. Start Server 1:

cd server1 python server1.py

You should see output indicating that Server 1 is listening.

  1. Start Server 2:

cd server2 python server2.py

You should see output indicating that Server 2 is listening.

(Note: If your system uses different ports or IPs, adjust the server scripts accordingly.)

Running the Client

Open another terminal window for the client.

cd client python client.py

The client will connect to the servers and present you with a command prompt.

Client Commands

Once the client is running, you can use the following commands:

  • upload <filename>: Uploads a file from your local client directory to the distributed system.

    • Example: upload my_document.txt
  • download <filename>: Downloads a file from the distributed system to your local client directory.

    • Example: download retrieved_image.jpg
  • delete <filename>: Deletes a file from the distributed system.

    • Example: delete old_report.pdf
  • list: Lists all files currently stored in the distributed system.

  • exit: Disconnects the client and exits the application.

Contributing

Contributions are welcome! If you have suggestions for improvements, bug fixes, or new features, please open an issue or submit a pull request.

License

This project is open source and available under the MIT License.

Contact

Ankush Bisht - ankushbisht01

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages