Verified interview challenge
Count machines and recover a cluster topology
Coordinate machines that know only their neighbours to produce a cluster-wide result.
Unlock with Full AccessThe challenge
Machines form a rooted tree, but each knows only itself, its parent and its children. Implement the message handler that lets the root count the machines, then extend it to produce the topology.
Messages arrive asynchronously and may reach their destinations in any order. There is no shared state to inspect and no synchronous call to a neighbour, so each machine must retain what it needs between deliveries.
What you'll practise
Local coordination
Combine neighbour responses into a result without global shared state.
Asynchronous progress
Handle reordered messages and repeated completed requests under the given delivery contract.
# Build on your implementation
# Run checks for the current part
# Full starter code includedRun your code to see results.