Section 12: The Roadmap Lands on Old Decisions - Follow-up Feature Evolution
Executive Summary: The interviewer's last move is a product roadmap: seven features, one year. None forces a rebuild, and the reason is specific. Subscriptions are the entitlement row from Section 5 learning to expire. Alternative distribution separates two steps the publishing workflow already ran apart: scanning and signing. Instant experiences are a size-capped split. Recommendations are the per-user fragment that Section 7's pushback deferred. Private enterprise apps are one more targeting predicate in the release index. Pre-registration is a release flip with a timestamp on it. Listing experiments are document variants with a deterministic cohort.
Sixty-five minutes in, the interviewer slides a list across the table. "Product wants subscriptions, the EU wants third-party stores, marketing wants instant apps, launch-day pre-registration and listing A/B tests, sales wants private apps for enterprises, and someone wants recommendations. Which of these make you redraw the architecture?"
You: None of them redraw it. Each plugs into a component we already justified.
Subscriptions: The Entitlement Learns to Expire
What changes: the entitlement row gains expiresAt and a richer state, and the append-only purchase_events history gains one row per renewal. Renewals arrive as billing-provider events, each carrying the provider's order ID, which becomes the idempotency key. A redelivered "renewed" event is a no-op, exactly like Priya's retried tap on the ₹399 Offline Maps Pack.
ACTIVE and GRACE grant access; ON_HOLD, EXPIRED and REFUNDED do not. That mirrors Google Play's grace period and account hold: a failed card shouldn't cut a paying user off at midnight, nor grant access forever.
Interviewer: "Who expires the subscriptions? A nightly job?"
You: No job. The entitlements table is 250 billion rows, and a sweep over it to find expirations would be the most expensive query in the company. Expiry is a comparison at read time: an entitlement check asks whether the state grants access and now < expiresAt. A renewal event that goes missing becomes a timely expiry, not free access forever. If provider events prove unreliable in practice, that's the flip trigger: add a reconciliation pull against the provider for entitlements expiring in the next day, which is a small slice, not the whole table.
What did not change: the purchase tables (current-state purchases, append-only purchase_events) and the one-transaction entitlement write, the outbox that notifies Trailhead's server, and Section 10's refund path, which is now just one more edge into REFUNDED.
Quick check before moving on:
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson