Design a Scalable CRM Timeline / Comment System
Problem
Design a HubSpot product subsystem: a CRM contact timeline (or a performant comment system) showing all activity for a contact.
Requirements
Functional:
- Append activity events (emails, calls, form fills) to a contact's timeline
- Paginated reverse-chronological reads
- Filter by activity type
- Real-time updates
Non-functional:
- Millions of contacts, high write volume
- Fast timeline reads
- Schema evolves over time
Discussion points
- Event model and append-only storage
- Read path: pagination and filtering
- Caching hot timelines
- Fan-out vs query-on-read
- Schema evolution for new activity types
added …