Go to file
kayos@tcp.direct b839b0c961
PAWG5 PAWG5 PAWG5 PAWG5 PAWG5
2023-08-31 22:35:57 -07:00
cmd/pawg5 PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
server PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
.gitignore PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
LICENSE PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
LICENSE.old Refactored and stripped down to work with bitcask backend 2019-03-20 18:18:33 +10:00
LICENSE.prologic PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
README.md PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
go.mod PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00
go.sum PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 2023-08-31 22:35:57 -07:00

pawg5

Go Report Card GoDoc

a P.A.W.G rub pogreb distributed key/value store using raft for concensus with a redis compatible API

based off of kvnode and bitraft (See LICENSE.old and LICENSE.prologic)

  • redis compatible API
  • pogreb disk-based storage
  • Raft support with finn commands
  • compatible with existing Redis clients (probably?)

works like you'd expect prolly

SET key value
GET key
DEL key [key ...]
KEYS pattern
FLUSHDB
SHUTDOWN

back that (p)hat (a)ss [up] (w)hite (g)irl, [on] (5)

RAFTSNAPSHOT

this will creates a new snapshot in the data/snapshots directory. Each snapshot contains two files, meta.json and state.bin. the state file is the database in a compressed format. The meta file is details about the state including the term, index, crc, and size.

ideally you call RAFTSNAPSHOT and then store the state.bin on some other server like S3.

To restore:

  • create a new raft cluster
  • download the state.bin snapshot
  • pipe the commands using the pawg5 --parse-snapshot and redis-cli --pipe commands

Example:

pawg5 --parse-snapshot state.bin | redis-cli -h 10.0.1.5 -p 4920 --pipe

this will execute all of the state.bin commands on the leader at 10.0.1.5:4920

for information on the redis-cli --pipe command see Redis Mass Insert.