Activity-digest aggregation
Your task
Design the activity-digest engine for a collaboration product (think GitHub/Jira) that, instead of sending one notification per event, intelligently aggregates many events into batched in-app and email digests: '12 people commented on issues you follow.' Scale: 50M users, millions of events/min. Requirements: collapse bursts (50 comments on one thread = one line, not 50), respect each user's chosen digest cadence (instant / hourly / daily), and don't lose an event that arrives at a window boundary.
It covers
- Digest
- Aggregation
- Windowing