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?