Skip to content

wojiaodoubao/raft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A key-value store system based on raft.

1. Enviroment
* UNIX System.
* JDK 1.8.
* Maven 3.0.5 or later.

2. Configuration
The configuration file locates at **src/main/resources/config.xml**. It will be auto-packed to the jar.

3. How to build
```mvn assembly:assembly -DskipTests```

4. Start a local cluster
* Copy the tar package generated by last step to your working dir

   ```cp target/raft-project-1.0-SNAPSHOT.tar.gz ${YOUR_WORKING_DIR}```

* Un-tar the package

  ```cd ${YOUR_WORKING_DIR}```

  ```tar xvf raft-project-1.0-SNAPSHOT.tar.gz```

* Go to the bin dir

   ```cd raft-project-1.0-SNAPSHOT/bin```

* Start 3 servers respectively
  ```sh raft.sh 0```
  ```sh raft.sh 1```
  ```sh raft.sh 2```

* Play with the cluster
  ```sh client.sh set hello world```
  ```sh client.sh get hello```

About

A key-value store system based on raft.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published