The Shower Principle
Good architecture is like a shower thought: It happens in the background while you do something else.- Fire and Forget: You send us the video. We say “Received”. You hang up.
- Background Worker: We transcode, upload, and verify the video with YouTube.
- Webhook: We call you back: “It’s done.”
Designing for Async
- UI: Don’t show a spinner. Show a “Processing” state and let the user leave the page.
- Database: Store a
statusfield (pending,processing,published). - Webhooks: Always listen for
post.failed. Background jobs fail silently if you don’t listen.