Storage Node with Replication for Object Storage that recieves tasks from LoadBalancer and performs the operations Create/Delete Buckets and Create/Update/Delete Files.
Implementation of the characterstics of Amazon Dynamo Paper like Consistent Hashing, Sloppy Quorum and Hinted Handoff as REST based Object storage service.
- Python 3
- Cloud Load Balancer Repository
- List of Neighboring/All Nodes and their addresses available in the system depending on the Replication Factor assigned in Load Balancer conf file.
- Clone the Storage repo into all the available Storage Nodes and follow the below instructions in each node
- Create a virtualenv
StorageNode
and activate it. If you do not have virtualenv installed, install it. (Installation: Windows, Linux & MAC OS) - In the project home folder, Install the necessary packages using the command
pip install -r requirements
. - Create
conf.py
incloud
folder. - Add the following code to
conf.py
NODE_NAME = <Name of the Storage Node> AVAILABLE_NODES = [{<Each neighboor node name as key and its corresponding address as its value>}]
- Execute the following command to apply migrations:
python manage.py migrate
. - To run the server on local IP assigned with default port, execute the command
python manage.py runserver 0.0.0.0:8000
.
This REST API doesn't have any authentication. To access this API, send a POST request using any request managers like Postman to specified address given below to the loadbalancer's address.
- Create Bucket:
- URL:
/create/bucket/
- Request Body: 'name' = - Result:{status: <Success/Failure>, node: <Node at which the bucket was created>}
- Delete Bucket:
- URL:
/delete/bucket/
- Request Body: 'name' = - Result:{status: <Success/Failure>, node: <Node at which the bucket was deleted>}
- Create File:
- URL:
/create/file/
- Request Body: 'name' = , 'bucket' = , 'file' = - Result:{status: <Success/Failure>, node: <Node at which the file was created>, vector_clocks: {<Vector Clock of each node after file creation>}}
- Update File:
- URL:
/update/file/
- Request Body: 'name' = , 'bucket' = , 'file' = - Result:{status: <Success/Failure>, node: <Node at which the file was updated>, vector_clocks: {<Vector Clock of each node after file updation>}}
- Delete File:
- URL:
/delete/file/
- Request Body: 'name' = , 'bucket' = - Result:{status: <Success/Failure>, node: <Node at which the file was deleted>}
You can learn more about APIs and how to use them here.