Skip to content

feature: raft nodes networking

Alexey Protsenko requested to merge raft-network into master

This patch allows two nodes to communicate over the net.box.

It consists of two major parts:

  1. traft::ConnectionPool implements async communication on the client-side.
  2. C stored procedure raft_interact handles server-side.

The third commit addresses parsing --peer command-line args.

Run it in two separate terminal windows:

PICODATA_RAFT_ID=1 cargo run -- run --listen 3301 --data-dir tmp/3301 --peer 127.0.0.1:3301,127.0.0.1:3302
PICODATA_RAFT_ID=2 cargo run -- run --listen 3302 --data-dir tmp/3302 --peer 127.0.0.1:3301,127.0.0.1:3302

Close https://gitlab.com/picodata/picodata/picodata/-/issues/17, https://gitlab.com/picodata/picodata/picodata/-/issues/18

Edited by Alexey Protsenko

Merge request reports