Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jan 2, 2024
1 parent 2668a4b commit 9e76189
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

⚠️ This library is in a very experimental stage. The API could be broken.

raftify is a high-level implementation of Raft, developed with the goal of making it easy and straightforward to integrate the Raft algorithm.
raftify is a *high-level* implementation of [Raft](https://raft.github.io/), developed with the goal of making it easy and straightforward to integrate the Raft algorithm.

It uses [tikv/raft-rs](https://github.com/tikv/raft-rs) and gRPC for the network layer and [heed](https://github.com/meilisearch/heed) (LMDB wrapper) for the storage layer.

Expand All @@ -12,7 +12,7 @@ I strongly recommend to read the basic [memstore example code](https://github.co

### Define your own log entry

Define the data to be stored in LogEntry and how to serialize and de-serialize it.
Define the data to be stored in `LogEntry` and how to *serialize* and *deserialize* it.

```rust
#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down Expand Up @@ -141,7 +141,7 @@ tokio::try_join!(raft_handle)?;

### Manipulate FSM by RaftServiceClient

If you want to operate the FSM remotely, use the `RaftServiceClient`.
If you want to operate the FSM remotely, use `RaftServiceClient`.

```rust
let mut leader_client = create_client(&"127.0.0.1:60061").await.unwrap();
Expand All @@ -161,7 +161,7 @@ leader_client

### Manipulate FSM by RaftNode

If you want to operate FSM locally, use the RaftNode interface of the Raft object
If you want to operate FSM locally, use the RaftNode interface of the Raft object.

```rust
let mut raft_node = raft.get_raft_node();
Expand All @@ -172,7 +172,7 @@ raft_node.propose(LogEntry::Insert {
}.encode().unwrap()).await;
```

It also provides a variety of other very useful APIs. Take a look at [the document]()
It also provides a variety of other very useful APIs. Take a look at [the document]().

### Debugging

Expand All @@ -182,6 +182,16 @@ Raftify also provides a collection of CLI commands that let you check the data p
$ raftify-cli debug persisted ./logs/node-1
```

```
$ raftify-cli debug node 127.0.0.1:60061
```

### Support for other language

Raftify provides bindings for the following languages.

- [Python](https://github.com/lablup/raftify/tree/main/binding/python)

## References

This library was inspired by a wide variety of previous Raft implementations.
Expand Down

0 comments on commit 9e76189

Please sign in to comment.