Search posts

Local-first PWA sync: last-writer-wins done carefully
Exactly-once doesn’t come for free: Kafka, Flink and ClickHouse
Building an end-to-end encrypted chat app with libsodium

Collection · 4 posts, read in order

Syncing a local-first app

From the sync protocol to real time: how changes move between devices, the bugs that failed silently, and SSE as connections grow.

  1. 01

    Local-first PWA sync: last-writer-wins done carefully

    Offline-first sync with IndexedDB: idempotent pushes, tombstones, seq order with advisory locks, server-corrected clocks, and data shaped to avoid conflicts.

    · 8 min read

  2. 02

    Four bugs that silently broke RxDB sync, and how they were fixed

    Rows stuck at version 0, a client-only column, a migration that never finished, and a resync loop: sync failures that never threw an error.

    · 10 min read

  3. 03

    Server-Sent Events in Spring Boot: Redis Pub/Sub and slow clients

    Real-time sync with SseEmitter: cookie auth for EventSource, fan-out across instances, a bounded write pool that drops hints, and when to consider WebFlux.

    · 8 min read

  4. 04

    SSE cost 118 KB per device on Spring MVC: moving to Centrifugo

    Each held-open SseEmitter cost ~118 KB of heap. Moving device connections to Centrifugo: publishing from Spring, recovery, GOMEMLIMIT, proxy memory.

    · 10 min read