← Back
Home › Systems › Energy, industry and public infrastructure

customs-single-window

declarations, tariffs, risk targeting and clearance: HS tariff engine, origin and valuation rules, risk selectivity lanes, multi-agency window

UNCTAD ASYCUDA, CBP ACE, EU ICS2, Singapore TradeNet

SystemTechniques · 31Primitives · 98 customs-single-window Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Durable workflow executiondistributed · medium: Ordinary code made crash-proof by logging every side-effect result and replaying the code from that log; activities run at least once, workflow logic must be deterministic.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Saga patterndistributed · medium: Split a cross-service operation into local transactions, each paired with an undo; on failure run the undos in reverse, or retry forward.›Hot-standby redundancyembedded · medium: A second, always-current controller shadows the primary and takes over within a few cycles of silence; epochs stop the old primary from fighting back.›Payment state machinefinance · medium: Persisted state machine for a payment lifecycle (authorize, capture, void, refund) that treats timeouts as unknown, retries with the same key and applies webhooks idempotently.›Tariff ratingfinance · medium: Rate usage events against price plans: tiers, time bands, bundles and rounding rulesMoney representationfinance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.›Trusted timestampingsecurity · low: RFC 3161 time-stamp tokens: a TSA signs a hash with time, proving data existed thenFuzzy string matchingsearch-sort · low: Edit distance, Jaro-Winkler and trigram indexes for approximate name and address matchingHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesCurrency cross rate triangulationfinance · low: Deriving cross rates through a base currency with correct precision, inversion and spreadsReconciliationfinance · low: Match internal ledger records against bank and processor statements by reference, then amount and date window; every unmatched or mismatched item becomes an exception.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›X12 edi messagingnetworking · low: ANSI X12 and EDIFACT interchanges: segment/element delimiters, ISA/GS/ST envelopes, control numbers and 997/CONTRL acknowledgementsAho-Corasick multi-pattern matchingsearch-sort · low: Find all occurrences of many fixed patterns in one pass over the text, in time independent of the pattern count, using a trie with failure links.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Row-level security (multi-tenant is…security · low: Append a policy predicate to every query inside the database, so a forgotten WHERE tenant_id = ? in application code cannot leak another tenant's rows.›XML Streaming Parserstorage · low: Tokenize XML into start, text and end events in constant memory, so a few fields can be extracted from huge, broken or hostile documents.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Publish subscribe event bussystems · low: In-process or on-box topic bus decoupling producers and consumers with bounded queuesCooperative schedulingconcurrency · low: Green threads/coroutines yielding at await points on a user-space schedulerRecord replaydistributed · low: Record every nondeterministic input (time, randomness, I/O, model and tool outputs, per-tick player input) and re-execute deterministically for debugging, replays and state rebuild+ 24 more techniques+ 82 more primitives

Similar systems

Share the most building blocks with this one.