Distributed checkpoint
Challenge on lesson: Checkpoint: distributed systems
CHALLENGE
Difficulty: advanced+25 XP
Simulated message bus, deterministic: implement class IdempotentProcessor with int Process(string messageId, Func<int> work) โ processes work once per messageId, caches the result, returns it on repeats WITHOUT re-running work (work has a side-effect counter the test watches). Then implement static int[] DeliverAll(List<string> messageIds, Func<string, int> handler, int duplicates) that delivers every message duplicates times (out of order, shuffled deterministically by index) and returns the work-counter delta โ which must be exactly messageIds.Count because duplicates are absorbed idempotently.
Press Submit to check your solution.
Back to lesson: Checkpoint: distributed systems