Loading...
Loading...
Design a shared calendar system similar to Google Calendar, where users can manage multiple calendars, schedule events, invite attendees, and keep their schedules synchronized across devices. The system must support one-time and recurring events, calendar sharing, attendee responses, reminders, and reliable synchronization between web and mobile clients.
A central challenge is maintaining one authoritative event definition while supporting multiple views of the same event. Organizers control shared event details such as the title, time, and recurrence rules, while individual attendees manage their own RSVP responses. Organizer updates and cancellations must propagate consistently without creating conflicting event copies or losing attendee responses.
Recurring events introduce additional complexity. The system must support recurring series with exceptions, including editing or canceling a single occurrence without affecting the rest of the series. Because recurrence rules can describe an unbounded future, the system cannot expand and permanently store every future occurrence. Instead, occurrences must be derived from recurrence rules with bounded exception overrides.
The system must also support cross-device synchronization and time-sensitive reminders. Event modifications should be acknowledged quickly, while connected devices can receive updates within a few seconds. Clients that disconnect or miss push notifications must recover missed changes through a reliable incremental synchronization mechanism without downloading their entire calendar state. Reminders must be delivered close to their scheduled times without duplicate sends, including when recurring events are modified or canceled.
Calendar Management and Sharing: Users can create and manage multiple calendars, control which calendars appear in their account, and share calendars with view or edit permissions. Sharing must respect private-event visibility rules.
Event Creation and Management: Users can create, view, update, and delete one-time, all-day, multi-day, and timezone-aware events.
Recurring Events and Exceptions: Users can define recurring event series and modify or cancel individual occurrences without changing unrelated occurrences. The system must support recurrence without expanding an infinite number of future events.
Attendee Invitations and RSVP: Organizers can invite attendees to events, and attendees can accept, decline, or otherwise respond to invitations. RSVP updates affect individual attendee responses without modifying the organizer-owned event definition. Organizer changes and cancellations must propagate to attendees.
Reminders and Event Notifications: Users receive scheduled event reminders and attendee-facing notifications for important updates. When an event or recurring series changes, affected reminders must be updated or canceled without generating duplicate notifications.
Cross-Device Synchronization: Calendar changes must synchronize across devices. Push notifications may provide freshness hints, but clients must also support a reliable delta-sync mechanism to retrieve missed changes after disconnects or missed notifications without reloading their entire calendar state.
Availability: Target 99.95% availability for calendar reads, writes, and synchronization recovery.
Write Latency: Acknowledge event creation, edits, deletions, and RSVP updates within p95 < 200 ms.
Read Latency: Serve common day and week calendar views within approximately p95 < 500 ms.
Cross-Device Freshness: Make calendar changes visible across devices within a few seconds under normal operating conditions. Synchronous propagation is not required.
Reminder Accuracy: Deliver reminders within approximately 1 minute of their requested delivery times under normal conditions, while preventing duplicate sends.
Data Durability and Consistency: Preserve acknowledged event writes, recurrence rules, ACL changes, and attendee responses without silent data loss. Avoid contradictory attendee states or duplicate reminders when recurring events are edited.
Access Control: Enforce calendar sharing permissions and private-event visibility rules on every read path.
Bounded Resource Usage: Avoid infinite future materialization of recurring events, keeping storage and computation bounded as recurrence series grow.