Jocko

在 Golang 中实现的 Kafka,具有内置的协调性(无需 ZK 部署,单一二进制安装,云原生)。「Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)」

Github stars Tracking Chart

Jocko

ci
gitter
codecov

Kafka/distributed commit log service in Go.

Goals of this project:

  • Implement Kafka in Go
  • Protocol compatible with Kafka so Kafka clients and services work with Jocko
  • Make operating simpler
  • Distribute a single binary
  • Use Serf for discovery, Raft for consensus (and remove the need to run ZooKeeper)
  • Smarter configuration settings
    • Able to use percentages of disk space for retention policies rather than only bytes and time kept
    • Handling size configs when you change the number of partitions or add topics
  • Learn a lot and have fun

TODO

  • Producing
  • Fetching
  • Partition consensus and distribution
  • Protocol
    • Produce
    • Fetch
    • Metadata
    • Create Topics
    • Delete Topics
    • Consumer group [current task]
  • Discovery
  • API versioning [more API versions to implement]
  • Replication [first draft done - testing heavily now]

Hiatus Writing Book

I’m writing a book for PragProg called Building Distributed Services with Go. You can sign up on this mailing list and get updated when the book’s available. It walks you through building a distributed commit log from scratch. I hope it will help Jocko contributors and people who want to work on distributed services.

Reading

Project Layout

├── broker        broker subsystem
├── cmd           commands
│   └── jocko     command to run a Jocko broker and manage topics
├── commitlog     low-level commit log implementation
├── examples      examples running/using Jocko
│   ├── cluster   example booting up a 3-broker Jocko cluster
│   └── sarama    example producing/consuming with Sarama
├── protocol      golang implementation of Kafka's protocol
├── prometheus    wrapper around Prometheus' client lib to handle metrics
├── server        API subsystem
└── testutil      test utils
    └── mock      mocks of the various subsystems

Building

Local

  1. Clone Jocko

    $ go get github.com/travisjeffery/jocko
    
  2. Build Jocko

    $ cd $GOPATH/src/github.com/travisjeffery/jocko
    $ make build
    

    (If you see an error about dep not being found, ensure that
    $GOPATH/bin is in your PATH)

Docker

docker build -t travisjeffery/jocko:latest .

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

License

Jocko is under the MIT license, see the LICENSE file for details.


Main metrics

Overview
Name With Ownertravisjeffery/jocko
Primary LanguageGo
Program languageGo (Language Count: 4)
PlatformDocker, Linux, Mac, Windows
License:MIT License
所有者活动
Created At2016-10-11 00:09:47
Pushed At2023-11-13 02:21:21
Last Commit At2020-12-26 21:55:36
Release Count1
Last Release Name0.0.1 (Posted on )
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count5k
Watchers Count226
Fork Count363
Commits Count532
Has Issues Enabled
Issues Count87
Issue Open Count48
Pull Requests Count47
Pull Requests Open Count12
Pull Requests Close Count37
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private