github.com/HimanshuSardana
← home

Building a minimal Kafka clone in Go

For camus I wanted to actually understand Kafka, not just use it. So I re-implemented the core: topics, partitions, an append-only log, and consumer groups.

What I built

Lessons

// sketch: append to a partition log
func Append(batch []Record) (int64, error) {
    // lock, encode, fsync in batches
    return baseOffset, nil
}

Repo: github.com/HimanshuSardana/camus