1. Library
  2. Podcasts
  3. Jamstack Radio
  4. Ep. #144, Financial Accounting Databases with Joran Dirk Greef of TigerBeetle
Jamstack Radio
30 MIN

Ep. #144, Financial Accounting Databases with Joran Dirk Greef of TigerBeetle

light mode
about the episode

In episode 144 of Jamstack Radio, Brian speaks with Joran Dirk Greef of TigerBeetle. This conversation explores financial transaction databases and the importance of building trust at the intersection of open source and business. Joran shares the invaluable lessons he learned from his early days as a self-taught developer as well as his journey founding TigerBeetle.

Joran Dirk Greef is the Founder and CEO of TigerBeetle, the distributed financial transactions database designed for mission critical safety and performance. He was previously staff software engineer at Coil.


Brian Douglas: Welcome to another installment of Jamstack Radio. On the line we've got Joran from TigerBeetle. How you doing?

Joran Dirk Greef: Hey, Brian. So great to be here. Thanks for having me.

Brian: Yeah. It's a pleasure. We've been going back and forth in email, we've had a couple conversations and got connected through Dee, so super happy to make that connection. I've actually heard of TigerBeetle for a while now, at least six months, and was happy to get that introduction. Why don't you introduce us to who you are and how you got here?

Joran: I'm the founder and CEO of TigerBeetle and a software coder. So I looked over people's shoulders as the 286 was unboxed. My father, my sister, setting it up and people later coding, and looked over their shoulders so I got into BASIC and that was the beginning of hitting my head against the wall many times and learning perseverance. Yeah, then I became a staff engineer at one point and founder and CEO of TigerBeetle.

Brian: Excellent. I know you have South African background. Are you in South Africa today?

Joran: So there's a saying, I love databases so much I live next to Table Mountain. And that is true for me, I live in Cape Town, South Africa, still. I was pretty lucky, I was playing five a side soccer on my AstroTurf and I bumped into someone working for a startup in the Bay Area that had an office in Cape Town and so I got involved. That eventually lead to TigerBeetle.

Brian: Yeah, excellent. So I'd love to find out the origin story of TigerBeetle, and what prompted you to build this company because it's actually rather unique in a bunch of different ways like your decision to use Rust and Zig I'm super intrigued about. But also even the problem you're looking to solve, so supporting financial institutions and their databases. So yeah, what's the origin of this interest?

Joran: Yeah. So TigerBeetle, it's a financial transactions database. Normally databases give you SQL transactions and they always say you get an asset so that Alice can pay Bob, but the debit-credit primitives for Alice to pay Bob are not in most databases. TigerBeetle is a financial transactions database, so Alice can pay Bob and debit-credit in TigerBeetle out of the box, in your NodeJS client.

You don't have to write SQL, get a very nice API to do that. Just pure debit, credits. Exactly what you need if you're fintech or if you're just any kind of business and you want to record your business transactions and you want a debit-credit schema which is a very nice way to do it. The origin story was I bumped into Coil, a very cool startup in the Valley.

It was founded by Stefan Thomas, who was the CTO of Ripple, and was kind of more interested with Coil in exploring real, existing payment systems. How do you connect them all, that you can send money from your bank to a digital wallet or to a mobile network in Africa somewhere, and then from there on? So the interledger protocol, what the internet did for home networks.

I grew up playing Doom II or Duke Nukem over Serial cable before the internet existed, and my story is very much growing up with the internet. That first CompuServe modem, it was covered in wetsuit, and then how that connects to the internet made a network of networks. But in the payments world, currently today, everybody is their own network.

So Bitcoin will say, "Come and join our network and we'll solve global payments." And Ethereum will say that, and the banks, they have their own networks and there's Swift. It's all networks and networks and networks, but where is the internet of networks? This was the vision for Coil as the interledger protocol, modeled on the internet protocol. How can we send money as if we send email?

