This repo contains a Go implementation of the grow-only counter challenge for the Fly.io Gossip Gloomers series of distributed systems challenges.
You can install Go 1.20 using gvm with:
gvm install go1.20
gvm use go1.20
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.
From the project's root directory:
go build .
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