thtg88 / maelstrom-g-counter

A Go implementation of the grow-only counter challenge for the Fly.io Gossip Gloomers series of distributed systems challenges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fly.io Gossip Gloomers Distributed Systems Challenges - Grow-only Counter Challenge

This repo contains a Go implementation of the grow-only counter challenge for the Fly.io Gossip Gloomers series of distributed systems challenges.

Requirements

Go 1.20

You can install Go 1.20 using gvm with:

gvm install go1.20
gvm use go1.20

Maelstrom

Maelstrom is built in Clojure so you'll need to install OpenJDK.

It also provides some plotting and graphing utilities which rely on Graphviz & gnuplot.

If you're using Homebrew, you can install these with this command:

brew install openjdk graphviz gnuplot

You can find more details on the Prerequisites section on the Maelstrom docs.

Next, you'll need to download Maelstrom itself.

These challenges have been tested against Maelstrom 0.2.3.

Download the tarball & unpack it.

You can run the maelstrom binary from inside this directory.

Build

From the project's root directory:

go build .

Test

To use the different Maelstrom test commands, you can refer to the Fly.io instructions, or run:

# Make sure to replace `~/go/bin/maelstrom-counter`
# with the full path of the executable you built above
./maelstrom test -w g-counter \
  --bin ~/go/bin/maelstrom-counter \
  --node-count 3 \
  --rate 100 \
  --time-limit 20 \
  --nemesis partition

About

A Go implementation of the grow-only counter challenge for the Fly.io Gossip Gloomers series of distributed systems challenges

License:Eclipse Public License 1.0


Languages

Language:Go 100.0%