Agnostic of whatever technology it is, whether it's old or new. I joined Coil as a consultant, and they were partnering with the Bill and Melinda Gates Foundation on an open source payment switch for Asia, Africa, developing countries to run and open source. You can give people--

A few billion people are actually excluded from the financial markets. There's no ATM in their town, they don't have a bank account, everything is cash so they walk kilometers or miles just to send money home. They have to put it in their suitcase, take it on the bus sometimes. The idea was everybody has a cell phone, how can people use their cell phone to send money back home? You start to do that, you save people time, and you can lift people above the critical poverty line.

That was what the Gates Foundation are doing with Mojaloop Switch and open source. Coil were partnering, basically, to connect this switch with interledger protocol so now you're connecting the whole world, network to network, bringing internet ideas into this very old world of payments. Then, straight away this is the thing you realize, it's that with the Internet's scale now... Before it was like Doom II, serial cable two computers.

Internet comes along, massively multiplayer online games, the scale just explodes. The same thing happens with payments, so this was what Mojaloop, which was looking at this, it was like how do we now handle this performance? So I came on, increased the performance at the switch and then I looked at the switch and I saw again... Every SQL database is promising an asset so that Alice can pay Bob, so the switch was building around MySQL and they had many people working on this.

They were trying to do debit-credit. We thought, "Well, wouldn't it be nice if you had an open source debit-credit database, a financial transactions database that you can just do a transplant into the switch?"Kind of like Ruby on Rails was extracted out of Basecamp, a real world problem. You could say wouldn't it be nice if you could spin up a blog in 15 minutes or 5 minutes? And we were like wouldn't it be nice if you could have a central bank switch for the whole developing world?

And here's the database to power that, and you just write a little bit of API code around it, and there you go. You can power a country and we make this open source so that fintechs can use it and bigger companies can use it, Airbnb or Uber or whatever, tracking rides or bookings or whenever there's a business transaction. Let's give them the database to power that first blast. So that's the origin story, I guess.

Just realizing that we built these things around a general purpose database. It's kind of like building a car with an engine, but what if you had the car out of the box and it's Formula 1, just designed for this? It's purpose built for transactions processing. I think this is the funny thing. People will know this term, OLTP, and we use it, we say Online Transactions Processing.

In the same sentence we say General Purpose Database, but actually there's a bit of a mismatch. From general purpose to transactions processing there's so much work you've got to do, so we're like, "Well, what do you need for transactions processing?" It's debit, credit, can model any kind of business transactions, financial transactions. So it's not only payments, you could do financial accounting for money or even just counting.

How do we count? Let's say we're building a serverless startup, we need to track usage of our API, how do we count usage that isn't map reduced billing, log scraping every 15 minutes? How can we do that in real time so that our users can have realtime spend caps or we can give them instant visibility into their serverless usage spend?

As soon as you start looking at that, things become, again, so transactional. You're moving from billing once a month or every 15 minutes, to every second. Your number of transactions, again, goes up. So that's TigerBeetle, the dream is let's do OLTP open source for the future, that's highly scalable.

Brian: Yeah. What was the decision for going open source? Because when I think finance and I think fintech there's a lot of secret sauce, trying to make sure no one's building the same thing, and you also mentioned like with banks and ledgers, everyone has their own. So having an opportunity to build on your own database through TigerBeetle, why open source that?

Joran: Yeah, great questions. I think Kafka wouldn't have been the same if it was proprietary. I think the most popular, general purpose databases, all three on the podium are open source. But for me it was more for personal reasons. I loved ZFS and I always so sad... ZFS the file system, I was always so sad that the license, in my eyes, wasn't... I love MIT and El Paso too, because they allow people to build businesses on top of them.

I think they're really free like that, so I always sad that ZFS didn't have that and it never really got adoption because people couldn't use it. I was basically going to switch to FreeBSD at one point just to use ZFS, and I thought with TigerBeetle, what we were going to do is... It's a distributed database, it's got consensus, it's got... Normally you run MySQL and it's single node, or PostgreSQL is single mode.

