Sam Willis
@samwillis
Sync Engines & Local First at @ElectricSQL Started http://PGlite.dev and co-creator of @tan_stack DB 🦋 @samwillis.uk 🦣 @[email protected]
A bunch of new followers here, so I thought I would introduce @ElectricSQL and how PGlite fits in. We are building a CDN native sync engine that can move your data in real time to where you need it. There are a few buzz words in there, so what do we mean? 🧵1/11
🎉 TanStack DB now has @sveltejs support! Thanks @wobsoriano! 🫡
Practical alchemy: a scientific paper on how mercury can be transformed into gold in thermonuclear reactors on an industrial scale (2 tons of gold per 1 GW of thermal power per year). 18 years of waiting, and the gold will stop being radioactive. marathonfusion.com/alchemy.pdf
TanStack DB has me just as excited as Query and Router did in their early days. So exciting watching the API and DX unfold.
New docs for the @tan_stack DB live query api 🚀 We completed a major refactor/rewrite of both the query builder and query engine a couple of weeks ago, and the docs are now live - link in 🧵 Live queries use IVM* to do the minimal work on each change.
New docs for the @tan_stack DB live query api 🚀 We completed a major refactor/rewrite of both the query builder and query engine a couple of weeks ago, and the docs are now live - link in 🧵 Live queries use IVM* to do the minimal work on each change.
My good friends son worked on this. What a file name for a paper 🚀 This is very cool!
marathonfusion.com/alchemy.pdf
⚡ Our Realtime service now handles over 20,000 updates per second! It wasn't easy to achieve this scale so we had to write about it. (Spoiler, we use the awesome @ElectricSQL). ↓
It's been a huge pleasure collaborating with the great folks at Trigger 🙏
⚡ Our Realtime service now handles over 20,000 updates per second! It wasn't easy to achieve this scale so we had to write about it. (Spoiler, we use the awesome @ElectricSQL). ↓
Excited to announce the initial release of the @trailbase_io integration with TanStack DB! Trailbase is a blazingly fast, open-source, single-executable Firebase alternative.
PGlite (WASM Postgres) now gets over 1 million downloads a week! 🤯🚀 Absolutely incredible to see how people have embraced what we have built. Awesome work by the team!

Love it when @cursor_ai starts a session by creating a "detailed 8-week implementation plan", then blasts through it in <20min 😂
Background agents with @cursor_ai are a game changer for me - particularly the mobile UI. I can be out and about (literally on holiday 😬), describe what I'm thinking, check in a couple of times, then pick it up on a laptop later on when home. Amazing!
"Should my web app use a sync engine?" If your web app would benefit from caching, live queries, retries, instantaneous UX, offline support, streamlined state, then the real question is... "Why *wouldn't* I use a sync engine?"
My first job was in an office with the bottom left most (half) window, designing medical devices. We had an incredible view of the chapel! The window above, a startup by Martin Porter, of the Porter Stemming algorithm, used by Postgres FTS via Snowball.
The view from a Cambridge window.
Two related, but separate ideas: 1. Local-first: An app that stores data locally, and works offline. 2. Sync-engine: Automatically syncing data between a web UI and a DB. These two ideas are often discussed under the umbrella term of "local-first". But that's unfortunate,…