← Back
Home › Systems › Finance, HR and back office

payroll

payroll processing

Gusto

SystemTechniques · 9Primitives · 39 payroll Batch checkpoint restartdistributed · medium: Large batch jobs (end-of-day, settlement, payroll runs) that checkpoint and restart idempotentlyDurable 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.›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.›Envelope encryptionsecurity · medium: Encrypt each object with its own data key and wrap that key under a KMS-held key, so rotation re-wraps 60 bytes and deleting a key shreds data.›Tamper-evident audit logsecurity · medium: An append-only log whose Merkle root, signed per batch, lets anyone verify an entry is present and history was never rewritten, with log-size proofs.›Bitemporal datastorage · medium: Valid time plus transaction time on every record for as-of queries, back-dating and correctionsRete rules enginesystems · medium: Match many rules against changing facts by caching partial matches in a shared network, so each change only does the work it actually affects.›Idempotency keysfinance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Double-entry ledgerfinance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.›Iso 20022 messagesfinance · low: ISO 20022 XML payment and securities messages (pacs, pain, camt, sese): structure and validationLargest remainder roundingfinance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorationsMoney 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.›Reconciliationfinance · 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.›Dual control approvalsecurity · low: Four-eyes / maker-checker approval with quorum policies for sensitive operationsBusiness day calendarssystems · low: Holiday calendars, business-day adjustment rules (following, modified following) and settlement cyclesCalendar date arithmeticsystems · low: Civil dates, time zones (tzdb), DST gaps, month-end anchoring and duration mathWrite-ahead logstorage · low: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.›Cron schedulingsystems · low: Cron expression parsing and next-fire-time computation, with catch-up and time-zone rulesRecord 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 rebuildEvent sourcingfinance · low: Persist state changes as an append-only stream of immutable events per entity; current state is a fold over them, guarded by expected-version appends.›Hierarchical timing wheelsystems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.›Exponential backoff with jittersystems · low: Retry after delays that grow geometrically and are randomized, so failed clients spread out instead of hammering a recovering service in synchronized waves.›Hierarchical state machinesystems · low: Nest states so a substate inherits its parent's reactions and only overrides what differs, with ordered entry and exit actions along the path.›+ 2 more techniques+ 23 more primitives

Similar systems

Share the most building blocks with this one.