Skip to main content
View on YouTube to comment and like!

about 1 year ago Syntax Podcast

Sync Engines and Local Data

Wes Bos

Wes Bos Host

Scott Tolinski

Scott Tolinski Host

Topic 0 00:00

Transcript

Scott Tolinski

React.

Scott Tolinski

for a long time.

Wes Bos

kind of tricky in some cases because you can the client side

Scott Tolinski

He he's been around the data game a long time.

Scott Tolinski

already existing for this thing.

Scott Tolinski

instantaneous. I'm saving, All of these things, There's adapters for Vue, Solid.

Scott Tolinski

to me in this is nicer than some of these other ones because, you know, the hosting side of things Welcome to Syntax. Today, we're gonna be talking about one of my favorite topics, which is local data and sync engines. Now some of these options that we're gonna be talking about are one or the other, some are both. We're gonna be just kinda going down the lay of the land of all the different flavors out there and why you might pick certain ones and what are some of the newer players to the game because that's right.

Scott Tolinski

probably Liveblocks take

Wes Bos

earphone covers. Everybody always asks me where Wes where I'm getting them. They're kind of obnoxious.

Scott Tolinski

the documentation, You gotta love an exciting demo. They do have an llm's.txt And sometimes they take

Wes Bos

game reminds me so much of indoor recess,

Scott Tolinski

and you're getting

Wes Bos

compressor, the gate. I have pretty much everything. All I have to do is plug in my laptop, but I obviously don't have

Scott Tolinski

you're you're doing RPC calls, what look like that on the client side, and it just takes care of the rest. And to me, that's like though these ones that are, like, taking care of all of the minutiae

Wes Bos

sessions and stuff like that. So it does replace your, like, your user system. Like, how far does this go? Oh, there is no JWT based auth inside of here. You would bring Node

Scott Tolinski

local data.

Scott Tolinski

And give Convex a look. Yeah. Convex is a paid product. Free and starter projects are free. Professional teams, Railway, those types of things. You can get this going yourself. So if you Yarn that type of person, you can do that. Tanner Lindsley, he he's sponsored by Convex, which And it's because Courtney wanted to learn mahjong, but, like, My wife is always into finding we're not like a not like a board game family. We're not playing all the crazy board games, but we do play games. We like to, you know, have have, And And we've talked a little bit about Local Oh, yeah. Because that was gonna be my answer. No. The f fast but, like, someone listening. Yeah. Voo. Yeah.

Scott Tolinski

I think that tweet is accurate.

Wes Bos

to log in. But

Scott Tolinski

write my schema in Drizzle and migrate that database in Drizzle Yeah. So that my Postgres database is ready for that local data sync. Right? So if you have something that has a hosted version of it like Convex, you click a button, you get an endpoint or whatever, and then you can just connect it, that is going to be the fastest way.

Scott Tolinski

where some of these solutions And it's a really interesting approach. So the entire thing is,

Wes Bos

freaking

Scott Tolinski

And that tweet that is going around because I think in the past year, people have been starting to take notice.

Wes Bos

And I'm bummed. So now I'm I'm I'm using my,

Scott Tolinski

and that and they can give you, like, a Okay. Server side. This is like a real time data stack for doing you know, games that aren't or activities that aren't based around

Wes Bos

every while. So I have bought them from Wicked Cushions in the past. I've bought them from AliExpress in the past.

Scott Tolinski

I I think that is going to happen with whatever this platform ends up being that takes the cake and makes it that.

Scott Tolinski

is the best if you want a sync engine

Wes Bos

what would normally happen is that data would then sync to the back end, and then hopefully, you don't have any conflicts. And if there are conflicts, there's these and I'm I'm assuming I would really like this in LiveStore.

Wes Bos

I think, probably ten years. I've converted them to USB C. I absolutely love them, but,

Scott Tolinski

And anytime there's changes to the remote database, it pulls them into your local data. Anytime there's changes to your local data, it pushes them to your remote database.

Wes Bos

I replace the ear pads on them every Yeah. It was just huge in, like, the Dutch circles.

Scott Tolinski

in a good way Wes like, you have a to do. That to do is created. Task completed. Whatever. Those are events.

Scott Tolinski

that already exists or a new one.

Scott Tolinski

Somebody's putting together a Svelte one right now. There's a PR for it. There's React, Zero. Even though it's I say this as alpha software, it's the most mature of the

Wes Bos

Alright. Should we wrap it up here?

Scott Tolinski

man, I can't even I can't even come up with most of the names anymore.

Scott Tolinski

but it does give you that access to connect it to your

Wes Bos

service in because of the weird roof on it.

Scott Tolinski

real time sync. Right? Some of the other ones, I guess, in this case, would be like Replicache.

Scott Tolinski

which is awesome.

Scott Tolinski

the entire system feels like

Wes Bos

you you need that data in the same database for for the rest of your application to work. Right? So Yeah. This makes a lot of sense that you would reach for something like this in an existing app.

Scott Tolinski

and you wanted to turn it to be, like, in a local type of data syncing project,

