Collaborative Document Editor
Real-time collaborative editing — where multiple users see each other's changes instantly without conflicts — is one of the most challenging distributed systems problems because it requires resolving concurrent edits while maintaining document consistency and low-latency feedback. In this challenge, you will design a collaborative document editor on AWS that supports Google Docs-style real-time collaboration with cursor presence, change tracking, version history, and offline editing support. The core consistency algorithm uses Conflict-free Replicated Data Types (CRDTs) — specifically, an RGA (Replicated Growable Array) for text content that guarantees eventual consistency without a central coordination server. Each character insertion includes a unique ID (combining client ID and logical timestamp) that provides a total order for conflict resolution. The real-time synchronization layer uses API Gateway WebSocket APIs for persistent connections, with Lambda functions that receive operations from clients, validate them, apply them to the server-side document state in DynamoDB, and broadcast the transformed operations to all other connected clients. The document state is stored as a series of operations (operational log) in DynamoDB with a compacted snapshot stored in S3 at regular intervals — new clients load the latest snapshot and replay subsequent operations to catch up. Cursor presence uses a lightweight heartbeat protocol through the WebSocket connection, with ElastiCache storing cursor positions per user per document with 5-second TTL. Offline editing support works by queuing operations locally on the client and replaying them through the CRDT merge algorithm when connectivity is restored — the CRDT properties guarantee that the result is consistent regardless of the order operations arrive. Version history uses DynamoDB Streams to capture every operation, with a Lambda function that creates named snapshots (versions) on demand and stores them in S3. Access control supports document-level permissions (owner, editor, viewer) stored in DynamoDB with real-time enforcement at the WebSocket authorization layer. This challenge teaches CRDT-based consistency, real-time synchronization protocols, and the architecture patterns behind modern collaborative applications.
AWS Services You'll Use
Challenge Details
- Path
- Data-Intensive Systems
- Difficulty
- Advanced
- Duration
- 80 min
- Plan
- Pro
Architecture Patterns You'll Learn
Why This Challenge?
Unlike whiteboard exercises or multiple-choice quizzes, this challenge requires you to design a real architecture with actual AWS services, evaluate trade-offs, and defend your decisions. Our automated validators check your design against production-grade criteria. Complete it and it shows up in your verified portfolio with your architecture diagram and design rationale.
More from Data-Intensive Systems
Real-Time Search Engine
Design a search engine that indexes millions of documents and returns relevant results in milliseconds.
Advanced · 75 minReal-Time Analytics Dashboard
Design an analytics platform that processes billions of events and renders dashboards with sub-second freshness.
Advanced · 80 minIoT Data Ingestion Pipeline
Design a pipeline that ingests, processes, and analyzes sensor data from thousands of IoT devices.
Advanced · 75 minReady to design this for real?
Get the full scenario, design your architecture using real AWS services, and validate against production-grade criteria. Your completed challenge shows up in your verified portfolio.
Start Challenge