There's no automated failover, and TigerBeetle has all these things. You run a cluster, it's a single binary, you run it on a few machines and you can't take this thing down. You can corrupt the disk, it's like ZFS, it self heals.

It's got all this cool stuff that I always wanted from my database, and I thought personally this technology is too valuable not to be open source, because I wouldn't want to work on this if I don't know if it's going to be around like 10 years as open source because this is the thing with TigerBeetle, you can take the financial transactions business logic out.

It's very much inspired by Ruby on Rails, you can build any kind of database with TigerBeetle. It's actually a database framework like Rails. It's open source. We haven't packaged that framework up yet, so at the moment you see Basecamp. But actually there is a Ruby on Rails database framework in there that you can create all kinds of databases in 15 minutes. This is the vision. Again, learning from the web.

Brian: Yeah. This is interesting because before we hit record we were talking about this cyclical nature of the web and interestingly here, your Doom II origin story of growing up with the internet. Because I'm slightly younger than you are, I was a bit younger trying to run Doom II and Wolfenstein and Duke Nukem and stuff like that. But I figured it out, and I'm also here because of that.

I think being able to look back in the past and basically remix or take samples of things that worked, I'm super intrigued by this framework that TigerBeetle is sitting on top of. I'm also curious about the business model for the product, so you have a packaged solution, it sounds like today. Are you now going to institutions in Africa to support getting onto... I was going to say getting on the internet, but basically get connected into a network so that'd make it easier for folks to make transactions as you were explaining.

Joran: TigerBeetle is a US company, most of the team are in the US, but we also see ourselves as global, remote and the reason for that is that we are always... We want to serve everybody, not Africa only, not Europe, not Asia, like America and everywhere. So we've been very intentional, two of the team are in Brazil, South America, some are in Europe, some are in Cape Town, some are in the US. We're not yet in Asia, that'll come.

But the idea is that we're a distributed database built by a distributed organization. The Gates Foundation are now integrating TigerBeetle into the switch and that switch is going around the world, all over people in Latin America are interested and Africa and Asia. That switch is open source, so if TigerBeetle wasn't open source it wouldn't be touring along, so it has to be. Actually, I think this was kind of my own journey.

There was a point where I realize, wow, we could build a financial transactions database that could be 1,000 times faster than if you built over general purpose because we design for the whole problem. But the second big step in the journey as a founder was realizing open source and business are orthogonal, and I think a lot of people make the mistake of thinking they are competing or there's a point that you naturally switch... you pull the rug and I always get upset when I see that because I think it's so sad, people don't understand that business models and open source are orthogonal.

Usually you see people damaging trust when the business isn't going well, and that's really you don't want to do that. You actually want to look at why this business is not going well. Usually there's other reasons. If you look at the IPO, they've been sliding for years. This is the sad thing, it's that the CEO or whoever who makes open source the scapegoat and everybody believes it.

I think, "No, there's other reasons there and a drama was made out of it." So actually the business is the problem. I think this is the thing that I realized, and it's a big relief. It's that open source and business are orthogonal. Then the other lesson I learned was that the best business is built on trust, especially if you're tracking financial transactions. Why should people trust TigerBeetle as the database?

And it's because it should be 10 times safer than anything else, because the alternative is a general purpose database with 10,000 lines of JavaScript code, and I've spent 10 years in the JavaScript world that it's not necessarily the language you want if you do a DIY financial transactions database. Trust is everything, and I think we realize that open source actually is how you build trust and it's how you keep trust. That's why you stay open source.

But in this business especially, it's trust, trust. That's what we sell. It's that we've built TigerBeetle, we took no shortcuts, people can see that in the technology, in the way we built it, which we could go into. All the design decisions, it all comes down to trust. Two things I learnt quickly, it's just that a lot of startups, they will say open source, "Is great, it's too expensive, who's going to run it for me?"

