Design Daily Database Query and Email Delivery
Run saved queries against a daily snapshot and deliver auditable HTML or XML results by email.
Problem statement
For this exercise, assume you are designing daily database query and email delivery. Run saved queries against a daily snapshot and deliver auditable HTML or XML results by email.
Define a coherent first production version that satisfies the listed requirements and scale while making failures and degraded behavior visible.
What to build
- Let users save a query, output format, recipients, and daily schedule.
- Execute each job against one declared daily database snapshot.
- Generate HTML or XML and deliver email without duplicate user-visible sends.
At scale
- For this exercise, assume one million scheduled jobs per day and a 06:00 UTC database snapshot.
- Complete 99% of jobs by 08:00 UTC while isolating expensive queries.
- Retain job, artifact, and delivery audit metadata for 90 days.