A multi-node data transfer framework for Linux leveraging Apache Kafka to enable seamless distributed file operations. This system provides secure file uploads, downloads, and management across distributed nodes with built-in authentication.
This project implements a distributed file storage system with the following key features:
- User Authentication
- File Operations: Upload, Download, Delete, and Listing
- Multi-Client Support
- Asynchronous File Handling using Kafka
The system comprises three primary components:
- Kafka Server: Responsible for file storage, management, and request handling.
- Kafka Client: Acts as the user interface for file operations.
- Kafka Configuration: A centralized module for shared configuration settings.
project_root/
├── kafka_server.py # Server implementation
├── kafka_client.py # Client implementation
├── kafka_config.py # Shared configuration
├── id_passwd.txt # User credentials
└── server_storage/ # Server-side file storage
└── {username}/ # User-specific directories
Ensure the following are installed:
- Python 3.7+
- Apache Kafka
- Python Libraries:
kafka-python
json
base64
For installation of kafka, follow the steps in the following link:
Run the server to handle file requests:
python kafka_server.py
Launch the client to perform file operations:
python kafka_client.py
Command | Description |
---|---|
UPLOAD filename |
Uploads a file to the server |
DOWNLOAD filename |
Downloads a file from the server |
DELETE filename |
Deletes a file from the server |
VIEW |
Lists all files in the user's storage |
EXIT |
Exits the client application |
User credentials are stored in id_passwd.txt
in the format:
username:password
- Username: User1, Password: 1234
- Username: User2, Password: 6789
The server (kafka_server.py
) handles:
- Authentication
- File storage and directory management
- Multi-threaded processing of requests
- File operations (upload, download, delete, view)
The client (kafka_client.py
) provides:
- An intuitive user interface for file operations
- Authentication validation
- File transfer functionalities
The shared configuration (kafka_config.py
) includes:
- Kafka broker settings
- Topic configuration
- Utilities for Kafka producer/consumer creation
- Password Protection: Currently transmitted as plain text; should be enhanced for production.
- File Encoding: Base64 encoding during transfers.
- User Segregation: User-specific storage directories ensure isolation.
- Authentication: Required for all file operations.
- Secure Password Hashing: Use robust algorithms like bcrypt.
- File Encryption: Ensure secure transfers with encryption protocols.
- File Chunking: Support large file transfers in chunks.
- Versioning: Maintain multiple versions of uploaded files.
- Real-Time Synchronization: Enable automatic file synchronization across nodes.
- File Sharing: Allow inter-user file sharing.
The system handles the following errors gracefully:
- File not found
- Authentication failures
- Network issues
- Invalid commands
- Insufficient storage permissions
We welcome contributions! Feel free to submit issues, enhancement requests, or code contributions.
For queries, contact:
📧 [email protected]