OpenAI·Software Engineer·Technical Phone Screen
- You're given the root node of a distributed network where nodes can only communicate via an async sendAsyncMessage API. Implement the receiveMessage handler so the system can discover the full network and count all nodes, starting from the root.
- Instead of returning just a count, output the full network topology as a nested string, like 1(2(4,5),3(6)).
- How would you handle node crashes or dropped messages in this system? Walk through retries, duplicate responses, idempotency, request IDs, and caching.
- If multiple traversal requests hit the same node concurrently, how do you isolate per-request state and handle thread safety?
- Implement sendAsyncMessage locally for testing purposes and write tests that exercise the full async counting flow end to end.
“The setup took me a minute to absorb.”