localfirst.fm
All episodes
June 17, 2025

#26 – Adam Fish: Ditto, Realm

#26 – Adam Fish: Ditto, Realm
Sponsored byJazz
Show notes

Transcript

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