Module 11 Activity
Scenario
Handle the work that does not fit inside a single fast request.
What you build
Correctly classified async work, safe uploads, no blocking in async handlers, and a streamed response.
Steps
- Classify every piece of deferred work as best-effort, must-happen, scheduled or inline, and route each accordingly.
- Build an upload endpoint that checks type first and enforces size while reading.
- Find any blocking call inside an
async defhandler and either await it properly or change the handler todef. - Measure the difference under concurrency and report it.
- Build one streamed response and say how the client detects truncation.
- For anything that must happen, describe the queue and how status is reported back.
Evidence to hand in
- The work classification with destinations.
- The upload endpoint with both checks.
- The blocking-call fix with the measurement.
- The streamed response and its truncation signal.
- The queue design for must-happen work.
Review checklist
- Nothing that must happen is left to a background task.
- The upload size check runs while reading, not after.
- No blocking call remains inside an
async defhandler. - The concurrency difference is measured, not asserted.
- The streamed response has a way for the client to detect truncation.
