travisjeffery / jocko

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)

Home Page:https://twitter.com/travisjeffery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Commit log Raft backend

travisjeffery opened this issue · comments

Right now I'm using bolt for the Raft backend. But we could use Jocko's own commit log implementation for the backend. Would remove a dep and make things more consistent.

This entails writing this: https://github.com/hashicorp/raft-boltdb, with https://github.com/travisjeffery/jocko/tree/master/commitlog.

@travisjeffery 👋 I had a look at implementing this here but didn't get too far.

The CommitLog can't currently delete a range, so the tests (that I copied from raft-boltdb) for the LogStore implementation are failing. I was going to just delete from the upper index, but that could have bad consequences.
https://github.com/Mongey/jocko/blob/c0a90d8b143b785e76721013b74592bbd6eb98fc/commitlog/log_store.go#L52-L54

StableStore looks like a KV store, I'm not quite sure how that'd be implemented with CommitLog, unless we had a commit log per key, or if we implemented a kafka-streams style KTable on top of the CommitLog.

🤔 I've only started looking at the codebase, so maybe there's something obvious that I'm missing

@Mongey cool, thanks. Yeah I knew I'd have to change the commit log API or wrap it. I'll have to look into it some more to figure out what to do about the StableStore.