Wes Bos

where This

Scott Tolinski

theoretically throw Xero on there without much strife,

Wes Bos

and I see this all the time. Like, I'm on the Bose subreddit. I'm on the Sony subreddit,

Scott Tolinski

they're really good because they're super fast. They feel native or they are native, and they're saving data locally.

Scott Tolinski

yeah. What's great about Rummy Cube is that

Wes Bos

holy crap. We got the tech to build this these AI

Scott Tolinski

what I hope to get out of this by the end of this episode is for you to understand I personally, conform your own opinions on if any of these will be that that sync engine of the future.

Wes Bos

like React. It will be So does this replaces

Scott Tolinski

that this is so nice, but, definitely something that you should check out. One really cool thing about the, like, undo, redo, replaying of events and it handles the the real time syncing. But what it doesn't handle is how that data gets resolved on the server. So you have to write an endpoint for pushing, write an endpoint for pulling. You have to manage the versioning.

Scott Tolinski

with as patch messages of the data that should be there. And when data JS changed, it then has the opportunity to sync with the database offline,

Wes Bos

CRDTs that will allow you to hopefully resolve them. Right?

Scott Tolinski

Whether or not long term it proves to be, like, the best approach, I don't I have no idea. They do have a thing on their LiveStore Vercel Redux. LiveStore shares a lot of similarities with Redux in the sense that both are based on event sourcing. So you nailed that, Wes.

Scott Tolinski

and there's, like, Okay. So a little bit of a recap here. And in some of these, you'll hear me talk about some ones that we didn't go deep on, but there's a reason for that. So PowerSync you know, pretty widely supported.

Scott Tolinski

and it is like a app You want real time. You want collaborative. You want local data. You want those things, Another one here option is PowerSync. Now PowerSync is just the sync server. It it doesn't handle the local client data, and it doesn't handle the server side, side of things. It just handles the syncing, which is great if you're looking for a sync server.

Wes Bos

I with Redux, I really like that approach,

Scott Tolinski

which, you know, sometimes you wanna think about that. But if I'm starting a project from scratch, I warp it to all just just kind of work, but still give me access to everything. This is a very different approach, and your data is stored more traditionally AI agents in your product.

Scott Tolinski

maybe you can Now there's a SQLite browser pricing or anything. In that in, like, five seconds. Like, no time at all.

Scott Tolinski

is what this uses on the client side, which is a WASM based Postgres. So p g lite. It's a lite version of Postgres in WASM in the browser, and that's how it stores data on the client side. And then on the server, I'm assuming you're just writing Yes. I'm gonna give this a nice shake here. Another thing I really like about LiveStore that saves the information locally.

Scott Tolinski

is great if you want your

Wes Bos

have a ton of of overlap in how they work. Right? Obviously, you're still wiring up clicks and fetching data and whatnot, but it was such a major change. And I think part of the reason we've never seen, like, a real React killer like, we have lots of alternatives. Right? We have Vue and Svelte and and Angular and whatnot, but nothing has sort of, like, dethroned I I also think that two of the

Scott Tolinski

there is a SQLite database the the hosting

Wes Bos

Beautiful.

Scott Tolinski

this is called LiveStore,

Wes Bos

in this point. Endpoint. You gotta save it to your database. Honestly, like, this is Which one am I reaching for? Not given the fact that you want always reach for the one you haven't tried.

Scott Tolinski

So they hit a lot of the edges. They know a lot of where the pain is, they give you complete access.

Scott Tolinski

Correct. This does it all for you in terms of handling server side data, client side data, syncing,

Wes Bos

I I wanna use groceries.

Scott Tolinski

you could

Wes Bos

sick pick these

Scott Tolinski

you know, how you're writing data, how you're handling permissions.

Wes Bos

using Fusion three sixty when

Scott Tolinski

And you might think my app feels So, have been using Deno, and it's, you know, one of my favorite platforms on the web. And this JS takes a a different approach to solving a lot of the same,

Wes Bos

Let let's call this, like, a grocery app. Right? And my me and my wife can add stuff to it. It's a list, and you should be able to categorize it. There's AI in it, so it could it could be able to figure out, like, in which order should I pick these things given the layout of my store.

Scott Tolinski

describes itself if you wanna get a handle on

Wes Bos

Mhmm. Like, you have to say that ahead of time. But, like, he's he's been telling me, like, man,

Scott Tolinski

Convex

Wes Bos

any, like, state management you would do client side. Right? It does replace your your back end ORM, so you wouldn't use, like, Drizzle with this or whatever.

Wes Bos

apps that are that work like this, you have to have full buy in both on the client and on your server.

Scott Tolinski

records to a database via an API. It's all running locally on my computer, but it feels very fast.

Scott Tolinski

based you know what? I I really like Liveblocks when I used it even though it was a paid product and all that stuff.

Scott Tolinski

funny. So, put this video on. Honestly, you will love it. I loved it. I've watched it a couple times already, and, I think it's the best thing we've Deno. So check it out. Cool. Alright. Thanks, everybody, for tuning in. We will catch you later.

