In this series, we will take a look at the Gossip Glomers challenge from fly.io. It is a nice challenge to learn about distributed systems, so let’s dive right in :)

Note: I would highly encourage you to try out the challenge yourselves and only read the solution when you are stuck :)

Setting up the Dev Env

I use devenv.nix along with direnv to set up the environment. You can take a look at this commit, which has the complete setup. With the above setup, as soon as you enter the directory, your dev env will be automatically set up and will be dropped in to it with a shell.

You can build and install the program by going inside the echo directory using a cd echo and doing a go install. This will install the program in your ~/go/bin or equivalent directory.

You can then run the echo workload from Maelstrom with the following command after moving back to root directory with a cd ...

maelstrom test -w echo --bin ~/go/bin/echo --time-limit 30 --rate 1000 --node-count 3 --availability total --nemesis partition

The result would look like below.

INFO [....] main - jepsen.cli Test options:
....
....
 :workload {:valid? true, :errors ()},
 :valid? true}

Everything looks good! ヽ(‘ー`)ノ

This will create a store folder with all the results.

You can take a look at the results by first starting the server using maelstrom serve command and opening the results page.

Challenge #1: Echo

The first challenge is echo. It is just a “getting started” challenge to work with Maelstrom using Golang. Please make sure you read this page before proceeding with the next section. The answers are also already provided.