Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starter code for raft-otel project #214

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

lauranooooo
Copy link
Contributor

@lauranooooo lauranooooo commented Jun 4, 2024

This is based on Eli Bendersky's [https://eli.thegreenplace.net] RAFT demo code.
It is intended to be a good jumping off point for the raft-otel project.
Intentionally some todos left in here that will be referenced in the project writeup.

It does not solve the whole project - it doesn't do distributed tracing or any of the other extensions.

I've modified it in a few ways:

  • Adds a main.go so you can run the RAFT code as docker containers (or Kube) - peers are found via DNS lookup
  • Changed from integer based peer IDs to use of IP addresses, so that the instances can come up without coordination with each other
  • Changed from standard RPC to gRPC (as we've been using throughout this course)
  • Adds Dockerfile and docker-compose.yml
  • Added structure to Command (to simplify gRPCing)
  • Removed one test (TestCrashAfterSubmit) as could not make the timing work to reliably crash leader before it had a chance to commit a change (would be easier to do this if code were restructured to inject time)
  • Added endpoint for doing some sets/gets of data, and a simple client that calls this - to demo what's usually done with RAFT, also added a client that exercises it

Copy link

netlify bot commented Jun 4, 2024

Deploy Preview for cyf-systems ready!

Name Link
🔨 Latest commit 9c5d71c
🔍 Latest deploy log https://app.netlify.com/sites/cyf-systems/deploys/6661d0312772720008ce481d
😎 Deploy Preview https://deploy-preview-214--cyf-systems.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant