My solutions to Fly.io distributed systems challenges in C#
There's nothing to do, as it's just an introductory guide to Maelstrom.
My solution involves concatenating the nodeId, UNIX timestamp in milliseconds, and an atomic increment.
Nothing complicated since there is only one node.
This time, there are five nodes. I have used the provided topology to broadcast messages to each neighbor.
Once again, I have used the provided topology to broadcast messages to each neighbor. RPC calls are retried until the remote node responds
Now, this is more challenging! We have to respect some constraints :
- Messages-per-operation is below 30
- Median latency is below 400ms
- Maximum latency is below 600ms
My solution is to divide the 25 nodes into two groups, each with a master node. Each master node broadcasts messages to its children as well as the other master node.
My result :
- Messages-per-operation : 23.21
- Median latency : 192ms
- Maximum latency : 316ms
constraints :
- Messages-per-operation is below 20
- Median latency is below 1s
- Maximum latency is below 2s
This is the same solution as before, but with messages now broadcasted in batches to ensure that the message rate stays below 20 messages per second with 25 nodes.
My result :
- Messages-per-operation : 4.59
- Median latency : 442ms
- Maximum latency : 988ms
Solution need only be eventually consistent: given a few seconds without writes, it should converge on the correct counter value. My solution : each node replicates local data to other nodes.
Nothing complicated since there is only one node.
My solution worked for the last two Kafka challenges without using the seq-kv provided by Maelstrom. I declared the first node as the master and the other nodes forwarded messages to the master and read from it.
- Messages-per-operation : 2.3
- Availability : 0.9991452
- Throughput max : 350 hz
Nothing complicated since there is only one node.
Each transaction is replicated using my rpc implementation (infinite retries :-) )
Same solution as 6b, test is passing..