travisjeffery / jocko

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)
https://twitter.com/travisjeffery
MIT License
4.9k stars 364 forks source link

How you can contribute today #48

Open travisjeffery opened 6 years ago

travisjeffery commented 6 years ago

Thank you for wanting to hack on Jocko and for your contributions.

Why you should hack on Jocko:

Be sure to join the #jocko room in the Gopher's Slack.

Some tracts of work you can hack on:

Tests

Who should work on this? If you want something to get started hacking, something quick, and learn how Jocko works.

API versioning

Who should work on this? After you've hacked on tests and know Jocko's code, this is the next step.

Consumer groups

Who should work on this? Don't go here unless you've got the time and desire to dig deep. This is a good chunk of work.

Replication

How to hack on Jocko

Example:

# Spin up a cluster
$ go run cmd/jocko/main.go --debug \
          --logdir="/tmp/jocko1" \
          --brokeraddr=127.0.0.1:9001 \
          --raftaddr=127.0.0.1:9002 \
          --serfaddr=127.0.0.1:9003 \
          --id=1

$ go run cmd/jocko/main.go --debug \
          --logdir="/tmp/jocko2" \
          --brokeraddr=127.0.0.1:9101 \
          --raftaddr=127.0.0.1:9102 \
          --serfaddr=127.0.0.1:9103 \
          --serfmembers=127.0.0.1:9003 \
          --id=2

$ go run cmd/jocko/main.go --debug \
          --logdir="/tmp/jocko3" \
          --brokeraddr=127.0.0.1:9201 \
          --raftaddr=127.0.0.1:9202 \
          --serfaddr=127.0.0.1:9203 \
          --serfmembers=127.0.0.1:9003 \
          --id=3

# Create a topic
$  go run cmd/createtopic/main.go --brokeraddr localhost:9001 --topic test_topic --partitions 8

# Make requests you need (e.g. get the metadata)
$ kafkacat -L -b localhost:9201 -t test_topic

# Does it work???
skotchpine commented 6 years ago

I've found the Kafka design docs to be a good intro. @travisjeffery, how close to this do you plan to implement?

travisjeffery commented 6 years ago

@skotchpine closely, I want Kafka clients/libaries to be compatible with Jocko.

skotchpine commented 6 years ago

OH boy. Is it reasonable to integration test some of these possible systems?

alexellis commented 6 years ago

@travisjeffery can you ©get away with a single node for testing publishing and receiving messages? What would that look like as an example?

travisjeffery commented 6 years ago

@alexellis yeah you can get away with it. I'll put up an example tomorrow. What's the use case? Testing or a small dev project?

alexellis commented 6 years ago

This would be for testing the Kakfa connector for OpenFaaS - I'm presenting OpenFaaS KubeCon next week. One of the things we're building is a Kakfa connector/trigger for functions. It would be great to collaborate on the connector with Jocko. For production deployments I think people will have Kakfa in-place already.