Wes Bos

data both on the client and the server. Because in order

Scott Tolinski

Yeah. So a lot of good options here and a lot of really interesting things to try. Is there a platform that you're using that we didn't talk about? There are plenty of them. Trust me. I've tried so many of these things from like, full stack. You know? It's all it it's all included for you. So I'm gonna be building an app with Convex today. I'm already deciding it, and I know what the app is going to be. And maybe we can we can check back on that and do a full episode on Convex once we've gotten into the nitty gritty there. But, I have a fun app idea that I've been kicking around for a little while, so I'm gonna be I'll be doing that.

Scott Tolinski

Yeah. I think that's what it's trying to do. And if you want to see all of the errors in your application, and not, like, looking for product market fit. PartyKit, you want real time sync? PartyKit also has pivoted pretty hard into saying the open source deployment platform for AI agents JS now the first thing on their list. Really? But multiplayer

Wes Bos

a local data first sync engine,

Scott Tolinski

with it not changing how that data is stored, If you're a child People talk all the time about how great Tolinski is, I think a lot of these things have great use cases for different, database is not necessarily it is When I when I've been talking about Instant DB or Firebase or Superbase or any of these, people often say, to hands the fastest it's the way you're gonna be using this is most likely not through self hosting it. It's gonna be signing up for a service.

Scott Tolinski

This stuff is changing all the darn time.

Scott Tolinski

As fast as possible How would you describe what Airtable was? This is like project management. Is that what it was? in that, that's pretty much it. Deno is really full featured, and the RepliCache folks have been doing this

Wes Bos

But this will instead of that, will store what you did very similar to, like, a Redux, we're seeing this quite a bit right now Wes companies who have spent so long working on the tech database.

Wes Bos

really wanna build something now, and I think I might take the rest of the day to to spin up a couple of these. I've been I've been hearing you talk about it, you know, and I I've used DeXI myself. You know? But I I kinda wanna try something that's a little bit more,

Scott Tolinski

I had to leave the set because, of Wes's. I had to run away, and I could not catch my cat. It was so who, you know, is behind Prisma.

Scott Tolinski

to use this. Now, unfortunately, cost of payment in your There is no documentation on that. I think you would have to dive into the code to figure that out.

Scott Tolinski

writing to the database, you aren't necessarily and the multiplayer stuff is all in there, but the local first side of things users.

Scott Tolinski

First with Johannes and they really smooth that out in a degree. But one thing I really appreciate about XeroSync

Wes Bos

The per developer per month always kills me. Like, the I was just the instant gives you 10 devs any any, like, server endpoints. You're not setting up, like, resolvers or anything like that. You're just plug and play. You're ready to go. You got the client,

Scott Tolinski

Replicache

Wes Bos

had me crying, the idea he had for it.

Scott Tolinski

microscopic right now. Yeah.

Wes Bos

I really like that approach, to these types of things. It's obviously They are fantastic. You can find them for your set of headphones. I highly recommend going and grabbing

Scott Tolinski

it says like, once you get it set up, it feels like you're working in something like Firestore or something like that with IndexedDB for sure. Convex, and with the client side experience, like I said, feeling like an ORM on the client side. It's it's great.

Scott Tolinski

I think it is client alright. SQLite a SQLite database in your browser via Wasm using the LiveStore.

Scott Tolinski

put it on, and she is not, like, even techie at all and was like, this thing is hilarious. Built a CAPTCHA. Yeah. I'm sure it's not because of me. I'm sure it's because of, you and, you and CJ. The the CAPTCHAs are hilarious. Like, I could say, I don't know if it's CAPTCHA was and SQLite

Wes Bos

which is is decent, but it I don't know. It looks a little bit weird, so please forgive the, video right now.

Wes Bos

I got a question for you before before we even get into this. I saw a tweet the other day that says the next React won't be

Scott Tolinski

also local data options. Because a lot of these things so far that we've mentioned are sync systems and data options. Electric SQL do everything for you while still letting you bring your Postgres database. This is a Postgres option. You you wanna add it to your current existing Postgres app. You don't care if your endpoints get, you know, axed, and you wanna, like, have that all managed. Or you're starting a new project, you just wanna bring a database, a sync engine, whatever, as well.

Wes Bos

but, like, why would someone reach for this over, like, a Supabase,

Scott Tolinski

and you can bring your own Postgres data.

Scott Tolinski

we are local data. Wes multiplayer. We're sync engines. And this thing just works really nice if you want, like, collaborative multiplayer that actually,

Wes Bos

Let's say you wanna build that app. It seems that's a relatively simple app, but it needs to have all of the

Scott Tolinski

functions is it's an event log

Wes Bos

Convex is actually sick. People are sleeping on it. I certainly should. I think people are sleeping on it. I am too. For Convex,

Scott Tolinski

Not a bad option for somebody who doesn't wanna leave their API endpoints and their their back end behind.

Scott Tolinski

game. And Yeah. And anytime you have data loading or mutations,

Wes Bos

Wow. So

Scott Tolinski

in your, solution to the local first platform that tries to do a lot for you. In fact, this is one of those ones that really takes over you you got your data, you should be good to go on that one. You're not having to write migrations for that even. So accepting those push and pull. I managed a Replicash site for a bit. It was great. I moved it to zero. It is better in zero.

Wes Bos

about

Scott Tolinski

But, like, the fact that you can host it all on CloudFlare infrastructure, I could see that being you start a starter kit up, you push it up to CloudFlare, I'm gonna do a rundown of some of these quick ones and talk about there's authentication baked in. Component, TypeScript building blocks for your back end. There's,

Wes Bos

Hit the subscribe button if you haven't already, and, take a look at some of our videos. We just released one on building a CAPTCHA Firestore is Firebase's

Scott Tolinski

yeah, man, over 80 OAuth integrations Resend integration, Evolue

Wes Bos

And every time that you had, like, raining at school, you'd stay inside, indoor recess, and this is what they would teachers would bring out, and you'd everybody would play this game.

Scott Tolinski

sync systems that are more of sync systems and not

Wes Bos

my phone right now, which is a iPhone 13,

Scott Tolinski

coined, you know, lo fi local first, but lo fi in terms of you're saving local data, you're handling updating yourself, you're, you know, you're sending that data along, whatever. You're managing it yourself.

Scott Tolinski

and you wanna do the rest. Right? PowerSync this is from Johannes,

Wes Bos

And what will actually

Scott Tolinski

Electric SQL, we're getting into the land of Their platform is incredibly confused.

Scott Tolinski

Yeah. Cool. So hey. It's a new week. New us. Ready to go. Wes is at the cabin. I'm, about to take a summer vacay here myself. So it kinda feels like the last day of school in a a couple a couple of ways. But, my kids are all all Node. So things are just kind of like you know, they're in summer mode over here. I I was doing some crazy yard work yesterday, so I I'm just like If you're talking about a more established platform, Convex.

Wes Bos

are now realizing,

Scott Tolinski

very similar to, like, you might think of, like, Git or something like that. Right? It's an event log. It's here's everything that happens. Last right wins.

Scott Tolinski

build my entire

Wes Bos

But

Scott Tolinski

They have documentation on how to do that. So that's better than ESLint DB on that. There is just a Docker file for that.

Scott Tolinski

or sync with the database that's remote, not offline, the remote database.

Scott Tolinski

you have to bring your entire back end still. You have to use your back end, and you keep your own API endpoints as you typically would.

Wes Bos

fairly disposable, meaning that you probably get a couple years out of them, and then they're gonna fall apart. And if you have a a pair of shredded headphones, that adds on. And they they said, like, when we move from jQuery to React,

Scott Tolinski

it's just a really nice family game. We played it a couple times now. We've got the feel for it. And, leads me to believe that they couldn't make any money off of the prior one and are doing a pivot with that same tech that's powering it.

Scott Tolinski

deeper skill involved. So if you're the type of person who wants to, like, geek out on getting some interesting we ordered, gave it a try, and, yeah, I would imagine it could

Wes Bos

that has happened maybe five steps back, and then it will just, like if it's if it's able to, it will replay it. It's very similar to,

Scott Tolinski

I still feel like the amount of people who, one, Yarn using it Yeah. Snowman dump truck for sure. And and I think, I personally is that they give you a ton of control, whether that is picking an ORM in many cases. Because, like, with to storing They let you step in there, and so it will block things on the server, So I mean, with Expo. That's one of the options. They have stuff that's a, Tori adapter, Electron adapter. So it does seem to be something that is going to be, Grab a set. That's what they always say. Cool. Alright.

Scott Tolinski

a nice

Wes Bos

those two things didn't

Scott Tolinski

simplicity at all well, I wouldn't say simplicity at all Scott with Convex. Convex is,

Wes Bos

That seems cool. Like, I'm curious, like, why would somebody reach for this? I understand why someone would reach for it over, like, a Firebase,

Scott Tolinski

is that You get that that API key. You download their library.

Scott Tolinski

I personally wouldn't do it. The reason why I'm not using this one is because because, specifically, I get that one in money monday.com

Wes Bos

be Dutch if if, if Yeah. Let's let's look it up.

Wes Bos

I wanna build that as fast as humanly possible. Which one of these are you reaching for? and beefy SLRs that we use, and I totally forgot it.

Scott Tolinski

the app to your hands in a real world use case is figuring out, like, hosting of the sync server, hosting of your database, here.

Scott Tolinski

I think LiveStore is gonna be very fast too. I I, you know, I haven't gotten a version of it up and working yet because of the Svelte integration.

Scott Tolinski

another one that is a sync Vercel, PartyKit, real time sync. You've used party kit before, Wes. It gives you multiplayer multiplayer And is that this all works in SQLite.

Scott Tolinski

Hey. Real quick, I wanna butt in here because we're about to talk about Convex as being an option here for local first, and I want to really quickly state that the local first parts of context are not available yet.

Scott Tolinski

it plays really nice with CloudFlare. You can run, managed and sync DB, simplicity at all costs, they're a new company. There's something about that to me that's like, I'm not gonna

Wes Bos

we when you're making something. Like, let's say you make a box that's 500 by 500 pixels, pixels, and then,

Scott Tolinski

That's so funny because So there's also even, like, dev tools for this though already. So I I do think it's an interesting project.

Scott Tolinski

It it handles the sync for you. It handles the back end.

Scott Tolinski

in all kinds of ways, data in a way. So data. Now local data can be done in a number of very low fi, and I mean low fi in terms of, and then you have just your entire back end running as a sync server and a d one database, and then you have your UI, which you can host on on CloudFlare as well. That is all just like just how transformative it is are saves offline to a database ESLint a hosted service. That's great. Now if you visit Liveblocks website, I'm gonna say, straight up, funniest video we've ever done. If you like to laugh, if you love laughs You would bring your own auth. You're just verifying your JWT, Next thing you know, you got a full auth system, though. You got, you know, like, rocky Bos around the way. Hosting the sync server, like, with SST can be a giant pain in the ass. You can always just host anywhere you host a Node app or if you're good with Docker, that's fine. But if you're talking zero to 100, I think a managed service Vercel Convex or Instant DB are going to be the fastest.

Scott Tolinski

I I think once more people get their hands on it and actually get a chance, they're gonna be blown away by it. So let's get into one of I'm gonna start this with an interesting note, an interesting new player to the game here,

Wes Bos

yeah. It feels instant when your server is literally running on the same machine as your browser. But when you're calling APIs back and forth, it probably doesn't feel that fast, especially, like, I'm up at the the cottage right Node, and we've got STARLINK, which is pretty fast, but you certainly notice it versus,

Scott Tolinski

And what doesn't feel like a lifetime is, like, ten milliseconds. It feels Yeah. Like the darn instantaneous stuff. And and many people often account how

Wes Bos

but gained its popularity in The Netherlands where it was initially marketed.

Scott Tolinski

used to patterns and stuff like that, my my daughter is a pattern wizard.

Scott Tolinski

rare gem or something, but it's a rummy cube.

Scott Tolinski

With Xero, again, it's an alpha. You're gonna hit which is cool. Right? Some of these don't have that kind of thing because it is. It's like Redux in that in that sort of way. So this is one that I'm taking a very close look at because They stay in sync, and Node times on this thing are phenomenal.

Scott Tolinski

conflict resolution an interesting one.

Scott Tolinski

Why? Sometimes it's just because of UI frameworks and things that feel more native to the the the phone itself. And Yeah. Other times it's frame rate, but many times it is So if you have a Postgres database I thought there were some really great things about LiveBlox. Like, it gave you presence, which is where you have, like, the multiple cursors, like, Figma type of thing. But the fact that their main product is now AI agents in your product how fast it is to get. I I built ESLint around, you don't care Liveblocks.

Scott Tolinski

And, they even have docs on hosting it with Fly, it is

Wes Bos

Beautiful. Cool. Well, thank you for that. I

Scott Tolinski

is they feel instantaneous.

Scott Tolinski

and your ORM.

Scott Tolinski

Sick.

Scott Tolinski

picks and shameless plugs, things that we are enjoying, things that we just like in general.

Wes Bos

app builder, which Airtable was like a

Scott Tolinski

exciting.

Scott Tolinski

inside of managing versions of, data. I'm not having to think about Nintendo or something like that. So we've been always just on the lookout for fun little family games, and we got this one, which is by no means like a

Wes Bos

to have local first, but you're not about to start you make something else that's 200 pixels inset from that 500 pixel Bos, and then you extrude that 500 pixels forward. And you go, oh, shoot. It wasn't 500. It was four fifty. So you go back three steps, and you simply just change that one step, and then the rest will sort of replay forward.

Scott Tolinski

the one that does the most for you. It does everything for you.

Scott Tolinski

database.

Scott Tolinski

Man, so that you can get, like, real time sync presence detected.

Scott Tolinski

is an interesting and how they might fit into what you Node. Because Is it Firestore or Firebase? Which one is it? Is it both? skill based play, there is that available.

Scott Tolinski

not the Some people use something like Dexi for that. You could throw it, saving and storing data, things like that. A lot of iPhone apps, yeah, they're storing things to what? A SQLite database on the phone, and then they're handling a sync process in many different ways. So if your mental model JS, I don't understand Dexi, Dexi Sync, and and there's there's so many of these options out here. So if there's something that you're using that you're liking, let me know that if we should be spending some time on it and comparing it to these others. If you're doing any work with local data or local sync, let me know. Many people are wondering why the Replicash part two video never came out. It's because Xero, writing patch messages. You don't mind actually manually adapters for you'll want to check out Sanity at century.i0/syntax.

Scott Tolinski

just sit in front of there. And so Brand new player to the game, and, you know, Johannes my manual You have to do the least amount of work

Wes Bos

It's not a Netflix approved camera. No. But it is it does look lovely.

Scott Tolinski

but you don't wanna lose your endpoints. You wanna keep your endpoints.

Wes Bos

you added an item warp you deleted an item or you change one of them, nothing better than getting a new pair of earcups. It makes it feel like a brand new pair of headphones. I've had these Bose QC 30 fives for, pivoted to an AI you're just writing, like, resolvers or, like, what what is that called? Like, the code that you write to actually it gives you Yeah. Just an endpoint Everybody's pivoting to that. So here's a question I have for you. I wanna build let's say I wanna build an app where

Scott Tolinski

So as much as myself and some others have been talking about local data, I mean, you can check the receipts. I've been talking about this stuff for a long time.

Wes Bos

Beauty.

Scott Tolinski

and it does a lot for you, but you can bring your own Postgres database, if you want to use their self or if you wanna use their hosted version. Again, I gotta spend way more time with Convex, and that that's kind of what I've gotten out of this episode.

Scott Tolinski

is that native apps feel so much better than web apps.

Wes Bos

for Kit Boga and his scammers, and, man, that one was a hoot. You're gonna certainly gonna wanna check that one out.

Scott Tolinski

data caching, yep. Yep.

Scott Tolinski

You have your database, which exists as a Postgres database, and then you have your application,

Wes Bos

ESLint turns out you can build sick stuff on top of it. Let's pivot our entire business, which that one was very surprising to me because that's seems like they were pretty well established

Scott Tolinski

API.

Scott Tolinski

It can be handled in very much those sort of ways with IndexedDB.

Scott Tolinski

what Instant DB is like. Instant DB describes itself as a Firebase.

Scott Tolinski

simplicity you're having your sync server, which exists as a server.

Wes Bos

But if you have a pair of headphones

Scott Tolinski

I don't know if we've talked about this on the show just yet. And, this is called LiveStore. It's at livestore.dev.

Scott Tolinski

But I maybe I should give this a rip too for I'll I'll just do, like, the paid or the free hobby one first. And then if I like it, then I'll I'll figure out the Give it a Scott.

Scott Tolinski

the way that LiveStore that is

Wes Bos

like, let let's take a look at, like, what this replaces. This does not replace React. Right? Because you would use it with your framework of choice. Create React or Svelte or whatever. But it does replace

Scott Tolinski

which exists as, an application. Could just be client side even. And My name is Scott.

Scott Tolinski

Yeah. There's so many interesting things going on in Convex. And every time I look at this website, I say, oh, that's the one I'm gonna try next. And and then I reach for the more of, like, the, more techie ones for some reason. But context is beautiful, and, I think this seems like a great great option.

Scott Tolinski

It looks great.

Scott Tolinski

You're you're clicking a couple buttons. You're having the sync. The one of the biggest barriers to entry to getting, like, Xero, because of that also works anywhere. Like, you have Postgres databases. Like, you can connect Xero to, like, Supabase or something like that. It works really well in those ways. And the way Xero handles it is it sends patch messages of the data back and forth when things change, Replicache is more similar to Electric SQL Wes it handles the client side block things on the client if permissions aren't aren't there. And for the most part, is local first or local data specifically, I've built a ton of projects now in Xero even though it's still in alpha.

Scott Tolinski

it we're at the Snowman's head. But I think we're gonna get to that body soon enough. And when we do You don't start the head first.

Scott Tolinski

from browsing

Scott Tolinski

yeah. It it's it's full swing. Right? Well, let's, Full summer.

Scott Tolinski

kind of. Yeah. There's math involved, kind of. There's patterns.

Wes Bos

And Yep. Let's not let somebody build the product on top of us. Let's build the products ourselves.

Scott Tolinski

log, a materialized into a local reactive Man, maybe I am just really highly sleeping on Convex, and maybe Convex is that thing.

Wes Bos

thing as well as the server setup.

Scott Tolinski

Next up here is XeroSync. Now I've talked about XeroSync a whole lot. Xero is kind of the the second who are the players The local first website has gone from just, like, a a handful of collective what's best for who really quick, and then we can get out of here. How does that sound to you? Sounds great.

Scott Tolinski

local data, as we've talked about many times on this show, is a really, really, really exciting, back end, however, that may be, whether that is a database, Instant Again, we've been using this tool for a long time, and it totally rules. Alright.

Scott Tolinski

about this.

Scott Tolinski

your entire Now the way that this is interesting Let me tell you about Convex self hosted. Convex, you can run self hosted on your own infrastructure if you're talking fast as possible, I think you will get Yeah. Full summer for sure. Let's get into the topic at hand, though, which is local through,

Wes Bos

really, really great. Yeah. Because then you're not setting up

Scott Tolinski

in your app,

Wes Bos

it will just log out what you have Deno. And then I I guess that sends that to the back end and it replays it in order to modify your data.

Scott Tolinski

it's one of those ones I think that as you get better and better, as the kids get older, it's just gonna become more and more fun for everybody. So Remedy Cube is really great.

Wes Bos

to build

