Re:Creator of Raft Algorithm introduces LogCabin
by alexnewman on Tuesday May 05, 2015 @12:52AM
(#9490897)
Congrats, how does compaction work? I assume you can serve kvs from memory?
[ Parent
| on HN ]
Re:Creator of Raft Algorithm introduces LogCabin
by ongardie on Tuesday May 05, 2015 @12:56AM
(#9490913)
Compaction in LogCabin uses a snapshotting approach. It writes a header to a snapshot file, then forks off a child process to write the data into a snapshot. The data is just each node in the tree serialized as a protobuf using a pre-order traversal, IIRC. Much more detail on compaction [1] mentioning LogCabin explicitly.
LogCabin does currently keep all data in memory, so it never touches disk for read requests. It also keeps a copy of the entire log in memory for now, but I hope to address that eventually [2].
Re:Creator of Raft Algorithm introduces LogCabin
by alexnewman on Tuesday May 05, 2015 @12:53AM
(#9490900)
Oh and can I call this from c easily?
Re:Creator of Raft Algorithm introduces LogCabin
by ongardie on Tuesday May 05, 2015 @12:58AM
(#9490916)
There's not currently an extern "C" wrapper, but I don't think that'd be too much work to write.
Re:Creator of Raft Algorithm introduces LogCabin
by alexnewman on Tuesday May 05, 2015 @12:55AM
(#9490908)
Oh and can I stop using zk now?