Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajaykumar4/distributed_file_system
https://github.com/ajaykumar4/distributed_file_system
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ajaykumar4/distributed_file_system
- Owner: ajaykumar4
- Created: 2017-11-29T14:29:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-16T01:36:00.000Z (about 7 years ago)
- Last Synced: 2024-11-21T06:19:43.728Z (2 months ago)
- Language: Python
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Distributed_File_System
To run the Distributed_File_System, First need to Run dfs_server followed by dfs_client. The dfs_server and dfs_client code can be executed using an IDE such as PyCharm, or by performing in the terminal . dfs_client code can be executed multiple time in the different terminal.
To run the Server in Python 3.6+
python ./dfs_server.py
To run the Client in Python 3.6+
python ./dfs_client.py
There are a number of commands that can be run on the client that will have suitable responses returned by the server
ls - list files and directories in the current directory
ls directorypath - list files in specified directory
cd directorypath - move to specified directory
up - move up one directory
read filepath - read the contents of a file
write file_name - writes file from current directory on local machine to the current directory on the remote server
mkdir filename - make a directory at the following path
rmdir filename - delete a directory and its contents
lock filename - locks the specified file
release filename - releases a specified file
exit - exit the client
Following Features are implemented :
+ Distributed transparent file access
+ Directory Service
* The current position of each client is stored in their object on the server. There are functions that resolve paths
+ Caching (in the client)
* a list of recently viewed items is stored
* a thread is charged with making sure items are discarded after a set period of time.
+ Locking
* Items being written to or deleted require a lock
* Locks are stored in a list on the server
* A thread has the task of checking that all of the locks have an owner who is active on the server. This process runs every minute.
+ Logging
* All events are logged on the server and can be viewedthreadpool.py file is downloaded from
http://code.activestate.com/recipes/577187-python-thread-pool/