All case studies

Content delivery

New content without a release: downloaded whole, read offline

A mobile app showed only the content its build shipped, and new content waited for a release. Many of its users were on mobile data.

  • Content delivery
  • Mobile apps
  • Backend

Under NDA

The company’s name and logo are under NDA. We left out the details that could identify it.


Offline
downloaded content opens with no network
Delta
an update fetches only what changed
Atomic
a download is kept whole or not at all

The problem

The app showed only the documents and pictures its build shipped: new content reached users with the next release alone. Many read over mobile data, so a download could break off half-way, and every byte fetched twice cost them.


What we did


  1. 01The app opens with the catalog its build ships, then asks the server for the latest without holding up the start; a failed request changes nothing. Each cover shows its BlurHash placeholder until the picture arrives, and a cover fetched whole is kept for good.

  2. 02A download fetches a document, then every picture it names, and keeps them all or nothing: a cancel, a lost network or a killed app leaves nothing half-written. It goes on while the app is in the background, and one the system stops starts again once the app is back.

  3. 03On the Ktor server, a picture is named by its hash: changed bytes get a new name, and a name already on the device is never fetched again. Every change to a document raises its version, and the import refuses a changed document at its old version. Free pictures are public in S3; paid ones are served by signed links that expire.

  4. 04Before the press, the app fetches the new document and weighs the update: the size less the pictures the device already holds. The download fetches only the pictures it lacks and replaces the old version whole, dropping every picture it no longer names.

Result

New content reaches users with no release. A corrected word fetches the document alone, a redrawn picture that picture alone. Downloaded content opens with no network and after a restart, and a cut download leaves the old version intact.


Technologies

  • Kotlin Multiplatform
  • Ktor
  • S3
  • BlurHash

Have a similar problem?

Write to us about what is going on. We reply within 2 business days.

Write to us


More case studies