System Design Atlas

Digital lending with limited licences

01 / 10Worked example

Purpose and boundary

Titles and copies are different entities. Which conditions preserve this distinction?

Title T-52 has licensed copy X-52. Loan A-52 allocates that copy until expiry instant D-52. The example loan lasts 14 days; the entitlement ends exactly at expiry. A title may appear in many search results while having only one licence.

Starting point Coordinate limited licensed copies, loans and confirmed returns for digital media.

Assumptions for the example case

A fictional library with one licensed copy and reading devices that verify entitlements online. Every new read checks the current entitlement; offline use is outside the scope. All quantities, thresholds and operational targets in this design are illustrative assumptions.

Title and licensed copy

Title, copy and online entitlement

Readerssearch, borrow, read online
Licensing serviceIssuance and revocation
Title searchNon-binding availability estimate
T-52 / X-52a title, a copy
Entitlement checkfor every online access
Lesende → TitelsucheSearch request
Titelsuche → T-52 / X-52Title + estimated availability
Anspruchsprüfung → LizenzdienstCheck the current entitlement

Every new read checks the entitlement; the licensing service is outside the library boundary.

Search → title; loan → one copy; licensing service outside the boundary; online reader checks entitlement.

The worked example

Commitment and limitation
A fictional library with one licensed copy and reading devices that verify entitlements online. Every new read checks the current entitlement; offline use is outside the scope.
Responsibility
Readers search for titles, borrow and return them. The library team maintains licensed copies and resolves returns. Platform operations ensures entitlement checks and reconciliation. The licensing service confirms issuance and revocation of online entitlements.

A title and a licensed copy are different entities.

A title and a licensed copy are different entities.

Allocation binds the specific licensed copy.

A title may appear in many search results while having only one licence.

The index shows titles and estimated availability. The relational datastore decides allocation of X-52.

Alternative considered
Treating search availability as a guarantee permits over-allocation.
Trade-off
Allocation may fail despite a search hit.
Reassess
Additional licensing models require their own rules.

Try it yourself

Assign search and allocation to their respective datastores.

A hint for your attempt

A title may appear in many search results while having only one licence.

Compare with a possible solution
Search
The index shows titles and estimated availability.
Reservation
The relational datastore decides allocation of X-52.

Apply to your project

What is the equivalent of the title–copy distinction in your project?

Step 2: the expiry instant is exclusive. Which conditions enforce this rule?