Whatnot·Software Engineer·Onsite - System Design / Architecture
- Design a direct messaging system for an e-commerce marketplace where buyers and sellers can chat one-on-one, with real-time delivery when online and SMS/email fallback when offline.
- Is the messaging strictly one-to-one, or should the data model account for group threads from the start?
- What delivery semantics would you target: at-least-once with client deduplication, or exactly-once? Is any message loss acceptable?
- Walk through how a client recovers a missed message after disconnecting mid-delivery, with no loss and no duplicates.
- Two devices from the same user read the same conversation simultaneously and both try to advance the read cursor. How do you keep that state consistent?
- How do you guarantee strict per-conversation message ordering when the store is sharded and multiple app servers might assign sequence numbers for the same conversation concurrently?
- How would you extend this design to support group conversations without rewriting the core delivery path?
- How do you make offline SMS and email notifications idempotent and debounced so a user offline for an hour with 20 messages doesn't receive 20 separate texts?
“This is the core question and it ate up most of the session.”