MCPcopy
hub / github.com/travisjeffery/jocko

github.com/travisjeffery/jocko @0.0.1 sqlite

repository ↗ · DeepWiki ↗ · release 0.0.1 ↗
626 symbols 1,641 edges 84 files 113 documented · 18%
README

JOCKO

Kafka/distributed commit log service in Go.

Travis CI Join the chat at https://gitter.im/travisjeffery/jocko

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

  • [x] Producing
  • [x] Fetching
  • [x] Partition consensus and distribution
  • [ ] Protocol
    • [x] Produce
    • [x] Fetch
    • [x] Metadata
    • [x] Create Topics
    • [x] Delete Topics
    • [ ] Consumer group
  • [x] Discovery
  • [ ] API versioning
  • [ ] Replication [current task]
  • [ ] Tests [current task]

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
├── raft          wrapper around Hashicorp's Raft lib to handle consensus
├── serf          wrapper around Hashicorp's Serf lib to handle service discovery
├── prometheus    wrapper around Prometheus' client lib to handle metrics
├── server        API subsystem
└── testutil      test utils
    └── mock      mocks of the various subsystems

License

MIT


Extension points exported contracts — how you extend this code

Decoder (Interface)
(no doc) [38 implementers]
protocol/decoder.go
Encoder (Interface)
(no doc) [38 implementers]
protocol/encoder.go
Body (Interface)
(no doc) [23 implementers]
protocol/request.go
CommitLog (Interface)
CommitLog is the interface that wraps the commit log's methods and is used to manage a partition's data. [2 implementers]
jocko.go
BrokerFn (FuncType)
BrokerFn is used to configure brokers.
broker/option.go
Cleaner (Interface)
(no doc) [1 implementers]
commitlog/cleaner.go
OptionFn (FuncType)
(no doc)
serf/option.go
ResponseBody (Interface)
(no doc)
protocol/response.go

Core symbols most depended-on inside this repo

String
called by 57
protocol/decoder.go
Int32
called by 50
protocol/decoder.go
PutInt32
called by 47
protocol/encoder.go
PutString
called by 45
protocol/encoder.go
Code
called by 42
protocol/error.go
ArrayLength
called by 33
protocol/decoder.go
PutInt16
called by 28
protocol/encoder.go
PutArrayLength
called by 27
protocol/encoder.go

Shape

Method 400
Struct 103
Function 99
Interface 14
FuncType 6
TypeAlias 4

Languages

Go100%

Modules by API surface

protocol/encoder.go54 symbols
jocko.go54 symbols
protocol/decoder.go39 symbols
broker/broker.go28 symbols
broker/broker_test.go26 symbols
commitlog/index.go17 symbols
serf/serf.go16 symbols
commitlog/commitlog.go16 symbols
broker/option.go14 symbols
raft/raft.go12 symbols
protocol/describe_groups_response.go11 symbols
commitlog/segment.go10 symbols

For agents

$ claude mcp add jocko \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact