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?