PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Databricks

Design Chat Deletion Semantics Under Concurrent Sends

Last updated: Jul 23, 2026

Quick Overview

Design deletion semantics for a chat backend when message sends and thread deletion race across servers. Define the visible consistency contract, linearization rules, conditional writes, tombstones, idempotency, cache and search propagation, offline-client recovery, and audit retention.

  • medium
  • Databricks
  • System Design
  • Software Engineer

Design Chat Deletion Semantics Under Concurrent Sends

Company: Databricks

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

# Design Chat Deletion Semantics Under Concurrent Sends Design the backend of a chat application that supports creating threads, sending messages, reading thread history, deleting an individual message, and deleting an entire thread. Concentrate on deletion behavior and the race between `send_message` and `delete_thread` arriving concurrently on different servers. Define the user-visible contract: after thread deletion succeeds, can any concurrent message become visible, can an offline client resurrect old data, and what evidence is retained for audit or abuse handling? Explain storage, APIs, ordering, consistency, fanout, caches, and recovery. ### Constraints & Assumptions - Clients retry timed-out writes, so mutations need idempotency keys. - Thread participants may be connected to different real-time gateway servers. - Message storage and derived search, notification, and cache views may update asynchronously. - Exact retention requirements must be clarified rather than assumed. ### Clarifying Questions to Ask - Is deletion for one user, all participants, or permanent erasure? - Which operation should win when send and delete overlap? - Must deletion be immediately reflected on every online and offline client? - Are edits, legal holds, moderation records, and thread restoration in scope? ### What a Strong Answer Covers - A precise linearization rule for send-versus-delete - Conditional writes tied to thread state or generation - Tombstones, idempotency, and prevention of stale resurrection - Propagation to caches, search, notifications, and connected clients - Auditability, retention, observability, and failure recovery ### Follow-up Questions - How would per-user deletion differ from global deletion? - What happens if a delete event reaches search before a delayed create event? - How would end-to-end encryption affect server-side deletion? - How can clients reconcile after being offline during a thread deletion?

Quick Answer: Design deletion semantics for a chat backend when message sends and thread deletion race across servers. Define the visible consistency contract, linearization rules, conditional writes, tombstones, idempotency, cache and search propagation, offline-client recovery, and audit retention.

Related Interview Questions

  • Design a Collaborative Playlist Editor - Databricks (medium)
  • Design a Thread-Safe Buffered Writer with a Background Flush Thread - Databricks (medium)
  • Design a Slack-Like Messaging System - Databricks (medium)
  • Design a Book Price Aggregator - Databricks (medium)
|Home/System Design/Databricks

Design Chat Deletion Semantics Under Concurrent Sends

Databricks logo
Databricks
Jul 14, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSystem Design
2
0

Design Chat Deletion Semantics Under Concurrent Sends

Design the backend of a chat application that supports creating threads, sending messages, reading thread history, deleting an individual message, and deleting an entire thread. Concentrate on deletion behavior and the race between send_message and delete_thread arriving concurrently on different servers.

Define the user-visible contract: after thread deletion succeeds, can any concurrent message become visible, can an offline client resurrect old data, and what evidence is retained for audit or abuse handling? Explain storage, APIs, ordering, consistency, fanout, caches, and recovery.

Constraints & Assumptions

  • Clients retry timed-out writes, so mutations need idempotency keys.
  • Thread participants may be connected to different real-time gateway servers.
  • Message storage and derived search, notification, and cache views may update asynchronously.
  • Exact retention requirements must be clarified rather than assumed.

Clarifying Questions to Ask Guidance

  • Is deletion for one user, all participants, or permanent erasure?
  • Which operation should win when send and delete overlap?
  • Must deletion be immediately reflected on every online and offline client?
  • Are edits, legal holds, moderation records, and thread restoration in scope?

What a Strong Answer Covers Guidance

  • A precise linearization rule for send-versus-delete
  • Conditional writes tied to thread state or generation
  • Tombstones, idempotency, and prevention of stale resurrection
  • Propagation to caches, search, notifications, and connected clients
  • Auditability, retention, observability, and failure recovery

Follow-up Questions Guidance

  • How would per-user deletion differ from global deletion?
  • What happens if a delete event reaches search before a delayed create event?
  • How would end-to-end encryption affect server-side deletion?
  • How can clients reconcile after being offline during a thread deletion?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Databricks•More Software Engineer•Databricks Software Engineer•Databricks System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.