A lot of big enterprise companies will say open source is, "Nice, but it's too cheap. Who can I pay for the helicopter contract when things break? Or who can advise or who can save my developers time around this?" They've got people to deploy it, but they still want to pay for insurance to keep it, or just for expertise, and again it comes down to trust. So who do startups trust to run it for them? Open source is too expensive, and then for enterprise open source is too cheap, so you can build a business around it and just as long as you're confident, that trust is really where it's at.

Brian: Yeah. And I wanted to touch on, because you mentioned Ruby on Rails a few times and how amazing that's been, but you made a technical decision to use... Well, one, TigerBeetle is its own standalone database so we're not talking PostgreSQL extensions here. You're opting into TigerBeetle. The other thing is you made the decision to use Rust and Zig which I think are both cutting edge languages.

Joran: Just a correction, we don't actually use Rust. We use 100% Zig, but we do say to other people, "look, it's Rust and Zig, and for some projects we pick Rust." So Matt Clad who wrote Rust Analyzers on the TigerBeetle team and we've got some other people working with us, contracting who are very senior in Rust. But we don't actually use any Rust.

Brian: I appreciate the correction too, as well. So my question now is why Zig?

Joran: And why not Rust?

Brian: Yeah. I've been following Zig since its earliest days, and I think Bun is the other project I can think of that has Zig in production. I guess the question is there friction? How are you hiring folks and getting them onboard to then do Zig? There's probably an easy answer, it's like, "We just hire the best developers and they can learn on the job." But how's the experience of Zig been?

Joran: Great, thanks. Again, it comes down to business and trust. There were so many good business reasons to pick Zig. I think this will surprise people. Again, from Rails I realized while we need to do web sockets, you need to get into NodeJS, the day Rhino launched I was doing Rhino on the VM because I was convinced server side JavaScript. Everything I learned for TigerBeetle is... Why Zig is because of JavaScript.

I spent 10 years, NodeJS ecosystem, I loved it, I learned so much. I also saw the stuff, like Ryan wrote 10 Regrets About Node, and I had a few as well. Node, which is dynamic, elegant, there was no way pass a buffer so that you could do a TCP receive into an existing buffer. I would sometimes run into two minute GCE pauses in production, things like that. Then NPM dependency explosion.

I actually did come to appreciate strong typing and just the ability to work with the hardware, unlock the power of the machine. There was this yearning to do that and I could never do that in Node, but C was always such a mission. I started getting into C, so I wrote a lot of Native addons for Node in C, and then I also realized, okay, the stuff that I don't like with C that they could really fix... Obviously it's like walking cliffs with a blindfold, you never know when you're going to falloff because there's no fences anywhere with C.

Nothing is defined so it's extremely dangerous, but there's this yearning to work with the machine. I've been a high level developer for so long. Zig came around, and I started following it in 2018 for two years. TigerBeetle was 2020 when we started, July, 2020, so for two years I've been following Zig. I'd been following Rust too, and when Ryan Darrel wrote that post, 10 Regrets About Node, I said, "Well, maybe you can avoid some regrets for Dino." The backend was good, at the time I said, "Maybe we don't want two GCs. What about Rust?"

So he actually did rewrite Dino in Rust, which I was so excited about Rust time. Then I saw Zig, and Zig kind of just hit the sweet spot. How do you do static memory on a cache? How do you just not even have manual memory management in C? I don't even want to call my local free because of this experience with NodeJS. It's like how do you build rock solid APIs where you know the explicit limit of everything your program can do. How you build a box that is shaped as if you're doing engineering in the real world?

You can have physical constraints. I think this is always the thing that plagues software, it's that in the movie Inception we can do these amazing things but we don't have enough physical constraints. I was thinking how can we know exactly we're going to support max 128 database clients and give them so much memory for their TCP receipt buffer, send buffer and everything?

