Skip to content

joker452/SimpleRaft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleRaft

This is a cloud-based file storage system which supports file creation, modification and deletion in a distributed manner.

Functionality

Client

Multiple clients can concurrently connect to the server to access a common set of files. Clients will see consistent file states among updates.

Server

Servers communicate with each other through RPC. In order to make different servers in the system have a consistent state, we implement leader election and log replication based on Raft.
Info related to files on the server are composed of two parts:

  1. file data: the content of each file is divided up into chunks, or blocks, each of which has a unique identifier. Server stores blocks, and when given an identifier, retrieves and returns the appropriate block.
  2. metadata: each server holds the mapping of filenames to blocks.

The whole system is tested with the python framework unittest.

How to Run

run client with

python clinet.py <host:port> <base_dir> <block size>

run server with

python server.py <config_file path> <server_num>

Co-Author

Xu wei

Reference

The Raft paper
The Raft simulator

About

Distributed file storage system based on Raft

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages