localfirst.fm

A podcast about local-first software development

Listen

Conference

#26 – Adam Fish: Ditto, Realm


The guest of this episode is Adam Fish, co-founder and CEO of Ditto, a end-to-end syncing platform with a focus on resilient connectivity. In this conversation Adam shares the origin story of Ditto, his prior related work on Realm and the hard networking problems that Ditto is solving.

Mentioned in podcast:

Links:

Thank you to Jazz for supporting the podcast.

Transcript

Intro
00:00The customers of Ditto are businesses that have workers predominantly
00:04that are not at desks like us.
00:06They're out doing jobs in the real world.
00:09the internet is by no means guaranteed.
00:11And so being able to use smart software that leverages the network
00:18capabilities of the devices that workers are already holding is compelling.
00:22cause it kind of adds like another layer of, durability, to ensure their,
00:27application, their data, keeps working.
00:29Welcome to the Localfirst.fm Podcast.
00:31I'm your host, Johannes Schickling, and I'm a web developer, a
00:34startup founder, and love the craft of software engineering.
00:38For the past few years, I've been on a journey to build a modern high quality
00:42music app using web technologies, and in doing so, I've been falling down the
00:46rabbit hole of local-first software.
00:48This podcast is your invitation to join me on that journey.
00:52In this episode, I'm speaking to Adam Fish, co-founder, and CEO of Ditto.
00:57An end-to-end syncing platform with a focus on resilient connectivity.
01:01In this conversation, Adam shares the origin story of Ditto, his prior
01:05related work on Realm and the hard networking problems Ditto is solving.
01:11Before getting started also a big thank you to Jazz for sponsoring this podcast.
01:16And now my interview with Adam.
01:18Hey, welcome Adam.
01:19How are you doing?
01:21Very good.
01:21Excited to be here.
01:22Thank you.
01:23I'm very excited to have you on the show.
01:25you and I have had a little chat before the show and just recollecting
01:29our members since the two of us had the pleasure to meet way back.
01:33I think this was at this point, like probably more than 10 years
01:36ago when you've been still at Realm.
01:39And we're gonna hear more about that, but it's so cool, like how,
01:42like in life our paths like overlap when we're in the same space.
01:46So would you mind introducing yourself?
01:49Yeah.
01:50Well, I'm excited to be here.
01:51Thank you for having me.
01:52my name's Adam Fish.
01:53I'm the CEO co-founder of Ditto.
01:56And as you've mentioned, our paths crossed, I, it had to have been about a
02:00decade ago in San Francisco, where I was at Realm, previous to starting Ditto.
02:05And, at the time, were you possibly starting Prisma or it
02:09was like, yeah, it was around,
02:10that was the predecessor to Prisma at that point.
02:12Yeah.
02:14Yeah, so, Ditto itself is, you know, a member in sort of the local-first
02:18effort, but maybe not as as well known.
02:21and so excited to share more about my story and, about Ditto itself.
02:26In short, it's an edge sync platform, and so we connect devices peer-to-peer
02:32and synchronize data, through a database, in addition up to the cloud.
02:36And so this is, something that, I think is very applicable to everyone
02:41who's really interested in local-first.
02:43And, you know, I have a long history in this, like you'd mentioned at Realm
02:47before it, and so excited to kind of share the story of how I got here.
02:51Yeah, let's actually start with that.
02:53And I think there was already a stage before you joined Realm where
02:57you started poking at the space.
Adam's path to Realm
03:05Yeah, so it's, I at this point, about a 15 year journey where I got my start as a
03:10developer coming out to San Francisco and actually working on a different startup.
03:15kind of went through a couple iterations of ideas.
03:17we were part of AngelPad, which was sort of like a Y Combinator, initiative Back
03:22in the day, it's not around, anymore.
03:24And, through that iteration, we ended up exiting the accelerator program focused on
03:28trying to build a mobile CRM application.
03:31And so this was 2010, 2011, 12 timeframe where mobile was still very
03:36nascent, even with consumer use cases.
03:40But on the enterprise side, it was still, you know, no one had figured it out.
03:44And so we thought that was a big opportunity with that.
03:47and looking at the CRM markets, we thought, hey, that's a big market.
03:51We could go disrupt it.
03:52And so, we started building this application and the first thing
03:57we really wanted to do was build an incredible mobile experience.
04:01And so that naturally.
04:03forced us into thinking how can we have local-first data?
04:06and so at first this was really about like user experience,
04:09just like instantaneous clicks.
04:11But then we were like, okay, working offline would make sense as well.
04:15and so we ended up building a very naive sync engine.
04:19and this was fairly abstracted because we were trying to plug
04:22into existing CRM systems.
04:25And so we would pull in your data from Salesforce and then in a sort of like a
04:30server driven UI pattern, sync that down to the device, and then it would render
04:36the UI based off of the specific data, fields that you had in your CRM account.
04:43And so it was at the time, I would say fairly innovative for what was a, you
04:48know, relatively narrow application.
04:51And so, that was sort of the innovative technology behind the app.
04:55And when we launched it, it was started getting meager success
04:59from a business standpoint.
05:00And, myself and my co-founder at the time looked at each other and
05:04we were like, you know, how did we end up building CRM software?
05:08Like, this is not something that I'm like particularly passionate about.
05:12and yeah, it was just like we had sort of like a, a moment, where we wanted to
05:17just like, take a look at ourselves in our lives and say, is this really what we
05:21wanna spend our professional careers on?
05:23And so, for me in that moment of reflection, I was like, I'm really not
05:28interested in CRM, but this infrastructure that we built, that to me seems really
05:34interesting 'cause it solved the problem I was experiencing as a mobile developer
05:39wanting data locally and being able to create like great user experiences.
05:44And so ultimately I have like actually a pitch deck that's like hilariously
05:49similar to stuff with Ditto from, 2013 timeframe where I was like,
05:54okay, I wanna pivot the company and basically, at the time sort of build
05:58something similar to Pars, and Firebase.
06:01and, you know, let's just become an infrastructure company,
06:04for good about the app itself.
06:06And so this basically was the start of the journey I've been on ever since.
06:11and so I actually shared that pitch with the team at Realm because
06:17they had, you know, right around recently had launched the mobile.
06:20database and we were wanting to sort of rebuild a new version of the sync engine.
06:26And so they looked at that and said, Hey, that's very much what we wanna do,
06:31with our database, so why don't you come and, you know, help us, build it out.
06:35And so that at the time made a lot of sense.
06:37'cause I was still not an expert in databases and sync systems.
06:42This was all just, you know, we were learning on the job.
06:45And so it felt like being part of a bigger team that had an incredible
06:48set of experts was a better path to success than trying to do it on our own.
06:53so I ended up joining Realm and, was there through, through
06:56the acquisition with MongoDB.
06:58And ultimately this led to Ditto.
07:00So it, truly has been just a, line all the way back from, you know, 2012
07:05timeframe where I had that moment of, reflection of not wanting to spend
07:09my career, selling CRM software.
07:11That is awesome.
07:12And I see so many parallels for so many people in the local-first
07:16space, like whoever you're looking at who's building innovative things.
07:20For example, like Aaron who is working on Xero, like, what they all have in
07:25common is that they wanted to build a me included, like, wanting to build
07:29a great app and then realizing, okay, what is holding us back to build this
07:34great app as we have it in our mind is having great, fast local data.
07:40And, and then you take like in your mind maybe short detour of like, okay,
07:45we're gonna build this data thing first and then we can build the great app.
07:49I'm still currently in a similar path.
07:51This is also, like in a similar, like back and forth.
07:54This is what led me to build Prisma back then.
07:57Not yet with the intention of like having everything local, but to at least have
08:02a better experience working with data.
08:04But this is very much the path that I'm currently on where
08:08I'm trying to build Overtone.
08:10But for that, I also had to build, roll my own data layer.
08:13And a similar path is what, like Aaron has been on, and this has led to Zero.
08:19And the insight is always the same.
08:20Like to build great app experiences, we need to have.
08:23great data experience, a great developer experience around data.
08:27And yeah, it's funny how like you're tackling the same
08:30problem over and over again.
08:32And every time you just like level up significantly and you're still
08:36saying true towards like the same insights and the same mission.
08:41So you've had now, basically three attempts and every time you're just
08:45like reaching higher and higher.
08:47So maybe before we go into Ditto, maybe you can share a little bit
08:52more about when you joined Realm.
08:54Like what were your responsibilities and how did the technology that you've built
09:00in the first CRM app, how did that kind of translate or differ to what became Realm?
09:06And yeah.
09:07Maybe we can focus a bit more on the chapter on Realm.
Realm
09:11Yeah.
09:11So, I was joking that I'm either crazy, you know, it's like that saying, if
09:16like you, if, you know, if you just keep doing something over and over, you
09:19know, either, either maybe you're gonna hit it right, or, or you're just crazy.
09:22And so I think the jury's still out on that.
09:25and I do find, like everyone in sort of the local-first, community, all the
09:30different approaches with it, we sort of share that same sort of obsession of like,
09:34how could we just build this incredible infrastructure so that the ultimate
09:38apps that come out of it, are great.
09:40and so the, the transition from, the naive approach I would say that we
09:45had implemented, with the, that early startup, which was called Rubik.
09:49it didn't really have anything innovative in terms of managing versions, is
09:54kind of the simple way to put it.
09:55Like we didn't really understand kind of anything about, like more novel
10:00approaches to managing consistency.
10:03And so, in addition to that, like.
10:05We were not database experts either.
10:07And so, coming to Realm was incredible because I was immediately
10:11surrounded by this fantastic technical team, including the founders
10:16that, had a deep understanding of how to build a great database.
10:20And that's what drew me to it.
10:21Like Realm to me is a developer was incredible.
10:24I love like the object interface.
10:26It was highly performant.
10:28It was easier to use, you know, in terms of query, engine, compared to SQLite.
10:33And, I wanted to be part of the team that was building that.
10:38And so, the approach that they ultimately settled on, which I kind
10:41of joined, right when they were in the early, early moments of designing the
10:46architecture around the sync engine was to adopt operational transformation,
10:51as like the algorithm, to sync.
10:53And so that was, at the time, you know, not something at all.
10:56I would.
10:57Feel comfortable trying to implement, on my own.
11:00And so, the Realm team had the smarts, across the board to implement it.
11:05And so, we ultimately, that was kind of 2015 through 2018,
11:10you know, built that out.
11:11And the tough part about that, kind of in hindsight though, was that.
11:16I don't think, everyone understood the harsh edges around OT.
11:21And so it was very hard to implement in test and to really, you know, prove that
11:27it would be consistent in all manners.
11:30And so that just took several years and ultimately that had a
11:34big effect on the overall business.
11:37and, you know, there were like a lot of lessons learned around that.
11:40And so, happy to kind of like dive in, on the technical side of what I may
11:45mean by that, but also, you know, the implications on the business, which
11:48ultimately meant like the company was sold, and MongoDB acquired it.
11:52And so those lessons both on tech and business is really what stuck
11:57in my mind, when starting Ditto.
11:59Yeah, I'd be curious to hear on either both the technical as well
12:03as on the business side since Realm really, I remember it just
12:06being way ahead of its time.
12:08Really like And I think it's all started with this inside of like, hey, the mobile
12:13was just like, was fairly new back then and everything was about mobile, like
12:17the entire pars back in the service.
12:20That became a thing driven through the momentum of mobile and then like
12:25to go to such a great extent to have like a local database that it syncs,
12:30et cetera, and then also going beyond mobile to go to multiple platforms
12:34that was really ahead of its time.
12:36but as the saying goes, like it takes 10 years to build a database, not
12:40just to build a database here from scratch, but also to make it sync.
12:45I'd be curious to, to hear some of those anecdotes.
12:48Yeah.
12:49Well, there's a couple things.
12:50I mean, the part that Realm was incredible about was its interface as a database.
12:55And that was no small feat really benefited personally as a developer
13:00with the software being open source, like really being able to
13:02understand kind of how that was built.
13:04But they ultimately built their own storage engine and then
13:08had this really incredible API.
13:11But the, result of that from a, like a resourcing perspective
13:15meant it took a lot of effort, to maintain all of the different SDKs.
13:20And so the Swift or objective CSDK had an API that, you know, wanted
13:27to look really good to those, you know, Apple Platform developers.
13:30And then likewise, there was a concerted effort to do the same .net
13:35or Java, you know, on, on Android.
13:37And so it meant that the outer layer of the database to create
13:41this sort of magical API, just took a significant investment.
13:45And so that was, to your point, like a hard problem in and of itself and being
13:50super popular, as an open source database.
13:54It did, kind of command a lot of the team's attention and so to then
13:59add on and say, Hey, let's take OT, try to implement it in a generalized
14:03fashion to add this sync engine and produce a cloud service with it.
14:09That was a lot for a startup to pull off.
14:12And so ultimately that, meant really sort of never having
14:16the right amount of resources.
14:18and so to me that was one of the concerns is that you have to figure
14:22out the right balance of trade-offs.
14:24because if you end up trying to perfect everything at once, and you know, and
14:29you're doing this as a business, like you might sort of just run out of time,
14:34in terms of building the business.
14:36And that was definitely part of Realms journey, which was difficult,
14:39you know, it's a venture-backed business, they've investors and so
14:42there's a clock, and managing how to use the engineering resources to
14:48solve the right problems that matter.
14:50Both for the product and customers, but for the business.
14:53you know, there were kind of allocations, in hindsight that I
14:56think could have been done better.
14:58and a contributor to that is that just OT was so hard, to reason with, you
15:04know, I'm forgetting the, individual who, who wrote the implementation at Google,
15:08but I, you know, was sort of famous in saying, if I had to write it a second
15:11time, it wasn't gonna be any easier.
15:13And so it was just a highly complex thing to reason about and, needed
15:18like property based randomized testing to get any confidence around.
15:22And so that just took a while and that was doubly complex because Realm had
15:28this complex data model, especially being an object database that had
15:32direct relationships as a first class citizen you had to deal with, how
15:37do deletes work in that scenario?
15:39and that no one had really done that before.
15:42Like the implementation with, with Google Docs isn't needed for that.
15:46And that really speaks to the magnitude of the challenge here.
15:49Like I remember like experiencing Google Docs the first time and like
15:54how magical it felt, but like you say, that took like an absolutely
15:59brilliant team to, pull this off.
16:02And this was like for a very specific dedicated use case where you can
16:07make very specific trade-offs.
16:09And now with Realm, you wanna build like a general purpose abstraction that allows
16:14for all kinds of different data models.
16:16So yeah, that, that's basically taking the same challenge and making it
16:20orders of magnitudes harder because you need to make sure it works
16:24for all those different scenarios.
16:26Yeah, absolutely.
16:27And that, was harder than anyone realized in hindsight, in my opinion.
16:32and the other side of it too was it just had technical challenges.
16:36the actual algorithm itself, given that if you have a long history with
16:41devices that have been offline for a while, you're gonna have quadratic
16:45complexity to being able to transform the operations for the other devices.
16:50And so that would manifest itself and it's always the worst times where
16:55you've got heavy load on the server or you've got this, this one errant
16:59device that shows back up with a long history and then suddenly, the server
17:04would itself run outta memory or, you know, um, basically, die in the process.
17:09And so, that was something that at the time we hadn't really fully solved.
17:14'cause you have to then figure out how to prune histories to kind of
17:17prevent that scenario from happening.
17:20But that's like a balance of, what does the application expect.
17:24and so I ultimately think those technical problems could have been solved, like
17:29there were solutions to it, but it was hard to do that under all the other
17:35constraints from managing the open source, success of the mobile database itself,
17:41plus just the general business concerns.
17:44And so that's ultimately, you know, what led to having to sell the company,
17:49and, you know, MongoDB acquiring it.
17:51And so, but all of those lessons were sort of in the back of my mind,
17:56in terms of starting Ditto, because I felt really unfulfilled is the,
18:00you know, honest way to describe it.
18:02Loved Realm.
18:03The product felt like it really had the potential, but it got
18:08sort of cut short, in its life.
18:10And so the choice of joining Mongo and trying to, you know, fix and in, you know,
18:16continue to improve those things in a larger company seems somewhat difficult.
18:19and that was part of the reason to just go start, Ditto was like, okay, like I've,
18:23done this once in a naive way, then start to really figure out how to do it in an
18:27advanced way, but didn't really get to pull it off, so could I go do that now?
18:32and so that was sort of the personal motivator, in starting Ditto was it felt
18:36like I had to just go do it on my own.
18:38Is the only way to really have the unconstrained ability to
18:42explore like new approaches.
18:44That is awesome.
18:45And now you have like two rounds of practice rounds already under your
18:48belt, two notes just on the Realm side.
18:52it was sort of unfortunate news fairly recently that Mongo decided to sunset
18:57Realm, which I think led to another interesting business opportunity for
19:01Ditto, which we, maybe touched on later.
19:03but another shout out is that we, at last year's Local-First Conf, we had
19:07actually one of the founders of, Realm give a talk Alexander, about like
19:12what made Realm so special, which what you've already, mentioned, which is
19:17like the surface area, that it feels native to whatever platform you're
19:21building for, whether you're building an iOS app, whether you're building
19:24a Mac app, an Android app, et cetera.
19:26This is where Realm really had such a big edge and an advantage that felt native
19:32to whatever platform you're targeting.
19:35And I think that remains true to this day very much.
19:38And I think there's a lot to learn from there.
19:41Absolutely.
19:41I mean, I'm sort of like coming from Realm, like Ditto did
19:45to that trade off question.
19:46Like our interface mirrors much more of a traditional database, interface.
19:51it's a document model and we have our own query engine called DQL, but it's,
19:56you know, more like a SQL interface and a sort of cringe a little bit because
20:02like it really isn't as elegant, as Realm, like Realms API was incredible.
20:07I mean that's, as a developer why I wanted to join the company is it's just
20:11like, wow, this is the product I want to use when building a mobile application.
20:16But the, but to that is, it was not without significant resources and
20:21effort, to make that, interface.
20:24And in hindsight, that's where I sort of wonder from a business perspective,
20:29did that interface really give it, you know, drive the success of the business?
20:34at the time, it wasn't, it was very popular from an open source, but it
20:38wasn't really helping the business.
20:39And so that was, The part that, I'm hoping eventually, you know, as Ditto
20:43continues to grow, we'd sort of be able to improve their API and stuff pull
20:48that, but we've had to sort of make the trade off that maybe that's not a day
20:52one problem, given the Realm experience.
20:54And I think this is really like what led to all of the success.
20:58you're having so far already with Ditto where you're thinking correct about the
21:02trade-offs and like when you do things on day one and how you sequence those
21:07and you still have those ambitions to, do things eventually that you want to do.
21:12But I think, when looking at Realm, there's so many hard things like
21:16building the technology by itself.
21:18Like, let's even imagine we have more time, we have more resources.
21:23Still super hard, but then to do it in this constrained environment where you
21:27need to build a business in the meanwhile, while you're, just like losing sleep over
21:32super hard, unsolved technical problems, that's just like really, really hard.
21:37And I think having had the experience of seeing this journey once or twice,
21:42now really gave you a super unfair and to your credit, like a positive,
21:46unfair advantage to start Ditto as a business and to like solve as many
21:52technical problems as is currently, applicable and healthy to your business.
21:56So with that, I wanna learn more about Ditto, like, so you
22:00mentioned you started it in 2018.
22:03What was it?
22:04Product wise, at that point, what was sort of like the first major milestones
22:09that, that you've reached and now since 2018, many years have passed and I think
22:14it's fair to say that you're probably one of the most advanced, biggest players
22:19in the local-first in the sync space.
22:21So there's plenty to learn.
Ditto
22:23Yeah, well, it's been a very interesting journey in the sense that a lot of early
22:27assumptions, actually were proven wrong.
22:30And so, excited to kinda share, those insights.
22:33And the first thing that sort of started the company was after that
22:38experience working with OT and just seeing all the challenges with it, I
22:42was immediately drawn to sort of the flexibility you could say with CRDTs,
22:47and kind of couple axes I guess for that.
22:50one was it felt like just much simpler to build the actual merge semantics,
22:57like, you know, reading papers and stuff.
23:00It's like this is just not a lot of lines of code to get the same
23:02sort of predictable outcomes.
23:04And it was also just efficient, like these are simple operations to actually reason
23:09about how to merge data together with the trade off being that you have to increased
23:15the metadata of the system itself.
23:17'cause it's like we are going to use more metadata to reason about, the
23:22different versions instead of using OT to me was always an algorithmic
23:27approach and that can be more efficient because you can send less data, but
23:32then the algorithm has to figure it out.
23:34But having seen all the challenges of having to scale, OT algorithmically,
23:38it felt like using more metadata was the right trade off, especially
23:43because there are other ways to sort of compress and manage that metadata.
23:48So it, it felt like that problem probably is more logarithmic versus,
23:53quadratic or exponential where you had, with an algorithmic approach.
23:57And so that, that to me was just interesting coming from Realm.
24:02The other side of it though was like, Hey, this is a decentralized approach as well.
24:09this can work peer to peer.
24:10And that, in and of itself opened up new possibilities, that also
24:16built upon, experiences at Realm.
24:19and so one of which is actually the part that Ditto is less known
24:23for, which is how to scale just the server side of a sync engine.
24:27because sync itself is stateful.
24:30You, can get into a scenario where client devices have trouble migrating
24:36to different, nodes in the backend.
24:39And that was something we faced at Realm was that it was very sticky, in
24:42sort of letting a device sort of reset.
24:45It's a state between the client and the backend.
24:49wasn't very straightforward.
24:51but that's a lot easier to do with CRDTs because they're inherently,
24:55don't require like a central system.
24:58And so that was actually the main reason I was first drawn to
25:02it, was that stickiness problem.
25:05But the other side of it was like, well wait, if you can migrate
25:09around to different nodes in a server itself, why can't the nodes
25:14at the edge talk to each other?
25:16And that is, that aspect is really what Ditto is known for now.
25:20but it, oddly enough came from looking at it from more of a server
25:24scaling issue, coming, coming from the experience at Realm.
25:28but the idea that you could connect devices directly.
25:32No one had done that before.
25:34And so that felt like, hey, if we could build that, that would really take
25:39this to the next level, and really be something I never attempted, you know,
25:43in the original startup or at Realm.
25:45And so that, that was the part of where trying to do that at a larger
25:49company, felt really not pragmatic.
25:52probably the last thing someone who just buys a company wants to do is like, let,
25:55let some folks go and rebuild the system.
25:58So that was the genesis of like, this probably has to be its own independent
26:02company to kind of go and pull this off.
26:04And so in the first six months of the business, it was all around sort
26:09of proving is this even possible?
26:12Because in my opinion, Ditto as a company or technology, it had a
26:17requirement on the edge, peer-to-peer aspect of whether or not the hardware
26:23had reached maturity to pull it off.
26:26like enabling devices to talk peer to peer is not a novel idea.
26:31That's, yeah.
26:32The internet was created because of that.
26:34But enabling devices to do that wirelessly is very much a function
26:39of whether the hardware, was ready for that because like the original
26:43iPhone or early mobile devices were one underpowered, like batteries
26:49have gotten more dense in the years since, CPUs and memory have increased.
26:54and then the wireless protocols themselves, like Bluetooth
26:57is not the same protocol.
26:58It was even 10 years ago.
27:00And so the early sort of six months of, prototyping with Ditto was very
27:06much a question of if this edge, peer-to-peer is gonna be like the key
27:11innovation that no one has pulled off.
27:13There was a part that we didn't really have control of, or which was.
27:16starting Ditto in 2018, like the right time, had the hardware
27:19actually, progressed to a point where this is, feasible.
27:22and that's the, I would say perhaps serendipity aspect of it was
27:26that that was true like 10 years sort of from the original iPhone.
27:30Like, you know, 2018 was the iPhone 10.
27:33That was a supercomputer.
27:35and that was a trend line that we wanted to bet on was that those devices, even
27:41other form factors were gonna continue to become, really, really powerful
27:45and connecting them directly, would open up new forms of applications.
27:51And so if we.
27:52Pulled that off, like that felt like a really big opportunity.
27:56So I just wanna linger on this point for a little bit since we're thinking
28:01about syncing your mind typically goes to getting data from A to B, and then
28:06you think about like, okay, that the data is correct, that it converges, how
28:11about like transactionality, et cetera.
28:13But we typically always kinda assume like getting the data from A to B of course.
28:18Like we have like a stable TCP connection and like it's all good.
28:22Maybe we're in fiber internet.
28:24but what you're realizing.
28:26Okay.
28:26It is possible, like the data part seems to be like realistic,
28:31and, and feasible with CRDTs.
28:33This is where you still had sort of like your, more harsh experience with OT.
28:37CRDTs seemed very promising, and now you realize, okay, now from a
28:42network topology perspective, this is feasible that those things could
28:47exchange the data like directly.
28:50But I think what you've then realized is like, well, two devices
28:55don't just talk to each other.
28:57That is, it's sort of like a miracle that the internet works at scale,
29:01the way how it does with like routers and network tables, et cetera.
29:06But now you want to kinda like jump beyond that and make the things talk to
29:11each other directly, which at the same time is, mind blowing that that's not
29:17the way, the default way how most things are that when I have here my iPhone.
29:22And an iPad, like most realistically, when I wanna send something
29:27between those two devices, it's probably gonna leave my country.
29:31and this is basically the other hard problem you've kind of stumbled
29:35into, which is the networking.
29:37So if I'm thinking about like choose your hero for your new business, I was
29:43like, before you had like all the bars on like on data and algorithmic and now
29:49a new bar has popped up, which is like max out for network, for networking.
29:55And that is, I think when I think about Ditto, this is, I think my
29:59mind immediately goes to, oh, this is the company who's like, has gone
30:03to all the extremes on networking and whatever networking way there might be.
30:09you probably have like an A plus implementation for that.
30:13Yeah, so that is ironic because, yeah, as I've mentioned, like coming
30:18from Realm, CRDTs were top of mind.
30:21And so this was summer of 2018.
30:23It was myself, my co-founder Max.
30:25we were just working on our own.
30:26We hadn't raised money, didn't hire anyone.
30:28That came later at the beginning of 2019.
30:31And so we started working, with some, you know, third party, CRDT
30:36libraries starting to kind of build a prototype of a data store around it.
30:42And we were like, okay, you know, this is a hard problem in and of itself.
30:46but when, like we started to embark on getting the network layer to work.
30:51Wow.
30:52That was a very humbling experience.
30:54so like Max sent was very focused on the data store in the APIs and I was like,
30:59oh, I'll get this Bluetooth thing working.
31:02no, no problem.
31:04And I just felt like, my whole job was just like clicking buttons.
31:10because you can't really simulate mesh networking, and that's, in
31:15hindsight, it was, I dunno, I guess maybe more obvious like networking
31:19is, you know, not predictable.
31:22and mesh networking itself is an optimization problem.
31:26So there is no like way to solve mesh networking.
31:29and whereas solving data storage.
31:33There is an end state, it's like right, it predictably onto the storage device.
31:38don't corrupt the data.
31:39Like there is a solution at the end, but on the networking side it's all
31:44about balancing trade-offs and managing like the reactions to the environment
31:50that you don't have full control over.
31:53And so that was way, way harder than we anticipated.
31:59and our early version in 2018, you know, barely worked.
32:03but it was enough that there were some customers that jumped out,
32:07specifically in the airline industry that had similarly internally
32:12tried to build something like this.
32:14'cause they were trying to build apps that work in the
32:16plane where there's no internet.
32:18And they couldn't pull it off.
32:20And so even though our, initial prototype barely worked, the fact that
32:24it barely worked, was still enough to say, Hey, that this is a big deal.
32:29you know, we would buy this product at, significant scale if
32:32you could actually make it work.
32:33And so that's what ultimately led to forming the company and hiring folks.
32:38But I mean, we had a prototype in like August and September of 2018.
32:44We didn't really have a solid functioning version until a year later.
32:48and that was really only on iOS.
32:50The Android one didn't come later, so I mean, it was practically two years.
32:54And like 80% of that was all the replication protocol itself, the CRDT, the
33:00data store aspect of it became a backseat.
33:03We sort of said, okay, like, what are some kind of.
33:06basic semantics that people would want, like last right wins.
33:09And how, how do we implement that in a causally consistent manner?
33:13How do we provide an API where you can query and, you know, do,
33:17simple crud operations on this?
33:20But then it was like.
33:22Put all of our energy into how do we make this work in these, wireless
33:26scenarios, specifically around Bluetooth and peer-to-peer wifi in mobile devices.
33:31So staying maybe at this timeframe for a little bit, if you consider the
33:37technology that you've had built out back then and today, like today, you
33:41probably have like orders of magnitude of more like capabilities and coverage
33:47for, for different like network protocols and topologies, et cetera, scalability.
33:53and you probably already, to some extent at least kind of foresee those back then.
33:59You, probably, like in your head, you start to like sum up two plus
34:04two and you realize, oh, that means we should also do that and do that.
34:07But then it becomes like a scoping exercise and say like, Hey,
34:11with, how little can we get away?
34:13Building this out that is already valuable.
34:16so that's one thing that I'm curious like how you went about that.
34:19And the other thing is going from something that like barely works
34:24and in most cases breaks to a year later, something where you feel pretty
34:29confident about, how did you go about building that confidence and how good,
34:33like, did you know it's gonna work?
34:36Or have you basically Yeah.
34:37How did you build that confidence?
34:39Well, uh, no, there was still like moments in those first couple years
34:43where I still wondered like, maybe this actually really isn't going to be possible
34:47to the point on the hardware side.
34:49like this, well this is sort of changing now, but, to date
34:53still the only cross-platform way that devices can communicate,
34:57peer-to-peer would be Bluetooth or if they're on the same wifi network.
35:02same wifi networks a little bit easier 'cause you know, you've got
35:05a, higher bandwidth stable network to a degree that's actually very much
35:09not true in practice, but, compared to Bluetooth, way more stable.
35:14But Bluetooth was the sort of the magical thing about Ditto.
35:18Like whenever we showed people the early demos, there'd be two phones
35:22on airplane mode and you'd click and instantaneously changes would happen.
35:28even non-technical people look at this and say like, what?
35:32Like, I didn't, I didn't know this was possible.
35:34Like, this feels like magic.
35:35Have you done something to the phone?
35:37And so we ultimately put a ton of effort into trying to figure out
35:42how to make that work reliably.
35:45And so that to your point on like early design decisions, that choice
35:49to really figure out how to make Bluetooth a functioning protocol
35:54that you could sort of build enterprise type applications around.
35:58which is what, was the customer demand.
36:01was a pretty tough constraint to work under because it is very unreliable.
36:07Every platform has bugs and errors in practice that are undocumented.
36:13Like, 'cause there are just like improper implementations of
36:16Bluetooth at the firmware level.
36:18and, you know, scouring Stack overflow or Apple forms or whatever.
36:23you'd literally find stuff that's never mentioned on the
36:25internet, in encountering it.
36:27And the only way to encounter that was to use physical devices.
36:32You cannot run the simulator and find all this.
36:34So that really was why it was so hard, like designing a protocol around it that
36:41was optimized for the low bandwidth.
36:44That was challenging 'cause we needed to be hyper efficient,
36:48but at least that's something you can kind of like whiteboard out.
36:51Then going and proving to yourself, wow, this actually works in the real world.
36:55Meant just a lot of tedious manual effort to the point that, I really just felt
37:00like a monkey clicking devices and sort of joked I should buy a, like a robot
37:05that would just click phones for me, as a way to test the software because
37:09there was no automated way to do it.
37:11And so that's the reason it took so long was to gain that confidence
37:16that the choices that we had made, would work in a reliable manner.
37:21And it was just sort of, I don't know, sort of like hacking your way
37:25through a forest, with a machete.
37:27Like you didn't really know where you were going.
37:29You just had to just keep pushing, pushing onward with it.
37:32it was way harder than than expected.
37:35That is incredible.
37:36And like as a web developer, we kind of like, we don't know how
37:39good we have it with like tools like Playwright, which gives you like browser
37:44testing with like top-notch APIs, et cetera, works for multiple browsers.
37:48We don't ever need to leave like the comfort of our chair and like we
37:52can just like use our primary device and then run things even headless.
37:56And you develop some pretty good confidence that stuff is gonna work.
38:00When you're building native mobile apps, then you're rather like you're
38:04flashing things on your phone.
38:06And then maybe you also have, like, if you're primarily using iOS, you might
38:10have an Android phone and maybe you have multiple Android phones because
38:14it's much more heterogeneous there.
38:16And then you are already getting into that mode of like having a few
38:19test devices, but you're going way further than that because you need
38:24to like look for all the edge cases.
38:26So that brings me to a kinda funny question.
38:29I'm curious whether you have like a chart of like the number of
38:33physical test devices that you've kind of allotted over the years?
38:38Yeah, I mean we have so many devices, that we've built up over the years.
38:42I mean, to the point that, I guess almost two years back now, we, we
38:45invested in actually building out.
38:48A, what you would call a semi anechoic chamber, to try to put a bunch of
38:53phones in a room, and run through simulations of them connecting up at this.
38:59It was up to a hundred devices.
39:00And so, Like there are, physical device testing companies that will run your app
39:06on a device, but they don't specialize in actually getting the devices in their,
39:11in their labs to talk to each other.
39:13And so we basically set out to, build that.
39:16we had an intern actually who, was a mechanical engineer who actually
39:20designed the room and stuff.
39:22And so that's been sort of the fun part about this is like, I wouldn't have
39:25expected 15, you know, years later after being a software developer that this
39:31local-first obsession, would pull me into such a physical manifestation of it.
39:37but it was all from the, desire to, work with these peer-to-peer, like
39:42true peer-to-peer, wireless protocols.
39:45and just the plethora, of different devices.
39:48And to be clear, like this is still true in iOS.
39:51Like you would think that Apple devices, their whole pitch is.
39:55We designed the hardware and the software, and so you would think across
39:59versions that a Bluetooth firmware would be the same and you wouldn't encounter
40:05weird behavior, but that's not true.
40:07It still exists.
40:09It's definitely way worse when you get into, you know, Android, windows, Linux,
40:13like the, broader plethora of devices.
40:15But, even in the platform, you'd sort of expect commonality across hardware.
40:21you'd still encounter these, weird scenarios.
40:24and so we have like logic in Ditto that at this point sort of built out
40:29through that trial and error that it's not really novel like concepts,
40:34but it's just knowing when to smartly sort of reset the state of the system.
40:39which might even mean turning the actual network interface off and
40:43on at, specific, points in time.
40:45and so people ask like, what's like the secret sauce of Ditto?
40:49And I, it's like, there's not one thing actually.
40:52It's, a bunch of like good ideas, but sort of layered on top of each other
40:57where each one like benefits the other.
41:00And so like the choice of CRDTs was important because that opened the door
41:05to peer-to-peer, serverless, approach to datas sync, which then, you know, meant
41:11we had to do other things to optimize, the data transfer because we were working
41:16with Bluetooth and so we adopted, CRDTs, where you can send just the differences.
41:22so versus like an operations based approach.
41:25and so it's like that was a decision that affected then
41:28subsequent aspects of the system.
41:30And so it's just a bunch of those smart trade-offs, which is sort of the reason
41:35why I call out the experience of Realm in seeing how then, these trade-offs, are
41:41really important both to implement this solution, a system in the right technical
41:48way, but also to manage the constraints as well with, business and, investors.
41:54Right.
41:54And just like you said that you wouldn't have, believed 15 years ago,
41:58what this would lead you to today were, you're like, being exposed to
42:02so many different devices, so many different, like use case applications.
42:07You've mentioned the airline industry.
42:09You probably now see the world differently where it's like, aha, I know there's
42:14a device and nobody knows about this device, but this is critical and
42:18needs to talk to those other things.
42:20I'm curious, like when you build all of this, like typically
42:25you don't get it right.
42:27like, it goes wrong, and then you need to debug it.
42:29When you build a web app, when you build a mobile app, you can at least
42:33like the road is like pretty well paved, so you get like log messages.
42:38You might get things like distributed traces, et cetera, metrics.
42:42But when you're talking to, like, when you're talking about like literal physical
42:46devices where the network is part of the problem, so you can't just like SSH into
42:52it, how do you even get debugging data and visibility into what's going on?
Debugging data and visibility on physical devices
42:58Yeah, it's a great question 'cause I would say it's a topical problem
43:02that we're still, working through is as we deploy Ditto into bigger use
43:06cases, it's become sort of the second day problem of great that works, but
43:11how do you, know it really works?
43:13And the key value proposition of Edge being able to do things at the edge is
43:20you can build more resilient software.
43:22And so the customers of Ditto are businesses that have workers predominantly
43:26that are not at desks like us.
43:29They're out doing jobs in the real world.
43:31And so in the real world, the internet is, by no means guaranteed.
43:36Cellular systems are unreliable.
43:38wifi systems are actually very difficult to manage at scale.
43:42And so being able to use smart software that leverages the network
43:49capabilities of the devices that workers are already holding is compelling.
43:53'cause it kind of adds like another layer of, durability, to ensure
43:57their, you know, their application, their data, keeps working.
44:00But that means if the whole value prop is to make the system more
44:06resilient, then Ditto itself has to work really, really well.
44:10And so how do you, ensure that?
44:13And so we've, we've had to build more of that out.
44:15and so it's sort of funny.
44:17There's, a, a feature we call the Presence Viewer.
44:20It's simple js application, that just shows all the nodes that are connected.
44:26because every time Ditto, you start it up, there's a database interface, but
44:31behind the scenes it starts to take over Bluetooth, wifi, peer-to-peer
44:36wifi interfaces on the device.
44:38And it creates what you would say is an overlay network.
44:41And so the device itself will create the links it can to other nearby
44:45devices, but the system itself learns of the whole mesh because every
44:50device, shares, information actually through CRDTs about it's presence.
44:55So like who it's connected to.
44:57And this eventually propagates around.
45:00And so we show this visually in this super simple application.
45:03It's just, you know, a bunch of nodes with colored lines showing
45:08the different connections.
45:09my co-founder built that, probably 2020, like it was just like a
45:12weekend project to throw together.
45:14But it ends up being like one of the most crucial tools customers
45:18use because they're like, well, how can I see what's going on?
45:22Because if data, like if they're clicking their device and data
45:25isn't moving, I. The first thought is like, am I even connected?
45:30And so, that was sort of the first start in our realization that as
45:35great as the database itself needs to be to handle application level data,
45:40to make this really worthwhile as a developer platform, we have to provide
45:44observability capabilities as well.
45:46so that you can fix issues when they arise.
45:50And so that includes now, almost like the sort of morphing into like a mobile
45:57device management platform where when you use our cloud service, you can
46:02observe, you know, the data in the database, but you can also request
46:06from the web portal logs from specific devices and they will transmit it up.
46:13And then you can, you know, go through them.
46:16You can also see what are the settings and the configuration of the SDK remotely and
46:21even, like issue commands down to change stuff so that an administrator could
46:26say, Hey, I don't know what's going on.
46:28Let me turn Bluetooth off on a device.
46:30You can do that remotely.
46:32And so those were definitely not our initial features that we were thinking
46:37about, but have come out of, ourselves having to debug this alongside our
46:42customers of like, yeah, this is a totally different way of building applications
46:47that doesn't rely on a server.
46:49And so you gotta have some way to actually go and get the, information
46:53on these devices to figure out what's going wrong there's a bug.
46:57That makes sense.
46:58So in terms of platforms that you're targeting, we've been talking a lot
47:01about mobile devices at this point.
47:03Is this sort of the majority of deployed applications or are
Ditto's supported platforms
47:09Yeah, so all the core of Ditto, I mean, of all the different bets we made, one
47:13of the technical bet was betting on Rust.
47:16the 2018 was I guess, sort of a bet at that point in time.
47:20Now doesn't seem as as crazy, but, we picked that, for a couple reasons.
47:25One is, you know, we wanted to build something that could
47:28work across different hardware platforms and so Realm was in C++.
47:33So in a lot of ways, you know, all of the Rust benefits as a
47:37language felt like a, better choice.
47:40But the other piece of it was.
47:42an annoyance that Realm at the time, which may maybe now would be more
47:47possible with WebAssembly, but, at the time they never could implement
47:52the mobile database in the browser.
47:54And so we were like, ah, let's not do that.
47:57Let's build this in one common code base and compile it to WebAssembly.
48:02And at the time, you know, Rust really was the language that given its history,
48:07was closely tied with WebAssembly.
48:09And so, you know, Ditto itself is a Rust shop, and so all the core
48:12of the code base is in Rust and we compile it for different platforms.
48:16And then similar to Realm provide, a language specific wrapper around,
48:22the Rust Code through the FFI.
48:24And so, our customers though right now predominantly use
48:28just the mobile versions.
48:29So, swift, Kotlin, flutter, which, you know, we've recently added,
48:34in and React native, but you can also run in embedded scenarios.
48:39so like C# and the JS version of Ditto.
48:44You can also run on a Raspberry Pi or you know, more IoT kind of scenarios.
48:48It just hasn't been as much of a focus, from a business standpoint.
48:52So those are more nascently used, compared to the, mobile versions.
48:56So going very hand in hand with the deployed platforms, you've been
49:00mentioning the airline use case before.
49:03Is this your most dominant use case or which kind of use cases do you see most
Ditto's use cases
49:10It's where we got started was the airlines.
49:12So, you know, I mentioned kind of that sort of regret feeling, when
49:17Ditto was started of not feeling like Realm really, was as successful
49:21as, I believed it could be.
49:23And so that, that led to, my background both engineering, both product.
49:28And so in the early days when it was myself and Max in 2018, I told
49:33him, I was like, Hey, if we can't get someone to wanna buy this, like,
49:37I don't want to waste more of my like, prime professional career, like
49:42hoping this thing will be successful.
49:44'cause I don't want it to end up where it sort of fizzles out.
49:47And that honestly is my, like, number one advice I would say in like the
49:50local-first effort the part that makes me most proud is something
49:54that like, could be long lasting.
49:57just like, how can I leave my mark on the world and.
50:00My talent is in software.
50:01So like, how could I build something that could have a really long impact?
50:05And so to do that as a business means you gotta actually like, make money.
50:09And so in the early years, I was like, let's start
50:13prototyping, building this out.
50:15let's just reach out to anyone who might have any interest in sort of
50:19any aspect of the benefits of this.
50:22And so we were looking at like all different to like, use cases of
50:26where this, platform could apply.
50:28And coincidentally, I had like a family connection to
50:32one of the major US airlines.
50:34so sent this email to, it was a fairly high up individual and he was
50:39like, well, I don't know who this is.
50:41so he basically pushed it down to, an intern, and was like, Hey,
50:45take a call with these two guys.
50:46Like maybe there's something here.
50:48It's a fantastic story.
50:50'cause we, we put this pitch deck together and we were like, we're building Ditto.
50:54And it's the CRDT database and it's got all these amazing capabilities.
50:58And she was totally bored by like 80% of the presentation.
51:02And then at the end, because we had mentioned peer to peer, she
51:05was like, well, could it connect like just two devices together?
51:09And we're like, yeah, yeah, they can totally do that.
51:11Which was not true.
51:12Like, and actually do that at the time.
51:15Theoretically.
51:15Yes.
51:16It, could.
51:17and she was like, well that's amazing.
51:18Like, we need that.
51:19Like, that will be amazing for our flight attendants when they're in planes.
51:23They could share information without having to rely on the wifi of the plane.
51:28And so they're like, come to our headquarters, like,
51:29we wanna see a demo of this.
51:31And so we.
51:33We're like, oh, well our schedule's looking really busy the next several
51:38weeks, so like, we're, we're gonna need to like plan this like a month later.
51:41and ultimately then we feverishly went and, you know, got the peer-to-peer aspect
51:46working, as I mentioned with like the Bluetooth and stuff, but it barely worked.
51:52but what was really cool about that is like, we were at their headquarters and
51:56we were put in this like, nondescript room and, the woman came in, the intern,
52:02and a couple other folks and they were like, wow, this is really cool.
52:04Like, sit here, we're gonna go get some people.
52:07And they just left.
52:08And we were just sitting there for like 30 minutes thinking
52:11like, what is going on here?
52:13And then lo and behold, like.
52:15The more senior executives of the company come marching into this conference room
52:19and they were like, let me see this.
52:22And everyone started poking all the phones that we had.
52:25We had this very simple app that you could, change the inventory values and
52:29it wasn't even working, like phones were crashing and there was this one
52:33woman being like, that one crashed.
52:35That one crashed.
52:37But the whole time everyone was like, this is amazing.
52:40like, I didn't think this was possible.
52:42And so that was sort of the genesis of knowing that there was
52:47real customer demand for this.
52:50we obviously had to get it to work.
52:52but that's where we ended up saying, okay, let's build a company.
52:56let's go raise some money.
52:57was after that and ultimately led to selling to the airlines
53:01as, as original customers.
53:03And so Delta, Alaska Airlines, Lufthansa, Japan Airlines, ANA, like
53:09major airlines around the world have adopted Ditto in that same use case
53:13where they have installed it as part of the mobile app that their flight
53:18attendants predominantly, are using.
53:20And so in a lot of ways, it's actually kind of like a CRM app.
53:24this is an app that, you know, they have to log into to start their job, which
53:28is, you know, like their hours worked start when they, when the, you know, the
53:32plane is, is getting ready and it's how they, it's like their slack, for them.
53:38It's where everything they need to do, it's all the passenger information, it's
53:42meals that are loaded onto the plane.
53:44It might have safety issues and things.
53:47And so it's just their lifeline to their job.
53:51But previous to Ditto, those apps were effectively single player games.
53:56Like they would download the initial data locally and then they would go into the
54:01plane and they could not actually share.
54:05And so they would make notes for themselves, but it was all private.
54:09And so with Ditto, suddenly now, like they have what we take for granted
54:14with a lot of the software we use at desk base, which it's collaborative.
54:18And so, you know, they could message each other and you know, do other
54:21things that ultimately mean that they could do their jobs, more efficiently.
54:26And so this, is still a major use case for us, but you know, since then
54:30we've expanded into other things.
54:32But yeah, it was sort of a weird.
54:35vertical to start with.
54:37Given that like a year and a half into starting the company, we had
54:40the pandemic and the airline industry was, heavily affected by that.
54:44but, yeah, it's, it, we were able to weather through that.
54:47Thankfully.
54:48That is an incredible story.
54:50And just like, as a little random side note here, if you're looking at your
54:54LinkedIn history, it also mentions, I, suppose, in between some of your work
55:00chapters, you've been also helping out the TV show, Silicon Valley, and the story
55:05you've just presented about you, like walking into the airline and presenting
55:09those in front of the senior executives, that, like my mind immediately went to
55:14sort of like a scene from Silicon Valley.
55:16So this is, like coming full circle in so many ways.
55:20That is incredible.
55:21Well, there is some similarities to the storyline that the individual who
55:26hired me at Realm was, ended up, him and another friend of his were involved in
55:30kind of more directly in, the writing.
55:33And so he.
55:34He asked me in like the third or fourth season, I forget at this point, which
55:37one it was, to be a technical advisor, which meant just making sure like
55:41the software code on the whiteboards and screens was semi accurate.
55:45so it was, fun, but it was, is it ironic because I look at that show
55:50and there are definitely aspects of, especially the new internet
55:53that like, is definitely not like.
55:57Like totally disconnected from Realm.
55:59Like there were times where we said that internally at Realm, and
56:02even to this day, like Ditto is sort of a manifestation of that.
56:05So that's, it's not by accident.
56:08There was, there was some connect.
56:09Well, if you ever have to rebrand to Piper, we know where it's coming from.
56:12Exactly.
56:13Yeah.
56:14So, well, I have so many more questions about Ditto, but I think
56:19we need to like split this up into a future episode at some point.
56:23And, also you will be giving a talk at Local-First Conf where
56:27I think we'll hear a lot more.
56:29I wanna just put the focus for a few more minutes on Ditto as a platform that I
56:34just get a better feeling for like what it would mean to build something with Ditto
56:39since when I'm looking at the website.
56:41Beautiful website by the way.
56:42When I'm looking at the website, there's kind of two sync approaches.
56:47One is device sync and one is peer-to-peer sync.
56:50can you delineate those a little bit more and maybe anchor
56:53them in canonical use cases?
Device sync and P2P sync
56:56Yeah, so in a lot of ways, like Ditto is no different than Firebase or Realm.
57:01Um, like any sort of, embedded database synchronization, like we have SDKs,
57:07that are an embedded document database.
57:10unlike Realm, like one of the trade-offs we did was we leveraged
57:13an existing storage engine.
57:15So at at the end of the day, we're just storing data in a SQLite database on disk.
57:19But we designed the API to be a document database so that you don't have to, at the
57:24database level manage schemas, which in our experience with Realm, which was very
57:29strict with schemas became challenging working across, teams that have like.
57:34Different iOS and Android teams, like sometimes big companies, they
57:38don't really coordinate as well.
57:39And so like Realm ended up being this like odd thing that forced
57:43coordination, amongst teams.
57:46And so we thought, hey, schemaless document API would, be easier.
57:50And so if you try it out as a developer, you would see, hey, this looks a lot
57:54like in a lot of ways like Firebase.
57:56and so you read and write data locally, and then behind the
58:00scenes we replicate that data.
58:02'cause at the end of the day, data stored as CRDTs and we
58:05replicate it to other nodes.
58:07And so the device sync system is basically the exact parallel to any
58:13server based synchronization system.
58:15There is another version of Ditto, the server which we run as a cloud service
58:20that syncs data through the server.
58:22And so.
58:23That's not particularly super novel.
58:25I guess some of the CRDTs and things that we do with it, you know, has,
58:29benefits in terms of scale, but, the aspect that is Ditto is known
58:33for is that data can also move.
58:36You could say like.
58:37Vertically is to the cloud horizontally.
58:40And so that's where devices, when you're using it in the peer-to-peer
58:44mode will connect through other transports to nearby devices.
58:49So in a mobile device that's, you know, Bluetooth like I was talking
58:53about, or peer-to-peer wifi, or the wifi infrastructure itself, it actually
58:58can use other radio networks as well if you're in device, if you are in a
59:02device that has some other custom radio.
59:05and so we encounter that with some use cases where like a, a radio is
59:09plugged into the USB port of a mobile device, or in like an embedded scenario.
59:15And that's where all the smarts are.
59:18to your point on the networking side where we build this overlay network and
59:23devices can sync data, peer-to-peer.
59:26And so all of that, again, is, driven by the fact that.
59:30There's these, diff based CRDTs that are being transmitted around
59:35in a causally consistent manner.
59:37and similarly to Firebase or, you know, other sync engine
59:42approaches, it's all query based.
59:45So what data you want is still defined by queries on the database.
59:49And so if you're, you know, building an application, you know, for like, the
59:54airline, you might have a query that say, I need data for flight 1, 2, 3.
59:59You subscribe to that query, which will.
1:00:03Give you a callback to let you know whenever data changes the
1:00:07database that matches that.
1:00:09But that query is then transmitted to the other nodes, both to the cloud and peer
1:00:15to peer, and all the other nodes will continue to evaluate that query, with data
1:00:21that they have locally and push it to you.
1:00:24And so, that will happen again, you know, over Bluetooth.
1:00:27if a nearby device generates data, like a flight attendant adding a message,
1:00:32for, for a given flight, it'll get out to all the other devices, regardless
1:00:37of connectivity with the cloud.
1:00:39and so that's where we've tried to make Ditto feel familiar in the way
1:00:44that people have experienced sync, systems before, from client devices to
1:00:50the server or cloud, and basically try to make that just map identically to
1:00:55that working in a peer-to-peer manner.
Outro
1:00:58That makes a lot of sense.
1:00:59And, just as a funny side note, I'm, I must imagine that when thinking
1:01:05so much about the, airspace use case with flight attendants, et cetera, and
1:01:11devices talking to each other and like that you don't have connectivity to
1:01:15the cloud yet you are in the clouds.
1:01:17It's probably a funny situation.
1:01:21So, Adam, there's so many more questions that I would love to ask and I will
1:01:26ask them at some point, but I think.
1:01:28That for that we'll have to bring you back to a second episode.
1:01:32I wanna say thank you for sharing all of this with us.
1:01:36this has been incredibly insightful, super entertaining, all of like those
1:01:40anecdotes that you've like experienced and gathered over like 15 years at this point.
1:01:46Really impressive.
1:01:47Really impressive.
1:01:48Like how far you've brought Ditto from the early beginnings, you and Max to now.
1:01:54Like, there's probably most like airlines are probably on a way to using
1:01:59Ditto at this point and probably many daily experiences that I, that I have.
1:02:05You mentioned point of sales in a previous conversation.
1:02:08Super impressive.
1:02:09Thank you for sharing all of this with us.
1:02:12Thank you.
1:02:12Yeah, I'm really looking forward to the conference, and
1:02:15sharing more about the journey.
1:02:17'cause yeah, like I said, this is something I 'm very passionate about
1:02:21and like, excited to be, you know, with others in the community and to the degree
1:02:25that Ditto can inspire others, you know, that, that makes me really excited.
1:02:29'cause like I said, this is, this is all driven by that early desire
1:02:32of wanting this tool as a developer.
1:02:35And so, I'm hopeful that we can continue to push like the application
1:02:39development kind of standards forward.
1:02:41So that local-first is, more just the default scenario to building,
1:02:45client applications versus this, you know, historical RPC,
1:02:50you know, client server model.
1:02:51So anyway, I appreciate having me and I'm, you know, happy to, find feature
1:02:55time to continue to tell the story.
1:02:56Awesome.
1:02:57Thank you so much.
1:02:58Thank you.
1:02:59Thank you for listening to the localfirst.fm podcast.
1:03:02If you've enjoyed this episode and haven't done so already, please
1:03:05subscribe and leave a review.
1:03:07Please also share this episode with your friends and colleagues.
1:03:09Spreading the word about the podcast is a great way to support
1:03:12it and to help me keep it going.
1:03:15A special thanks again to Jazz for supporting this podcast.