We're going to make it so simple and have limits on everything, because this was my reaction against Node. I ran so far from Node that I went past manual memory management all the way to static allocation and you can do that in C, but actually Zig was so much better because if you have a standard lib you can bring your allocator. Rust had a global allocator and you couldn't handle memory allocation failure, so for a database that was almost an instant showstopper at the time, in 2020.

Out of memory, you have to handle that as a database. You can't just global panic. So Rust was ruled out, then it was going to be C or Zig and finally here was a language we had with Zig. It was amazing. If you're a Node developer you can spend a day and then you're writing Zig and then you're compiling a binary so easily, there's none of that pain. You can cross compile something from Linux to Windows and ship people binaries that are a few kilobytes compared to a 10 meg Node binary.

Actually Zig makes systems programming accessible to all of us JavaScript developers. That was the other reason, I saw Zig was such a simple language, read like TypeScript. Rust takes a long time to master, Zig you can be very good in a month. Obviously there's a lot to learn, you have to be careful. In time you'll be able to do static memory allocations so we have less of the need for the borrow checker. We single threaded for performance reasons, again less borrow checker.

But this was the other thing, coming back to the payment switch, they were all in JavaScript and we realized, "Well, this reads like TypeScript so they're going to like this because they're going to understand how to do it." It made sense. It also made sense for hiring because it's so easy to pick up, two days. When people join TigerBeetle, I actually realized we never even helped them out onboarding into Zig.

Brian: Really?

Joran: By the time they start they really learn the language, so that's a big advantage. I think Zig is really going to accelerate quickly as a language because it's just so easy to pick up. We wrote some prototype for TigerBeetle in JavaScript, at some point we switched to Zig because it was quicker so you get this amazing developer velocity. Because it's kind of like surfing, I think.

You can find technology moves in waves, so you can find the wave where you see thousands of people writing it, but you don't get marketing benefit. There's no tailwind because it's a drop in the ocean. Or you can look ahead to the backline and you see the swell forming like NodeJS. So many people early there, Guillermo Ratch, they went on to do amazing things.

I learned that with Node and I always kicked myself that I never did that, so when Zig came around again I was like, "Well, I'm not going to miss it this time." That was the time, paddle out, bet on it in 2020 and we're in 2024 and it's made me so happier than I could've imagined. Zig is just... I don't know, really, really performing there and it's been a great choice.

Even now it's still early, so I know startup founders, they're starting to pick it. But really I would say if you could go and bet on Zig because it's a great language, depending on what you need to build of course, but they've made it quicker for TigerBeetle and it's been better for safety, better for performance. Zig is actually amazingly high quality compared to other runtimes. Zig is a very high standard. It's pre 1.0 because they want to do language changes but for us in terms of stability and quality, the compiler is really top notch, which is what we look for.

Brian: Yeah. I'm fascinated by this because I think folks that are first through the gate on a successful language that has all these benefits... The benefit is that you guys are open source so folks who watch this trajectory of how TigerBeetle is growing, I recently did a talk at the Open UK and you had commented on that in the email because I had mentioned that TigerBeetle, the engagement as far as contributions and stuff like that, they're lower than other projects but they're also earlier than other projects when it comes to the ecosystem, when it comes to Zig.

So I'll definitely be paying attention to this and sharing some insights and stuff like that. I've been tweeting an insight a day on my Twitter, and hopefully I'll use TigerBeetle as a case study in the future. But I did want to transition us to picks, so I appreciate you sharing about the founder journey, TigerBeetle and yourself, being early for quite a few different things, including Doom II and that gives us a good segue to transition us to picks. So these are things that we're jamming on, could be music, could be food, could be tech related.

