Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jan 3, 2024
1 parent e2544f7 commit 621f3fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl HashStore {
}
}


#[async_trait]
impl AbstractStateMachine for HashStore {
async fn apply(&mut self, data: Vec<u8>) -> Result<Vec<u8>> {
Expand Down
14 changes: 12 additions & 2 deletions binding/python/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# raftify-py

Python binding of *raftify*.
⚠️ This library is in a very experimental stage. The API could be broken.

Python binding of [*raftify*](https://github.com/lablup/raftify).

## Quick guide

Expand All @@ -27,7 +29,9 @@ class SetCommand:

### Define your application Raft FSM

Only 3 methods need to be implemented for the Store.
Essentially, the following three methods need to be implemented for the `Store`.

And similarly to `LogEntry`, you need to implement `encode` and `decode`.

- `apply`: applies a commited entry to the store.
- `snapshot`: returns snapshot data for the store.
Expand Down Expand Up @@ -106,6 +110,12 @@ await raft_node.propose()

### Debugging

Raftify also provides a collection of CLI commands that let you check the data persisted in lmdb and the status of Raft Server.

```
$ raftify_cli debug persisted ./logs/node-1
```

```
$ raftify_cli debug node 127.0.0.1:60061
```

0 comments on commit 621f3fa

Please sign in to comment.