Zero Sync Makes Local First Easy

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 102

  • @fitzsimonsdev
    @fitzsimonsdev Місяць тому +28

    Scott you're so likable when you get super excited about something. I'm so excited to use Zero and React Native together. Can wait for Xmas break from work

    • @syntaxfm
      @syntaxfm  Місяць тому +9

      You should check out the “One” framework. It’s Zero + RN and a lot of good stuff.

    • @devagr
      @devagr Місяць тому +1

      is that an agents of shield reference in the wild

  • @moritzlaube1676
    @moritzlaube1676 Місяць тому +21

    Thanks Scott! I'd be excited to see more of Zero in conjunction with Sveltekit and Coolify! ;) Thanks again for your great content

    • @MadeInJack
      @MadeInJack Місяць тому

      Same, the stack of my dreams! With drizzle and a self hostable backend like Supabase. The perfect web app!

  • @DiegoBM
    @DiegoBM Місяць тому +4

    Please bring as much content about this as you can. Great video, got me hyped!

  • @AaronBoodman
    @AaronBoodman Місяць тому +9

    Wow, Scott. Thank you so much ❤. I didn't expect this!
    PS:
    - early on - if you set the repeat rate of your keyboard higher it goes even faster 🙃
    - at 9:40, we have an `upsert` method :).
    - at 10:00, PK doesn't need to be an array in the common case where its a single field

    • @hugodsa89
      @hugodsa89 Місяць тому

      Hope it gets pinned to the top so other people can see it. 😃

  • @LegendKeeper
    @LegendKeeper Місяць тому +11

    This looks awesome! Very curious about advanced permissions, like hierarchical stuff, and performance at extreme cases. We built our platform using Yjs, and permissions and performance edge cases in prod have always been the trickiest part.

  • @a-poor
    @a-poor Місяць тому +3

    This was great! Please keep the zero / local-first content coming!

    • @syntaxfm
      @syntaxfm  Місяць тому +3

      Def more coming.

  • @AxelRock
    @AxelRock Місяць тому +2

    Wow, this sounds amazing. I wanted to try to recreate something like that next week, this is perfect timing, I'll give it a try.
    The implementation looks amazing, I could see a lot great services wanted to "bind" to Zero (👋 Supabase, I bet they are already working on it).
    Thank you so much for the discovery. This December is full of nice stuff for us devs.
    Also, your eyes looked a bit watery, I hope it's just a lighting thing, and that you're healthy. Take care Scott, happy holidays

    • @syntaxfm
      @syntaxfm  Місяць тому +2

      All good, def healthy, possibly lighting. Thanks for the concern though. 😀

  • @HappyCheeryChap
    @HappyCheeryChap Місяць тому +16

    I'm 3 minutes in, and still have no idea wtf this thing even is... I've heard "platform" 100 times, and have no idea what that's meant to mean here.

    • @greeneyed-px5pd
      @greeneyed-px5pd Місяць тому

      Going to the Zero docs is not much help either. I am a kind of hobby-level programmer and can understand a few things but I do understand that this is kind of intermediary between the client code and the backend database and it brings in the database to your local machine and only goes back if it has to. BUT this understanding is very shallow and not usable at all, at least for me.

    • @tantalus_complex
      @tantalus_complex Місяць тому +3

      It's a database solution which straddles the gap between the backend and the frontend. Zero maintains a local cache in the client of data received from the backend database, and it also handles the actual requests over the network, as well as syncing.
      Because it's local-first, offline functionality is easy to achieve and the cache speeds up a lot of redundant data fetching tasks.
      And because it bridges the gap between the frontend and the backend, your backend API layer can be very lean.

  • @ngideo
    @ngideo Місяць тому +1

    Drop-in looks sick, thanks for making zero svelte friendly

  • @hugodsa89
    @hugodsa89 Місяць тому +1

    I’d love to see more Scott videos with tuts like CJ sometimes does

  • @JonBrookes
    @JonBrookes Місяць тому +2

    Thanks so much for tthis video. Zero Sync is clearly extremely cool tech and with the possiblilty of self hosting is the win for me as opposed to that of a deal breaker with solutions that do not let you do that. I dont mind paying for services as they cost to run but if you need to develop within regulatory contrains, entirely on someone elses cloud for your data is not always viable.
    I can't help thinking that this is like a PWA without saying the word PWA or even needing to include a manifest !

  • @paulvickers8059
    @paulvickers8059 Місяць тому +3

    Would love to see tutorials on this with Svelte. Thanks for your work, this looks amazing.

  • @joaquimley
    @joaquimley Місяць тому +1

    Hopefully the drizzlezero translation comes soon, would be awesome!
    This look super promising, keeping an eye out for zero

  • @peachesfruitella
    @peachesfruitella Місяць тому +1

    Been waiting for this to drop - really hyped by this. Also loving your lead on local first - so great to be talking about exciting things in the web space, rather than the topic being about which framework is better (yawn)

  • @hugodsa89
    @hugodsa89 Місяць тому +4

    More local first content

  • @xalium
    @xalium Місяць тому +2

    “local first” reminds me of Meteor so this is interesting.
    I wonder how these websocket based apps would scale for high volume and highly concurrent usecases, even if it’s just reads e.g., 10,000 people looking a single post getting live edited by the author.
    Seems like 10,000 persistent tcp connections, which I think poses different types of scaling issues (mostly in the network space).
    For multi tenant, low volume or low concurrency usecases, this seems great.

  • @rodrigocornidez1917
    @rodrigocornidez1917 Місяць тому

    This is awesome, I'm looking forward to the beta release! Thank you for reviewing.

  • @theklr
    @theklr Місяць тому +3

    lofi gang taking over '25 and beyond

  • @pauek
    @pauek Місяць тому +3

    I'm still trying to figure out if meta-frameworks are dead... with this, they almost look dead to me. I was already comfortable thinking that they would last at least 5 years, but local-first is stronger, clearly. We're back at SPAs, but this time the backend almost evaporates. I'm buying so much pop-corn to watch this unfold...

    • @dandogamer
      @dandogamer Місяць тому +2

      You still need SSR or static content for good SEO. That's where an SPA falls short and why we ended up in this meta framework situation

  • @islanddev4893
    @islanddev4893 Місяць тому +1

    Its monday, all webdevs should remember to change their stack...

  • @Stoney_Eagle
    @Stoney_Eagle Місяць тому +1

    This is crazy 😲

  • @Danielo515
    @Danielo515 Місяць тому

    So they finally released! After having me hyped for months !

    • @syntaxfm
      @syntaxfm  Місяць тому

      Been waiting for this day, just so I could spill the beans on how good it is

  • @etiennemc2613
    @etiennemc2613 Місяць тому

    Wonderful ! I'm interested by local first video, thanks !

  • @bolte5987
    @bolte5987 Місяць тому +1

    Personally, I'd like to integrate this with Astro using Sveltekit as the fontend, and Supabase as the backend.

  • @eleah2665
    @eleah2665 Місяць тому

    Hi Scott and thanks.

  • @TheBoazhoch
    @TheBoazhoch Місяць тому +1

    Feels like meteorjs all over again

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      Meteor was mostly just web sockets. This is much more novel than a rehash of real-time.

    • @AaronBoodman
      @AaronBoodman Місяць тому +1

      Big fans of meteor. We’re trying to do meteor but much more composable. You’re not opting into entire meteor ecosystem. Zero works with standard postgres, standard web frameworks, and will work with other dbs in future.

  • @Quantum_Nebula
    @Quantum_Nebula 26 днів тому

    This is really amazing! I am curious how might I integrate this with my astro.

  • @TillmannHuebner
    @TillmannHuebner Місяць тому

    Getting Meteor Mini Mongo vibes here

  • @MrJfergs
    @MrJfergs Місяць тому +3

    I tend not work with alpha software but I will definitely be looking into this once it has an official release.

  • @amerrashed6287
    @amerrashed6287 3 дні тому

    It seems having similar approach to convex platform. I don't know why not covering convex. It's really cool stack.

  • @JohnPywtorak
    @JohnPywtorak Місяць тому +1

    What’s the catch? Is it a library, pricing, all missing from the site. What’s the zero server, missing info, and open source! Hello zero doesn’t seem like it.

  • @JTWebMan
    @JTWebMan Місяць тому +1

    What about window functions like total questions? Or total bugs? Does it have to pull all of them to get it? Also React Native?

    • @AaronBoodman
      @AaronBoodman Місяць тому +1

      Aggregates are coming in beta. No we don’t have to pull all data to client to calculate.

  • @tithos
    @tithos Місяць тому +5

    is "Drop In" the name of the product? If not what is it and where is the link?

    • @syntaxfm
      @syntaxfm  Місяць тому +4

      github.com/stolinski/drop-in Not really a product but a starter I’ve been using for myself. Now that Zero is in alpha I can develop in public

  • @gncfhcnvc
    @gncfhcnvc Місяць тому +1

    I would like to see a tutorial for Zero Sync

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      On the way 🫡

  • @LawJolla
    @LawJolla Місяць тому +2

    I never understand how “local first” is anything other than a toy. Most apps of consequence have business logic. When I add a product that just sold out to a cart, what happens? Call an API to get sales tax info? Etc.
    I’d love to see a real world demo of this tech.

    • @syntaxfm
      @syntaxfm  Місяць тому

      Look at apps like Linear and Superhuman for successful local first apps. Many of the fastest apps you've used use these local first techniques. For something like product stock, you would def not want to use this

    • @LawJolla
      @LawJolla Місяць тому

      @ both use in house solutions.
      If you’re not using it for something as basic as product carts, then it sounds like you have a bifurcated data solution where everything is manually stitched. Nightmare. Or at least not worth the trouble.

    • @AaronBoodman
      @AaronBoodman Місяць тому +1

      Replicache (our prior product) supports arbitrary business logic. Zero will too, soon.

    • @LawJolla
      @LawJolla Місяць тому

      @ thanks for the reply! I’d love to see a “real world” example combining zero + zero business logic + a backing server when you get there.

  • @dandogamer
    @dandogamer Місяць тому +1

    So if im understanding this correctly the logic for zero is done on the client. And you write queries that get synced to your database. Doesnt this expose a huge security flaw in your application?

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      There is a server, it's just being controlled by the sync process. There is a permission and access api to prevent any security issues.

  • @Kaalkian
    @Kaalkian Місяць тому +1

    sqlite encrypted local first that sinks to a cf blog automatically. does that exists lol

  • @rzkysyz
    @rzkysyz Місяць тому

    Reminds me of Meteor

  • @404-not-found-service
    @404-not-found-service 3 дні тому

    wow

  • @abdelhameedhamdy
    @abdelhameedhamdy 22 дні тому

    Can I use it to make two way sqlite Postgres sync ?

  • @prashlovessamosa
    @prashlovessamosa Місяць тому +1

    Please build something with this I will try to replicate the process by myself.

  • @javajoint
    @javajoint Місяць тому +1

    So, I did browse the docs, and it's not clear to me what's happening on the server side(?).. .you patch something, and it needs to update the DB, and... is it an ORM that's handling all of the updates to Postgres? I understand the client side DSL and the speed, and that seems great. Explain server side a little?

  • @hashproton
    @hashproton Місяць тому +1

    Thanks Scott, how this compare to convex (I know the local part and postgres integration)

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      I haven't used Convex but I know people love it. This does less than Convex in terms of overall features but this has a very novel way of syncing and loading data to be so fast. Zero is something you'd pick if you want to control and work with your own db.

  • @MM-24
    @MM-24 Місяць тому +1

    I didn't see any reference to the source
    How do we validate that even as self hosted with docker, it doesn't dial home.
    Ive got extremely condifential data app fhat would be great to use this with

    • @syntaxfm
      @syntaxfm  Місяць тому

      Repo is here if you want to paw through it. github.com/rocicorp/mono

  •  Місяць тому +1

    lol. People are amazed when a software do the basic: be fast (as ALL of them was in the 90's).

    • @syntaxfm
      @syntaxfm  Місяць тому +2

      I personally didn't used a website that fast in the 90s. You were typically doing a full page reload on every route change. Ajax loading 100 bug issues was never and could never be this fast for the simple fact that there aren't network requests.

  • @jimshtepa5423
    @jimshtepa5423 Місяць тому

    what is its relation to framework like remix/next/astro? does it replace them or complements/integrates with them?

    • @AaronBoodman
      @AaronBoodman Місяць тому

      Orthogonal. You can use this kind of framework with zero but:
      a. Zero doesn’t support ssr very well yet. You can do it, but it’s not elegant.
      b. You may find yourself not wanting many of the features of these frameworks as much - for example you will not need remix or next’s optimistic mutations or caching features because zero provides these in a better way.

  • @BrandonAaskov
    @BrandonAaskov Місяць тому

    Louder than the other day, still too quiet. Maybe a compressor/limiter would help?

    • @WojtekPoroslo
      @WojtekPoroslo Місяць тому

      it's plenty loud for me...

    • @syntaxfm
      @syntaxfm  Місяць тому

      This is compressed and normalized. Should be the appropriate volume.

  • @aghileslounis
    @aghileslounis Місяць тому +3

    I'm skeptical about this abstraction, I don't think it's the right one. Business logic can't be on the frontend, it's too complex, and you can't maintain it for a long time.
    I think the proper abstraction must be completely hidden for the developer, no schema declaration or any other layer.
    I imagine tanstack-query implementing that internally, and it will be just a flag to turn "true" to automatically handle all the caching and use of indexDB, same for mutations. I think it's feasible.

    • @azizsafudin
      @azizsafudin Місяць тому +1

      I agree, I would much rather persist it locally via Tanstack query.

    • @AaronBoodman
      @AaronBoodman Місяць тому

      The core ideas in tradition frameworks are incompatible with this kind of performance. The reason sync engines are fast is because they proactively sync data to client an enable it to be manipulated locally. This can’t be done on top of traditional apis.

  • @benjaminng8882
    @benjaminng8882 Місяць тому

    Is that means anyone open dev tool can know my DB scheme? 🤔

  • @dovh49
    @dovh49 Місяць тому

    I build my offline first apps in a service worker. So, my front end never touches the db. Would this work in a service worker?

  • @SpeakChinglish
    @SpeakChinglish Місяць тому

    How does this solve the issue which makes Firebase auth difficult to use? If I'm an user then take the jwt from network tab, then try and query your zero service, what's stopping me from request things I shouldn't have access to? e.g. request someone else's personal details?

    • @syntaxfm
      @syntaxfm  Місяць тому

      There are “select permissions” zero.rocicorp.dev/docs/permissions#select-permissions that give you control over who can select what.

    • @poolkrooni
      @poolkrooni Місяць тому

      How is this an issue with Firebase? 🤔 RLS and rules solve this (same for Supabase, etc)

    • @AaronBoodman
      @AaronBoodman Місяць тому +1

      A few things:
      1. Zero permissions use ZQL, a full query language. Firebase's are more a configuration language and a lot more limited. If you've used Postgres RLS, Zero permissions are closer to that than Firebase rules.
      2. In some ways this kind of system is _more_ secure, because you think about access at the level of invariants not procedural code. So you don't have to re-implement security in every endpoint, you do it once in a common location. It's also a less common way for devs to think about permissions though, so there is a tradeoff.
      3. Zero doesn't currently have column permissions - if a user has access to a row they get the full row. So like if you have `user.address` and user A has access to user B, user A will see user B's address. This is just an alpha thing and will be fixed. And we will default this to closed, so that you have to open each column specifically.
      4. The permission system is still in development and we have some new ideas percolating for beta that I think will really improve it.

    • @joaquimley
      @joaquimley Місяць тому

      @@AaronBoodman thanks for the detailed explanation.

  • @TheZyruks
    @TheZyruks Місяць тому +1

    I just wanted to say it. First comment lol

  • @emmanuelxs6143
    @emmanuelxs6143 Місяць тому

    Swxind to comment 😢

  • @ComedyForYooou
    @ComedyForYooou Місяць тому

    zql looks ugly af. I much prefer "drizzle".

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      They aren't competing technologies. Zero isn't an orm as much as it is a local caching and sync system that happens to eliminate the need for server side orms.
      I typically use Drizzle with Zero.

    • @ComedyForYooou
      @ComedyForYooou Місяць тому

      @ I understand that, but I do not see the benefits of zero. My stack is about the same speed and way more flexible.

    • @syntaxfm
      @syntaxfm  Місяць тому

      I get the skepticism, but your app is most assuridly not even close to the speeds this can produce loading data for nothing even Zero related. Storing data locally will always be tremendously faster than anything you can produce over the network even with caching.

    • @ComedyForYooou
      @ComedyForYooou Місяць тому

      @ 50-650ms response time is definitely no magic.

    • @syntaxfm
      @syntaxfm  Місяць тому

      No magic, just physics. You cannot load this amount of data remotely anywhere in the same universe as fast as from data stored locally on device. This is not 50ms-650ms loads by a long shot

  • @ComedyForYooou
    @ComedyForYooou Місяць тому

    Honestly. I don't like it.