Level 1 · Apprentice0 XP
Wrap the model behind a port, stream, cache, limit and observe, in Spring Boot and React Native.
Step 1 / 5
ProblemThe mobile app calls your backend, which calls the model and waits 20 seconds for the full answer. The user sees a spinner, taps again, and now you pay twice. Then the provider has a slow minute and your whole endpoint times out.
← → step
Before this: Serving open models
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.In a Spring Boot or Kotlin project, define a port Summariser and a use case that uses it. Write a FakeSummariser for tests and one real adapter. Add a timeout, and log input tokens, output tokens and milliseconds for every call.