text
stringlengths
0
2.68k
**Glauber Costa:** It has trillions of databases deployed, right.
**Adam Stacoviak:** Yeah. I mean it's not... And Dr. Richard Hipp is one of our friends, we love him. We think he's an amazing person. But I think you're right though that the public domain-ness and the not open to contribution makes it challenging, because that -- and Dr. Richard Hipp even said on this podcast in the ...
**Glauber Costa:** This was one of the big contributors for us to revisit that decision, was exactly the test suite. And again, it's not that we didn't know about it, it's just that we thought things would go one way. But look, I always love to - if I may, to use opportunities like this to clarify something... Because ...
**Jerod Santo:** Well, I'm glad you make that explicit, because as an observer, I remember your initial announcement, and maybe it's because of maybe the social baggage of what a fork implies...
**Glauber Costa:** Exactly, yeah.
**Jerod Santo:** ...but my initial impression was - and I don't remember the words that you use anymore; it was two years ago. But I was like - you and your team seemed a little bit upset, or... You know, "We're kind of disappointed with this, and so we're going to fork and do it a different way." And it's hard to do t...
**Glauber Costa:** \[16:05\] Exactly. And we did spend a lot of time, by the way, crafting that message... But regardless of how much -- there's always some room for misunderstanding, which is why I always appreciate... Now, I also don't want to run from it, and I want to make something clear. We disagree, technically,...
And you have to put it in context as well. Pekka and I grew up in the Linux Kernel community. And a lot of people say this about SQLite; and with that, I disagree. SQLite, being what it is, has to be kept as this very small thing, because that's the whole beauty of SQLite. And again, I disagree with that, because if yo...
So we don't agree that SQLite has to be protected and has to be maintained by just a single individual to be the success it is... But look, who knows? Maybe I'm wrong, maybe I'm right, but we act based on what we believe. We don't believe there is anything wrong with what they're doing. We just think that it could bene...
**Adam Stacoviak:** But you do believe that you can replace. You said "We believe we can replace SQLite."
**Glauber Costa:** Yes. 100%. And we will. And I want to clarify that now, because with LibSQL it became very clear to us in maybe a month that that was not going to happen. So with LibSQL -- I joked about it today, we had this goal of replacing SQLite for 10 minutes, because it's a dream etc. It's obviously a big priz...
But when we put the rewrite out, it became very clear - and I've been using this analogy from chemistry, that the reaction was right. LibSQL was something that the market was clamoring for. I think what it became very clear seeing the reaction of Limbo now is just that the activation energy is not enough to make the re...
\[20:15\] And after talking to a lot of people - and there's a whole story of what happened after we announced this... I talked to a lot of the people who came and started contributing to the project... And what it became clear is that they all agreed with us, that we need a better version of SQLite. I mean, it will be...
Furthermore, it is actually very hard to do, because one of the things you did mention - the SQLite test suit is fully proprietary. So once you start making changes that are very deep into the core, you start hitting a bunch of issues. And some of them -- it's just like yourself saying "I know that the best way to solv...
**Jerod Santo:** That's amazing.
**Glauber Costa:** ...and many, many other things. I mean, the level of contributions that we started to get... We started getting like people running this on the browser. A week after we announced, it was running on the browser already; just like this, compiled to WebAssembly. All from contributions from third party p...
Again, LibSQL, we did get a lot of contributors, but they were all contributing to the drivers, to the server... Things at the margin. Which - they're important as well for an open source project, but with Limbo, we actually managed to see our dream, the 10-minute dream come true. Like, we're going to build a community...
**Jerod Santo:** Well, I think you hit a great chord as you've given evidence to. I know my guttural response to Limbo was quite a bit more positive than mine was to LibSQL, just by reading the announcement post. I'm like "Okay, this makes a lot of sense." And then I realized later "Oh, it's the same people that tried ...
**Glauber Costa:** Exactly, yeah.
**Jerod Santo:** So I think you're \[unintelligible 00:23:31.05\] describing it. On the testing front though, I would imagine it's gotta be just as hard, or maybe I would expect it to be harder with a rewrite. What makes it easier with a rewrite than with a fork if you still don't have a test suite?
**Glauber Costa:** \[23:47\] Your intuition is correct by the way, which is one of the things that all things considered we went with the fork. Because at least there's some level of guardrails that come with the fact that at least you know that this code that you're importing was tested by this proprietary test suite ...
**Jerod Santo:** It started off right. Yeah.
**Glauber Costa:** Right. So I don't think our intuition is incorrect. But something amazing happened... And by the way, the way I look into the situation, another thing that I want to make clear - I don't actually think that we made a mistake with the fork. Because if we were rewriting back then, there were many decis...
And deterministic simulation testing is a very niche thing, that most people have never heard about. I had heard about it a couple of times, but I didn't truly quite understand what it was, until I met Joran. So Joran is the founder of -- and I can say this... I mean, even though I am the founder of a database company,...
TigerBeetle is a database - just to keep it very brief - that is designed for financial transactions. So it's completely written in Zig, and their goal is to replace entire systems, the bespoke systems that most financial institutions have to process transactions. So if you're selling to banks and financial institution...
Deterministic simulation testing is essentially a fuzzer. So it will generate a bunch of inputs. It randomly generates as many inputs as it can on the space of possible inputs... And this is the disadvantage. You kind of have to write software in a special way to lend itself to deterministic simulation testing. It's ve...
So what the simulator does is that it's going to explore the space of possibilities, create the most arcane, impossible situations ever, and then when something breaks, it gives you the exact steps deterministically that everything in the system had up until that point, so debugging those problems becomes very easy. So...
\[27:43\] So this is one of the things that led us to believe, "What if we try the rewrite?" Because we knew that we could now try to rewrite using deterministic simulation testing. And then we also partnered with a company called Antithesis, that offers almost like the integration test analogy for deterministic simula...
So we knew that that was the missing part of the puzzle, and then with that, we will be able to actually create something that probably even surpasses the level of testing that SQLite has. But here's the catch. It is easier to do this on the rewrite, because you have to write the system with these in mind from the get-...
**Jerod Santo:** Is that popular enough that you can go out and there's Rust crates that will give you this functionality? You have to write all this DST stuff yourself?
**Glauber Costa:** All of it, yeah. So for people who are interested in DST, but don't want to go through the pains of just rewriting all sorts of things like that, I truly recommend taking a look at Antithesis, because... I mean, Antithesis is amazing. It's the second -- it's not the second, next best thing. We use it...
But the problem with deterministic simulation testing is that once you start importing other crates in Rust, for example, you have no idea what those crates are doing. Those crates are calling IO. So you kind of have to write everything. So it's not even that you have a crate for deterministic simulation testing, it's ...
So it's something very hard to do for general purpose testing. For a database, like TigerBeetle, for a database like Limbo, it's worth it. And the scope is quite limited. And you don't want to be importing crates all the time anyway... TigerBeetle is way more insane than we are. They have a policy that they just don't ...
And again, it also depends, because SQLite comes with a CLI. If you want to import a crate that does whatever crazy stuff to implement callers in the CLI, that's fine. But for the core of the database, we try not to import anything that could potentially do IO, because we want to make sure that everything goes through ...
**Break**: \[30:52\]
**Adam Stacoviak:** This DST sounds like magic magic.
**Glauber Costa:** Yes, man.
**Jerod Santo:** \[laughs\] It does.
**Adam Stacoviak:** If it's like writing unit tests, what exactly -- and you said that the rewrite is better because you have to write... Assuming this DST is in place, what actually is the writing and the creating of this deterministic simulation testing? What is that? How do you do it?
**Glauber Costa:** Yeah, so again, the simulator itself, you just write a couple of scenarios. And again, it's not truly magic, because you do have to write the simulator, right?
**Jerod Santo:** Sure.
**Glauber Costa:** So the simulator just writes -- imagine for example, a workload, and the workload is like generate a couple of queries, and then write etc. But the simulator will include a fuzzing element to that. So instead of like generate this query that I wrote in the unit test, you give it almost like a query g...
So when you're running this in production mode, your abstraction for write just called the operating system write. But when you're running deterministic simulation testing mode, your abstraction for write runs the simulator code that will start injecting failures into this. And again, injecting failures in a determinis...
**Adam Stacoviak:** As my friend that runs -- well, he used to be on \[unintelligible 00:34:46.01\] I'll just leave it there. \[laughter\] I'm sure any fans will get it.
**Jerod Santo:** \[laughs\]
**Glauber Costa:** Is that the guy that --
**Adam Stacoviak:** "It's barely an inconvenience", yes.
**Glauber Costa:** "Very easy, barely an inconvenience."
**Adam Stacoviak:** Yeah, that's right. Super-easy, barely an inconvenience.
**Glauber Costa:** I love that guy, man. It's super-easy, barely an inconvenience.