Aaron Boodman
CEO rocicorp.dev. Building replicache.dev and zerosync.dev, raising two great kids, trying to be a better person. Also found at http://aaronboodman.com.
- Last year at Local-First Conf, we announced @zero.rocicorp.dev to the world. Now that it's real, I'm going to back to talk about how it's made. Hope to see you there!
- We’re thrilled to announce @aaronboodman.com from Rocicorp will be back as a speaker at this year Local-First Conf talking about the technology behind Zero.
- I just made a follow-up to my first video walking through using Drizzle with Zero! youtu.be/kkI8hlTyeqk
- I made a video walking through getting up and running with Zero Sync and NextJS! Check it out if you get a chance! youtu.be/IOw-LzKk-s8
- [Not loaded yet]
- I had not! Thanks for the pointer, will watch today!
- Quick demo of Zero's new Background Queries More information in thread below 👇
- [Not loaded yet]
- Yup it’s very early. We’ll get you eventually 😉.
- This is much different than normal caching because this data stays up to date. If you make the same query again, the results will be *instantly* available *and already up to date with server*.
- If you make a different query the data from the background query is used client-side to answer the new query instantly if possible. This all happens completely automatically. Just by adding the ttl flag. Learn more about Zero's query-based sync: zero.rocicorp.dev/docs/reading...
- It’s important to realize because of this syncing, Zero isn’t really a cache. It’s a replica. It’s eagerly replicating a slice of your database - the slice covered by the queries you have open. So there's never stale data in Zero. When you close a query, we delete its rows so they don't go stale.
- Of course that kind of sucks for the common case of doing a query, navigating, then pressing “back”. Ideally we want that to be fast. To address this Zero 0.17 adds background queries. You can add a ttl to a query and it will keep running and syncing in the background.
- Zero’s sync engine is query-based. Rather than specifying what to sync with rules or some separate system, you use queries. Right inside the client app, you do queries using a full sql-style language. You get filters, subqueries , limits, etc. Zero syncs the data for these queries to the client.
- www.youtube.com/watch?v=d0Q3... You are welcome.
- IVM go brr youtu.be/Y0X5I4WvlqA @zero.rocicorp.dev is a new sync engine built on incremental view maintenance (IVM). Sync has been used for years by projects like Linear, Notion, and Superhuman for insanely fast local-feeling UI. But they are notoriously difficult to build – years of effort.
-
View full threadThat’s right! Anything you change in db via any path gets replicated to clients. This is useful for integrating other non-sync systems with zero. If your goal is to do custom logic on write path from *zero* app, we are adding custom mutators soon for this: bugs.rocicorp.dev/issue/3045
- Custom mutators will get you instant local feel with custom code on write path.
- Had a really fun time talking to @thdxr.com and Adam about @zero.rocicorp.dev, Replicache, and how (and why!?) I came to spend the majority of my career working on sync. Hear the Rocicorp / Aaron backstory here: tomorrow.fm/126
- I have a close friend who runs search and rescue for the US coast guard in the pacific. You can't see at first when a system breaks down. A stress of some kind is required to show that it has hollowed out from inside. Let's just say now is not a good time to need help at sea.
- It keeps some intermediate on-disk state, yes. You can read more about the general approach here: www.vldb.org/pvldb/vol16/.... We did not actually use DBSP but were inspired by it and do some similar techniques.
- And yes, the computation is incremental. Simple edits only do O(1) work.
- Try it out yourself: bugs.rocicorp.dev We made our own Linear-style bug tracker with Zero as a dogfood, and have used it as our actual bug tracker for months.
- Zero is currently in alpha but it's maturing fast. We already have a few customers in production :). There's some really cool stuff coming up feature-wise and from there we plan to go to beta over the summer. Curious? Adventurous? Learn more at zerosync.dev.
- The end result is a really fun way to build web apps. You do a query direct from the client. Zero answers the query and keeps it up to date efficiently. But better, if you do another query that overlaps with the first, Zero reuses the already synced data to answer the new query ✨instantly✨.
- And, because the data is local, you can *mutate* it. Zero provides a synchronous local write API. Write directly to the client-side data and the UI updates *instantly*. Changes are synced to the server in the background. Conflicts are resolved with www.gabrielgambetta.com/client-side-....
- But doing this in a classic database would be insanely expensive. It would basically mean re-running multi-MB complex joins over and over, anytime ~any row changes. Worse, since every user has their own permissions, when a single row changes ALL users' queries must be recalculated.
- IVM has been an area of active development in backend databases, most recently by projects like www.feldera.com and github.com/mit-pdos/noria. We took these same ideas and applied them to sync.
- Zero is a ✨generalized✨ sync engine that should work for a wide variety of apps, and is enabled by IVM. In traditional dbs, you do a single query and get a single result. If data changes, you re-run the query. Even in "realtime" databases, what's usually happening is re-running queries.
- For a sync engine, we really need IVM because of permissions. We want to sync MB of data to the client, but only what the user has access to. These permissions naturally take the form a set of complex queries. What we really want is to sync the result of these big queries continually to client.
- This song is one of my favorite musical discoveries of last month or so. Absolutely love the groove. Bass sound is _on_ _point_. But really the entire thing is just perfect. So shimmery.
- 🩷 Special valentine's day Zero release 😊🎶👇 www.youtube.com/watch?v=D7S8...
- [Not loaded yet]
- This sounds complete bonkers to me. Array is going to be way better. Unless you need to splice into it often in which case Array is still probably better due to native impl and data locality effects.
- 🩷 Special valentine's day Zero release 😊🎶👇 www.youtube.com/watch?v=D7S8...
- [Not loaded yet]
- It uses server reconciliation. This is a CRDT-like technique that has some nice advantages when you can rely on a central server. It is explained on this blog post from our previous project Reflect: rocicorp.dev/blog/ready-p...
- I instituted a weekly release policy for @zero.rocicorp.dev and I had no idea how much pressure that simple change would create for everyone, incl me as release manager. Mostly a good pressure, but still.
- I've found that novelty is like 50% of marketing. People learn to detect and filter out cliches quickly. And it makes sense: if you describe your product the same way as everyone else, the product itself is also probably uninteresting. Find a new way to say it. Find a new way to show it.
- I basically live in iOS "focus" mode now, and batch communications at a few points in my day. It's incredibly refreshing. Highly recommended.
- Hate to give away our secrets, but if your product takes the form of an npm library, get you a canary build script. You should be able to push a button and get the user a build from trunk, fully automated. One of the best effort-to-value things I've ever built: github.com/rocicorp/mon...
-
View full threadYep, npm has a feature where you can give builds tags. The “latest” tag is the default and what people get when they install without any version specifier. But you can create other labels. We have a “canary” label we push to between releases which people can install like “@rocicorp/zero@canary”
- The canary script build zero from trunk in a clean directory and publishes our npm package and docker image to these “canary” tags. This allows us to get fixes out to users fast without a full release and also gets us early testing of new features before release.
- Well, that and a Greg :). Both required to really make this work well.
- Short, off-the-cuff video of how Zero works. Made for someone in our Discord, but I thought people here may be interested: www.youtube.com/watch?v=Zoet...
- I'm not complaining but they done made these chips too good. I still have this one and still can't believe how fast it is. No need to upgrade.
- Why do release note have to be boring? Trying something new ... 🙃
- Zero 0.13: Horizontal scalability, zero-downtime restarts, and SST support. Complete details at zero.rocicorp.dev/docs/release...
- Sync engines enable web apps with: - instant (< 1ms) interactions - full-stack reactivity - dramatically simpler dx Despite this, sync hasn't taken off because it doesn't generalize to more complex apps. I'll be speaking about how @zero.rocicorp.dev solves this next week. Come check it out!
- Aaron Boodman @aaronboodman.com will introduce Zero: A Sync Engine for the Whole Web for the final session. The much-anticipated launch from the folks that brought you Replicache.
- [Not loaded yet]
- Long version here: www.youtube.com/watch?v=rqOU... Short version is existing sync engines really want to download all or most data to client ahead of time. This not realistic for majority of apps. There are attempts at partial sync but they are too hard to use.
- Unrelated weekend post. My daughter has gotten into outrigger canoe paddling (it is what kids do here) so for her birthday we’re doing an 8 mile open water race together - our longest yet. If you don’t hear from me after this you’ll know what happened 😆.
- We made it. Work on Zero continues.
- [Not loaded yet]
-
View full threadthe open source ecosystem is far more developed and active for js creating an environment where evolution and competition happen very quickly on many dimensions. Type design quickly became a way libraries could differentiate.
- I think these effects would hsce happened eventually in Java and c++ too, but the rate of change in these ecosystems is so much lower it just happened first in js land.
- [Not loaded yet]
- I think because the scale of the JavaScript market is many times that of c++ or Java, making this essentially the first time these kind of type systems are mass market. Also…
- [Not loaded yet]
- Don’t be ridiculous! Molokai 2026?🙃
- Types are like UI for programmers. They are how developers interact with your api. And just like ui design they have a huge impact on how devs perceive your product, independent of its reality. Just like ui design a whole specialty of typescript programming has sprung up to optimize this experience.
- Microsoft of course didn’t invent these kind of type systems, but TS is the first mass market deployment of them so the first time these design aspects have really developed.