Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Desktop Application Notification System

Coordinate local desktop notifications from multiple applications with durable intent, user policy, bounded delivery, and restart-safe state.

Problem statement

Design the notification subsystem of a desktop operating environment. Multiple installed applications can request that a notification be shown to the signed-in user.

For this exercise, assume the subsystem validates the calling application, durably records one logical notification intent, applies user and application policy, and presents eligible notifications through the local desktop shell.

Support priority, replacement or grouping keys, expiration, per-application rate limits, do-not-disturb periods, user dismissal, and click actions. Each policy rule explicitly chooses either suppress or defer-until-quiet-time-ends; priority never overrides a user prohibition.

Application retries must not create duplicate visible notifications, an application restart must not lose an accepted intent, and an operating-system or shell restart must recover authoritative pending and displayed state.

A notification can move among queued, deferred, displayed, dismissed, expired, suppressed, and actioned states under one monotonic version. User policy and notification state are local to this device; cross-device synchronization is outside scope.

Define the local producer contract, durable state, policy and scheduling pipeline, shell delivery acknowledgement, restart recovery, privacy, and observability. Remote campaign authoring, email or SMS delivery, advertising, and arbitrary application code execution are outside scope.

What to build

  1. Accept an authenticated application's retry-safe notification intent with content, priority, policy, expiration, and optional grouping identity.
  2. Apply user, application, rate-limit, quiet-time, expiration, and replacement rules before display.
  3. Present one authoritative visible instance through the desktop shell and record dismissal or a validated user action.
  4. Recover accepted, pending, displayed, and terminal notification state across application, shell, or operating-system restarts.

At scale

  • For this exercise, assume up to 500 installed applications, 100 active producers, and bursts of 1,000 notification requests per minute on one device.
  • For this exercise, an eligible high-priority notification should reach a healthy shell within one second at p95, while ordinary notifications may be coalesced for up to five seconds.
  • For this exercise, retain terminal notification metadata for seven days and never retain secret message contents in diagnostic logs.
  • For this exercise, an accepted intent must survive a process or device restart, but an expired or policy-suppressed intent must never be resurrected for display.