Crossword Hint Delivery
Compare server-fetched and preloaded text, image and video hints under device storage, offline availability and immutable puzzle revisions.
Problem statement
Compare fetching hints from a server with preloading them on the device in the following bounded crossword practice. For this exercise, assume players open a puzzle and request text, image or video hints for individual clues, while authorized content editors publish revised puzzle and hint packs.
Hints are ordinary public content; payment, secret-answer enforcement, personalized generation, puzzle solving and multiplayer state are outside scope. A playing session pins one immutable puzzle revision, and every returned hint must match that revision and clue. Corrections create a new revision for later opens.
Compare server-only, selected-puzzle preload and a hybrid, then propose a coherent delivery design. Offline clients may use verified compatible downloads; missing hints must be explicitly unavailable, and an older cached revision must not be called current.
For this extension, assume the existing text pack remains complete and revision-scoped, while each media hint refers to one immutable, separately verified asset in its pack manifest. The same clue may have different hint kinds in different revisions, so neither kind nor asset identity is inferred from a clue ID alone.
A selected-puzzle preload must declare whether it includes the core text/descriptor pack alone or that pack plus selected media. A verified core pack does not imply its referenced media is available offline.
A media hint is usable only after its full referenced bytes and supported profile are verified; otherwise return an explicit missing, unavailable or unsupported outcome. Compare upfront media transfer/storage and decoding cost with request-time fetching without changing the text lookup guarantees.
What to build
- A player can request a hint for a clue in the opened puzzle revision, with an explicit unavailable outcome when compatible content is missing. For text return the matching text; for image/video return the matching typed descriptor and only present a complete verified supported asset.
- Authorized content editors can publish revised puzzle and hint content without mixing revisions in an active session. Referenced media must be durably ready and validated before the new revision is discoverable.
- A device can fetch or preload selected hint packs within its storage budget and use compatible downloaded content while offline. Account for encoded core packs, asset bytes and manifests in both active and staging state; an uncached or unsupported media hint remains explicitly unavailable or unsupported.
- A device can advertise supported image/video profiles, fetch compatible immutable assets and present them within finite encoded and decode budgets without substituting a different revision or claiming a text lookup target covers full media transfer.
At scale
- For this exercise, retain the catalog of 10,000 core text/descriptor hint packs of at most 100 KiB each, with 1 million daily players and 5,000 peak hint requests/s. Media bytes are additional, so the roughly 1 GiB core catalog alone already exceeds the device budget.
- For this exercise, retain the 50 MiB encoded on-device hint-content budget across active and staging core packs, manifests and media assets; metadata, temporary transfer files and duplicated revisions count toward it. Enforce admission before a download and use an explicit unavailable/reopen outcome if protected active content prevents admission.
- For this exercise, retain 300 ms p95 online text/descriptor response and 30 ms p95 verified local text/descriptor lookup. These targets do not include full media transfer or decode. Healthy connected clients discover a published revision for new opens within one hour.
- For this exercise, active sessions pin a revision; corrections do not force an immediate offline cutover. Missing or incompatible offline content returns unavailable.
- For this exercise, the finite media profile admits JPEG/PNG images of at most 512 KiB encoded and 1,024 by 1,024 pixels, and H.264 MP4 video without audio of at most 5 MiB encoded, 30 seconds and 640 by 360 pixels. Each device advertises profile support; unsupported content is explicit. Decode/presentation has a separate 8 MiB working-memory budget for one asset at a time; the implementation must validate dimensions/profile and stop rather than exceed it. Media encoding/transcoding, audio, generated hints and decoder implementation are outside scope.
- For this exercise, under a healthy measured 10 Mbit/s connection target p95 verified image presentation within two seconds and fully downloaded/verified video ready to play within twelve seconds. These are separate media targets, not promises during outage, slow links or unsupported profiles. Streaming unverified partial video is not required.