Topic · 6 posts
Local-first & sync
Apps that keep working offline: sync protocols, IndexedDB at scale, real-time updates and PWAs on iPhone.
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
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
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
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
A large tree in IndexedDB with RxDB: indexes, trigram search and lazy loading
Why a nullable parent ID made a 61-node query take 19.6 s, and how a shadow index, diacritic-free trigrams and virtualization fixed it.
· 8 min read
An installed PWA on iPhone: safe updates, deploys and iOS details
Updates that wait for the user, deploys that broke open tabs, a launch logo measured on the device, zooming fields, and Web Push for a local-first app.
· 9 min read