Original practice scenario: A hypothetical international banking workflow receives an instruction close to a local processing cutoff. The sender, receiver and processing center use different calendars. Define scheduling behavior.
Read model answer +
Represent the instruction instant separately from each participant's business calendar. Adding twenty-four hours is not a general way to find the next valid processing day.
Work through it
Store the received UTC instant with the relevant local zone, currency or service route and the calendar version governing its cutoff decision.
Compute eligibility against local business intervals and holidays, explicitly resolving daylight-saving ambiguity and retaining the chosen processing date and reason.
Persist the scheduling decision under a stable instruction identity, re-evaluating only through a versioned correction when route, calendar or authorized priority changes.
Tradeoffs to discuss
Precomputed calendars simplify lookup but need controlled updates; dynamic decisions are flexible while increasing dependency and reproducibility concerns.
Common pitfalls
Do not compare local clock strings from different zones.
This practice scheduler must not imply settlement certainty or override the governing service contract and authorization process.
Original practice scenario: A hypothetical international report converts transactions into a reporting currency. Rates have effective dates, publication times and later corrections. Design the join and rounding boundaries.
Read model answer +
Declare the conversion purpose and rate convention before querying. A transaction-date rate, reporting-date rate and later corrected rate can answer different questions even for the same original amount.
Work through it
Retain original amount and currency with the selected rate source, pair direction and applicable effective interval, rejecting missing or overlapping rate evidence.
Choose the rate version known by the reporting cutoff when reproducibility matters, and handle inverse pairs through an explicit precision policy.
Apply exact or appropriately controlled decimal arithmetic with a declared rounding stage, reconciling original and converted totals and retaining the rate identity on each result.
Tradeoffs to discuss
Per-line rounding supports itemized reconciliation while aggregate rounding may differ; the reporting contract must choose and disclose one.
Common pitfalls
Do not assume a missing direct pair can be filled by an arbitrary currency path.
A zero or unavailable rate must not silently turn a transaction into zero reporting value.