androidengineers.Book a session

Python services and data contracts

Lab: build a bounded inference gateway

exerciseSelf-paced

Assignment

Create a local API backed by a fake model client that waits 100 ms, returns a JSON response, or raises a timeout. No paid API is needed.

Build sequence

  1. Define request and response schemas and reject blank or oversized input.
  2. Limit in-flight calls to three; submit twenty concurrent requests and record queue time.
  3. Persist an operation ID and status in SQLite; simulate a retry with the same ID.
  4. Add a deadline and test cancellation while queued and while executing.

Acceptance checks

  • At most three fake calls run simultaneously.
  • Expired requests do not create fresh work; retries cannot insert duplicate operations.
  • The test report distinguishes validation failures, overload, timeouts, and successful responses.

Evidence to keep

Submit the working artifact or decision document described above, the inputs used, and the observed results for every acceptance check. Include one failed attempt and the change you made after investigating it. Label fixture-based outcomes separately from live-system measurements. These artifacts become part of your final portfolio review.

YOUR LEARNING JOURNEY

0 of 119 available lessons completed

Progress saved in this browser. No account needed.
Lab: build a bounded inference gateway | Forward Deployed Engineer | Android Engineers