System Design Atlas

Property rentals and service charge statements

04 / 10Worked example

Interfaces

How can “repeat receives the same release” be proven in the specific case?

After committing, the response to property management may be lost.

Starting point Test peak load separately from two competing approvals of the same statement.

Assumptions for the example case

Fictitious design for a house, a completed annual period and a contractually specified area key. The application documents released billings and correction versions; the legal examination of individual costs remains with property management. All quantities, thresholds and operational targets are illustrative assumptions. The signed amount due equals the allocated cost share minus advance payments already accounted for. A separate immutable payment ledger records only additional positive payments received later. Outstanding balance = current amount due minus the sum of these additional payments. A positive balance is the remaining amount due, zero means settled, and a negative balance is a credit equal to its absolute value. Corrections replace the amount due, retain all payments and post only the difference from the previous amount due. They remain permitted after settlement and for credit balances. Actual positive payments are accepted and deduplicated even when they exceed the remaining amount due or arrive after settlement. Advance payments are not counted again in the additional ledger. Refunds are outside this case; a credit documents a balance and does not receivable a payout.

Release and repetition

Release agreement · Key, version and content

Release CommandKey X · expected=3 · Document hash · 2,000 cents
Freigabe-Command → SchlüsselprüfungCompare first
Key validationFingerprint + result
identicalReturn version 4
ModifiedIdempotency conflict
New + version=3Exactly one commit

The same repetition returns version 4; an altered amount with the same key is left without write effect.

Branch for new key, identical repetition and changed repetition; three clearly named responses.

Proposed domain contracts

  1. POST/abrechnungen/A-39/freigaben

    Approve the document version and receivable together.

    Input
    Command key, expected version 3, tenancy M-39, document with K-39 and key version.
    Result
    Released version 4 with 2,000 cents due or version conflict.
    Retry behaviour
    Same key and identical content gives the same result; changed content gives conflict.
  2. GET/abrechnungen/A-39

    Recognize the status of release and delivery.

    Input
    Eligibility for the tenancy.
    Result
    Document version, amount and separate delivery status.
    Retry behaviour
    Reading does not change either receivable or delivery request.

Retries preserve the same approval.

Retries preserve the same approval.

Store the command key and normalised input hash with the result.

After committing, the response to property management may be lost.

Identical repetition provides the original version and receivable, without further effect. Another amount under the same key results in conflict; a real correction uses a new command to the current state.

Alternative considered
A new key in each network attempt would simulate new domain intentions.
Trade-off
The result store requires a defined storage.
Reassess
An amended release process requires an explicit version of the contract.

Try it yourself

The release with key X and amount due 2,000 cents was saved, the response was lost. Predict the results for identical replay and for X with amount due 2,001 cents. Describe the path of a real correction.

A hint for your attempt

Track the released accounting up to the documented result; note identical and changed repetitions.

Compare with a possible solution
Retry behaviour
An identical replay returns the existing approval without another receivable effect. An amount due of 2,001 under X produces a conflict and changes nothing.
Correction
A real change gets a new command on the current version. It generates a new document status and a change in the amount due; the additional payment ledger is completely preserved.

Apply to your project

What decision do you need in your project for a repeated assignment?

Step 5: How can “correction and payment keep own life cycles” be proven in the specific case?