Scott Tolinski

why local data makes sense, just think about the best apps that you use. And chances Yarn, Rummy cube is like a tile Bos. They're kind of like little dominoes we had we just heard about it. We are, like, the longest in the world to hear about our Me Q.

Scott Tolinski

If you like your back end, you you can keep it. PGLite, unlike some of these other ones, with ESLint DB.

Scott Tolinski

your actual database. Like, I when I'm working in Xero, I have to

Wes Bos

Firebase alternative? Is it is it because of the local first stuff? I'm not quite sure.

Scott Tolinski

Their demos are very

Wes Bos

No. Airtable was like a like an Excel real time Vercel. Yes. Yes. Yes. Yes. It was like a developer platform for, like, powering things, and now there's like,

Scott Tolinski

if you want.

Scott Tolinski

You have things that are, like, kind of like a normal setup, and you can kinda plug a sync engine in or or your own process or your conflict resolution stuff in there. This is not that. This is really something that takes over, and it's an entirely different approach you Node, he loves this kind of stuff. Events are the most accurate representation of state. LiveStore gets it right. I, There's currently having someone who's worked on this stuff, who's given several conference talks and who's, like, really used it, XeroSync and some of these, you still need to handle migrations.

Scott Tolinski

was released soon after, and I was waiting until Xero was at least in beta to do a Xero series. It's like, you know, might as well just wait on that one. So, that will be coming. We'll be doing a lot more educational content. If you wanna see something with live view, you wanna see something with Convex, let me know. I would love to put some of that stuff together.

Wes Bos

React similar to how nothing dethroned jQuery.

Scott Tolinski

a conference and a plat like, you are seeing the snowball roll down the hill right now, it is an open well, it's an open source, and, it's a a Firebase alternative is really what it is. But it's it is local data based. And this one is fantastic I got a sick pick for y'all.

Scott Tolinski

of, you know, having an API endpoint and things like that, plug this into your Yeah. Yeah. Right.

Scott Tolinski

Next one here is Instant DB. Now Instant DB is specifically because there's math involved, presence.

Scott Tolinski

three hundred, five hundred, six hundred milliseconds feels like a lifetime.

Scott Tolinski

Yes. It's interesting. And, a quote from David Kirishan, does great work. So not surprised, the database as well, and sometimes they,

Wes Bos

Maybe there's offline because I'm in a grocery store. Like, sometimes our Costco, I can't get, and every other post is like, my headphones are shredded. Like, what the hell? And, like, these headphone pads are

Scott Tolinski

That not that that's what I would pick long term or something, but just So enough of the rough edges around some of these things that, You still need to handle, like, Xero is great. It's very fast. It works awesome. There's a big community for it, and it does a really super good job. So if if that's where you're at, Xero's a great option.

Wes Bos

grabbing a set.

Wes Bos

probably for existing applications, this is probably what people will will reach for because there's a lot of people that have

Scott Tolinski

that database side of things for you? And with Xero, So she wanted something that the kids could play. She didn't know if that was, like, a good a good game for, like, the whole family to play, and it seemed like a bit intense for everyone to learn. So we were like, oh, let's find something like that in a way. And we just found somebody saying Rummy cube is similar in in some sort of way. And that Liveblocks company or anything on some sort of new service that is, you know, brand new or whatever. But it is a really great platform. And when I built a demo in this thing, I I walked away being like, this was the easiest one, So it's an embedded SQLite And, you know, she's six, and she's able to identify these sequences and patterns. And once she landed on the rules, is really able to do it herself and and, like, look at the board in a way. And, you don't have to worry about where you're hosting that sync server.

Scott Tolinski

use data locally. So, we just interviewed the folks from Superhuman.

Scott Tolinski

and is also very plug and play, easy to host on CloudFlare and stuff.

Wes Bos

approach to this type of thing is that you're often able to go back in time

Scott Tolinski

pre And we'll talk about some of the platforms here. Whether or not any of these will become that is yet to be seen. I do think there's and we handle that back end, that versioning, $25 per developer per month.

Wes Bos

which is already the, like,

Scott Tolinski

It's events.

Scott Tolinski

it is a client side and server side library. It's a sync engine, The sync engine

Wes Bos

like, a hard piped fiber connection.

Wes Bos

it needs real time, but also needs local data. It needs sync, and it needs a database.

Scott Tolinski

She got my my, visual spatial brain.

Scott Tolinski

Sanity a bit of a pain sometimes, so I do like that.

Scott Tolinski

on your local database lot of the same issues. So Yeah.

Wes Bos

products.

Wes Bos

AI is telling me it was made by a Romanian,

Scott Tolinski

it feels like it replaces your back end offline Okay. That kind of stuff. And because of that, there's, like, undo, redo support, and, two, like, truly understand Yeah. Let's get into the part of the show where we talk about storing that data and and managing yourself locally. But what we're gonna be talking about in this episode is going to be more of the local data to work really nicely, you want that sync to work really nicely, but you don't mind handling versioning your data. You don't mind, And for the most part, it handles off in a way like, JWT based off, very similar to how Xero does it. You you know, you're able to kind of step in there and, get access to the current user and do your your auth checks that way. There there's a lot here. There is offline support.

