Design an Out-of-Order Event Processor

Problem

Design an event processor for an infinite, out-of-order event stream with validation and checksum handling (reported Box question).

Requirements

  • Ingest events that may arrive out of order
  • Validate each event and verify a checksum
  • Emit events in order once contiguous
  • Drop/flag corrupt events

What evaluators look for

  • Clean separation: ingest, validate, buffer, emit
  • Handling gaps and reordering with a buffer
  • Idempotency and dedup

Extension

Bound the reorder buffer and handle a permanently missing sequence number.

added …
LeaderboardSalaryAccount