← Back
Home › Systems › Frontend and UI

offline-first-mobile

offline-first mobile app with sync

Linear mobile

SystemTechniques · 13Primitives · 55 offline-first-mobile CRDTsdistributed · medium: Data types whose replicas accept writes independently and always converge by merging, with no coordination: counters, sets, maps, registers, text.›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.›Incremental sync cursorsdistributed · medium: The client keeps one opaque token; each pull returns only the changes after it plus the next token, so sync cost scales with what changed, not with the dataset.›Offline mutation queuedistributed · medium: Apply actions locally at once and queue them durably; on reconnect replay the queue idempotently, then re-apply unconfirmed ones on the server state.›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.›Coverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›Point-in-time recoverystorage · medium: Periodic base backups plus a continuously archived change log let you rebuild the state as of any instant, then branch from there.›Write-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.›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.›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.›Delta encodingcompression · low: Store differences between consecutive values instead of the values, turning sorted IDs, timestamps and counters into small numbers that pack into few bits.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesMerkle treedata-structures · low: Hash tree for verifying and diffing large datasets with logarithmic proofsHybrid logical clocksdistributed · low: A 64-bit timestamp that tracks wall-clock time but never goes backwards and respects causality; the default timestamp for MVCC databases without atomic clocks.›Mobile background executionhardware-os · low: IOS and Android background task, fetch and push-wake limits for syncing appsProcess 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.›WebSocketsnetworking · low: Full-duplex message framing over one upgraded HTTP connection; the standard way to push real-time data to browsers.›AEAD (AES-GCM, ChaCha20-Poly1305)security · low: Authenticated encryption that encrypts and detects tampering in one call; the only kind of symmetric encryption you should use.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Sessions vs tokenssecurity · low: Opaque server-side sessions in cookies for browsers, short-lived signed tokens between services; revocation decides most cases.›B+ treestorage · low: Balanced high-fanout search tree with all values in linked leaves; the default on-disk index for point lookups and range scans.›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.›Fractional indexingdistributed · low: Give every list item a sortable string key and generate a new key strictly between its neighbours, so a move or insert writes one row.›+ 6 more techniques+ 39 more primitives

Similar systems

Share the most building blocks with this one.