Using a own topology

In challenge 3d it says:

Feel free to ignore the topology you’re given by Maelstrom and use your own; it’s only a suggestion.

What does this mean? Does this mean passing different topology flag to maelstorm?

Topology is the logical arrangement, right? Is it possible to arrange nodes however I want?

Another question I have is, in the challenge 3d or 3e, topology never changes? for e.g.:

currently:

a: b, c
b: c
c: a, b, d

Assume there is a network partition which breaks the network between a and b. Can it be a permanent partition throughout the test?

Hi Avi,

What does this mean? Does this mean passing different topology flag to maelstorm?

Based on Maelstrom’s Broadcast docs, It looks like we can pass in different topology options, such as --topology line

Is it possible to arrange nodes however I want?

I believe so!

Assume there is a network partition which breaks the network between a and b. Can it be a permanent partition throughout the test?

Based on a couple of history.edn 's, it looks like the partitions are always healed with the following:
{:index 1586, :time 9413463333, :type :info, :process :nemesis, :f :stop-partition, :value :network-healed}

But I may be wrong. Perhaps someone here has experienced a permanent partition in one of their runs :thinking:

One interesting thing I noted was that sometimes, the connection to only one peer per node was disturbed
{:index 0, :time 245555209, :type :info, :process :nemesis, :f :start-partition, :value :one}

And in other times, multiple peer connections
{:index 0, :time 159018541, :type :info, :process :nemesis, :f :start-partition, :value :majority}

Hope I was able to provide some clarity. Good luck!

2 Likes

wow, how do we do this!?

oh! That explains why code with bugs was passing some tests earlier! This a cool observation. Because I thought partitions happen with majority.

Thank you for sharing!

Np!

Personally, I just round-robin’d it and made sure every node got accounted for :sweat_smile:

I’m pretty sure there are better ways (using some well-known network topologies), but I’m still trying to decide if it’s worth the optimization because it seems to broadcast pretty well.

By the way, the topology provided by Maelstrom was also working pretty well for me. IIRC my custom topology decreased latencies by maybe 20%

1 Like

Isnt this same as grid, where everyone is connected to everyone?

All nodes in Maelstrom can communicate with each other. The topology is just a way to logically arrange nodes. There’s a --topology flag you can use with Maelstrom but it wasn’t mentioned in the challenges because it’s more fun to make your own. :slight_smile:

The grid layout arranges all nodes with at most 4 peers whereas it sounds like the round robin approach is that each node contacts every other node.

ahh, that makes sense. Thank you for clarifying!