You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kayos@tcp.direct b839b0c961
PAWG5 PAWG5 PAWG5 PAWG5 PAWG5
1 month ago
cmd/pawg5 PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
server PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
.gitignore PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
LICENSE PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
LICENSE.old Refactored and stripped down to work with bitcask backend 5 years ago
LICENSE.prologic PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
README.md PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
go.mod PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago
go.sum PAWG5 PAWG5 PAWG5 PAWG5 PAWG5 1 month ago

README.md

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.