Scott Tolinski

Yeah. And so with Xero, you typically on your server side, and LiveStore bringing this to your current project. Some of these other ones, you got your own back end. You have your own database.

Scott Tolinski

in case you wanna, you know, actually Give LiveU a try.

Wes Bos

large existing applications, and their entire app doesn't need need to be done in this. But maybe there's one part of the app that that would be nice

Scott Tolinski

I built stuff with Liveblocks, like, this JS a CloudFlare worker, the sync ESLint. So you have LiveStore as the sync engine. You can run it as a CloudFlare worker and then save your event log in a d one SQLite DB,

Wes Bos

put that in something totally different because change or delete an event

Scott Tolinski

still owning your do database, typical data.

Scott Tolinski

You don't want a production application out there that, well, you have no visibility into in case something is blowing up, and you might not even know it. So head on to reduce entry .i0/syntax.

Wes Bos

you can get into trouble with, like, oh, you edited something that doesn't exist in the future. But It's included with all of that. And it does replace, like, you're saying JWT

Scott Tolinski

They're saved as events and, like, what the information is with those events. These events are the source of truth, and the current state of the app is a projection of the event MagicLink login. You got normal login because this comes with authentication baked in. Like, some of these others, like Wes mentioned, you gotta roll your own auth or bring it from better auth or any of these things. Yeah. This comes with auth bay baked in.

Wes Bos

instead of saving the data locally, like like, let's say, if you had, like, a to do list and you changed, dethrone that will be sort of like a new generation. Do you agree with that Wes it's gonna be something that is this stuff is baked right in?

Scott Tolinski

I'm not having to think about And the way these apps feel So

Wes Bos

Bolt dot new Wes working on Stackblitz for years and their whole web containers being able to run it, and then they realized, oh, holy smokes. We got the tech. We can run it, and we can do this ourselves. And did you see Airtable

Scott Tolinski

sits in there, and you say, I wanna have full control over this thing. Give me just the sync. Electric SQL.

Scott Tolinski

stack, essentially, except for your your view layer, which is whatever you may be.

Scott Tolinski

to And I will say the client side library for this one is probably the nicest in terms of, like, it feels like Firebase. Right? It it feels nice and easy. You can theoretically self host this.

Scott Tolinski

Electric SQL is really great if you're deep into Postgres.

Wes Bos

when I was a kid. So I'm pretty sure this is a Dutch game. I don't know. It must be because, like, when I grew up, everybody played rummy cube. Really?

Scott Tolinski

have been goofing around with this a little bit, specifically trying to just get, like, this felt version of it working, which I haven't been because it's, you know, still a a draft PR. But so far.

Wes Bos

Shameless plug. Check us out on youtube.com/syntaxfm.

Scott Tolinski

You have to manage the sending of the patch messages, what's being saved in your And it it follows along kind of the same things I appreciate about Deno sync, which we'll talk about next, fast because of local data.

Scott Tolinski

to Supabase in its current iteration than it is something like Deno sync or ESLint DB. So just a quick note there. There's also Convex, which you know what? A lot of people love Convex, and I haven't used Convex, which makes me think that I I I need to really give this a fair shake because, this project. So LiveU, you're living on the edge. You're trying something new. It's event data it's event based data that sounds interesting to you. You wanna give something a try that is, like, truly different happens to do a lot of these things. Convex is just a really interesting platform.

Scott Tolinski

yeah, it it takes a lot to get going with them, but it's kind of by the nature of them. And and some of them are are really super easy to get up and running, but take over your full stack. So as you'll hear in just a little bit about, like, what the options are, are still in flux and still being worked. So if you are looking for something that JS batteries included, sick different, you know, experiments and tools and and sync engines and things like that to, like, And the thing I like the most about working in Xero, is the sync in cache on the front end, but you have your back end. So this does handle local data. It does handle the sync. But just like what we talked about with Replicash, Okay. It is a a year and a half ago. And Liveblocks was like, side of things, version of Replicash in a way Wes Replicash was a product that came out and handled that sync layer and that local data local cache really Wes, but you still had to do a lot of work on the back end. So when Xero came out, it was like, what if we take ESLint cache That's about well, I'm it's a it's I'm saying size wise. Okay. We're not the the ball the snowball that's rolling down the hill is about the size of a snowman's head, a child's snowman's head, but we want we want that big old body. That's what we want. So big snowman booty worth of local first.

Scott Tolinski

There's sequences,

Wes Bos

Interesting. Interesting. Yeah. Cool. I'm gonna,

Scott Tolinski

from really getting into it and actually writing code, there's a lot of things I really generally appreciate Instant DB is going to be more of that option rather than Convex at this time. But Convex is still a great option if you're looking for a sync platform data storing. It's way more similar Yeah. Lots of laughs, put this video on. My wife,

Share

Empowering developers for over 286192620575 milliseconds!