If you don't mind, I'll go first. I've got actually two picks. First pick is actually the Blackberry Movie. Yeah, I've never owned a Blackberry, I was still in high school and college by the time it had its turn up but I definitely washed that. When I took my first role professionally in 2008 I think I joined the professional world, Blackberry was definitely 100% still a thing. We saw the iPhone come out around the year prior and it completely changed the way that scope looked like. But fascinating story of founders, starting a thing early, building on top of this internet because it's out there, so I don't know what it was called in the protocol but 2G.

Joran: It was like the Force that they were building on, this spectrum that they discovered and they call it the Force.

Brian: Yeah, amazing. So I don't know, did you ever own a Blackberry?

Joran: I didn't. But yeah, watching the movie and that moment where they see the iPhone and they're like, "Man..."I felt so bad for them, like, "Oh wow, this technology moves in waves."

Brian: Yeah. There definitely is, and you don't want to be on the other side of that curve so build your product in Zig is the TL;DR. I do have another pick which is a personal pick which is since November I've been basically limiting my sugar intake to 25 grams per day and then I do exercise every day. I no longer have a therapist, I've actually got to find a new therapist so my stress management is go to the gym before I do emails. That has actually turned into 20 pounds down, so I don't know what that is in kilos.

Someone do some math and tweet at me, whatever the conversion is, but I can't do that live. Just wanted to shout out, that that's actually been driving decisions and quality of life, but also running a business on top of that, being super focused on what sort of fuel I put in my body actually helps me perform better when it comes to work. So that's my other pick and that's what I'm jamming on. You got any picks for us?

Joran: Yeah. So thanks, that was cool to hear about the Blackberry Movie. I loved it. I think in there I love that scene how they always have movie nights, and it's the heart of their culture. I think someone starts to kill movie nights and things go wrong.

Brian: That's when you know.

Joran: Yeah. I think this is a thing with TigerBeetle, we're coming from the gaming genre, good luck, have fun. We say build trust, have fun because I think this is the thing. People think at some point you wear a suit and become serious to build trust, like you have to drop your Don't Be Evil motto. But actually people trust you when you have fun, when they see you're a human as well. You're just a real person and that is so important to building real relationships is keeping it real, have fun.

One of the things we love to do, our equivalent movie night is we have what we call Tiger Tracks. We do weekly releases of TigerBeetle, and every release there's a change log and we drop a little Tiger Track in. You read the change log, unlock a Tiger Track, but internally as a team we just listen to so much music. I would've either become a full time musician or coding, and I realized I could better than I think.

Brian: Yeah, keep the dream alive. There's always open mics, and build up the muscle memory again.

Joran: This is actually our T-shirt, it's the Tiger Band, the rock on sign. That's our music heritage so much at TigerBeetle.

Brian: That's amazing. I love that having just bits of culture. We actually did a pizza tour in New York because our product is OpenSauced.pizza, and also OpenSauced.com. But yeah, we've done pizza tours in a few different places. Not everybody eats pizza so we do expand, we'll be expanding differently in the next off site, but no one's lactose intolerant on the team.

Joran: I would so love to join one of those tours. I'm in New York, maybe we must catch up.

Brian: Yeah. We just did a pizza party with a few founders and devs in Portland, so I think we might keep that going along. When we have a team doing a conference or whatnot, we'll organize a pizza party in the future. But I'll let you know when we're in New York City.

Joran: RP's, favorite spot in New York for pizza?

Brian: I did really enjoy Joe's which kind of a staple, but also it's the Philly Cheese Steak. Philadelphia folks don't like those cheese steaks that everyone gets recommended, so Joe's is that one. I did enjoy Prince Pizza which is the Sicilian square pizza, amazing stuff. So Prince Pizza probably the best, which is not a very Italian New York style pizza, but I'm a millennial so I can say that one.

Joran: Awesome. I'm going to get OpenSauced at Prince Pizza, yeah.

Brian: Excellent. Well, thanks so much for the conversation.

Joran: Thanks so much.

Brian: Listeners, keep spreading the jam.