S10 Bonus: What's New with Turso, with Pekka Enberg [0:00:01] Noah Labhart: Hello, listeners. Today, I have an incredible follow-up episode from our friends at Turso. You may remember our episode with Glauber Costa in season eight, where he told us the creation story of the platform. Today, I'm speaking with his co-founder, Pekka, to hear the update on Turso and what the team has been building over the past year. Have a listen. Well, today I have another special guest on the Code Story podcast, Pekka Enberg of Turso. Pekka, thank you for being on the show today. [0:00:35] Pekka Enberg: Thank you. Thank you for having me. [0:00:36] Noah Labhart: Absolutely. You know, recently we had your partner Glauber on the podcast to tell us about the creation, the inception story of Turso. But we're going to dive into a bit of an update of the things you've been working on. But before we do, tell me a little bit about you. Tell me a little bit about you and your journey in technology. [0:00:57] Pekka Enberg: My story is tied with Glauber's as well. We both worked on Linux Kernel. It feels like it was also like yesterday, but more than a decade ago, we were working with the Linux Kernel. That's when we met. We joined a company to do an operating systems product, which then pivoted to something completely different, a database product. So me and Glauber worked at ScyllaDB. I think you've had their founder here as a guest as well. I did do real backend programming also before switching to working on databases themselves. So Java was a hot call technology at the time. That's the general introduction I usually give. [0:01:35] Noah Labhart: Remind my audience what Turso is. So you gave the high level of your founder of Turso and bringing more lows to SQLite. But tell me, and the audience, a bit of a reminder of what Turso really is. The [0:01:48] Pekka Enberg: tagline is SQLite for production. And basically, what we're trying to do is bring the capabilities to SQLite. And for the audience that doesn't know what SQLite is, SQLite is an embedded database. It basically runs already everywhere on embedded systems. Like the claim is that it's the most deployed database on planet, which is probably true. But if you look at more modern workloads, people doing serverless, even on mobile to some extent, there are things that are just missing from SQLite. And actually, I don't know how much you went through this with Glauber on the inception story, but Turso actually was a company doing something completely different in the beginning, and we were heavy users of SQLite for a local development toolkit essentially, and we wanted to do something like that. The thing was was to build something like a managed service, essentially. And we were always thinking that we're going to get a proper SQL database to do it in production. We quickly discovered that SQLite itself is pretty agile, works really well, but it was just missing some features like replication, which we needed at the time. So that's the thing that we do. We built those features to SQLite to make it really awesome for modern production workloads. [0:03:01] Noah Labhart: Tell me about some of the maybe the success stories of the customers. doing with, with Turso, and how have they found success with bringing that into production? [0:03:10] Pekka Enberg: So actually, really early on, one of the things which we focused on is this ability to bring the database close to, essentially, close to the user. People doing web apps where latency is essential for great customer experience, that is something that really resonates with people. And if you combine it with something like Cloudflare Workers, for example, you can actually cut down a lot of overall latency, just have a better response time, essentially. But we also, something that we did, which is maybe slightly counterintuitive, SQLite is an in-process database. So it's a library that you put into your application and now the database is in the same sort of, it's in your application. But we also added a mode where you can access SQLite remotely. So turning it into something similar to Postgres. lightweight that you can get lots and lots of databases. So one interesting thing that people are using Turso for is essentially having a database per tenant. So database per user, for example, architecture, which is great for SaaS applications and things like that. [0:04:21] Noah Labhart: Okay. So tell me the update. We talked about a few things before recording the episode, but I'm curious about what has gone on with Turso. What have you built? What have you shipped to the world? And what has been the big changes with the product? [0:04:34] Pekka Enberg: Two things to update on. And maybe the first one is actually, let's say, more boring incremental part. Because actually, when we first started to work on Turso, as I mentioned, like this edge part was a key thing for us. So even if it's infrastructure, you can't really be that agile in infrastructure space. But you can still find ways to do proof of concepts and really aggressively validate and work with. around the time Glauber was on this podcast, we had just announced something called Embedded Replicas and we were actually working on the multi-tenancy thing that I mentioned. And those were actually just things that we were already had on the roadmap, you know, since after first six months. And it's just basically, once you start to work on, it's a different way of using the database. You can have the database inside your application, but you can still have replication. So you can have durability on basically offloading to the cloud, but also this multi-tenancy thing and all the sort of schema migration and all that stuff. And it is still ongoing work. So there's lots and lots of work to do to get that into sort of production shape. And so that's the sort of more boring incremental part. But the really interesting thing that we recently did, recently released, and it's actually not GA yet, is basically bringing a capability, a new capability to SQLite. So vector search, probably people are already getting a little bit bored with all the LLM and AI stuff. But basically, that's super interesting thing that happened over the past 18 months, like you have a completely new type of workload, new types of applications, which need this capability. And that's something that I personally find super exciting, because this was the sort of first time we really had to dig deep and change core part of SQLite. [0:06:18] Noah Labhart: Very cool. Okay, so I want to dig into the boring part before I get into the not boring part with the vector search. So from an engineering standpoint, I couldn't imagine multi-tenancy and all the things you're working on or worked on there was boring. But tell me why that's important. Why is it important for multi-tenancy for your customers? [0:06:37] Pekka Enberg: There are many benefits to, as I mentioned, the database per tenant model. model. So if you zoom out a little bit, what typically people have to do when they're building like whatever application, you take a big database and you start with that. All your user data is in the same database, all that, whatever, on a product catalogs, if you're doing an online store or things like that, they're all shared in with this one database. And then problems pop up as you start to scale, you need to start thinking about sharding and all of those things. But maybe more hard to keep the data isolated. So that's one of the things why multi-tenancy story essentially resonates so well, because now you can have these databases which are isolated from each other. So just imagine managing your user data or even some more confidential data. And it really extends all the way from backend to the mobile as well, right? So you can imagine having your application data essentially sharded per user and having that replicated in the mobile device, for example. So that's, it is, it's partly about scaling, but it's also about privacy and data isolation. [0:07:47] Noah Labhart: Certainly. Okay, that makes sense. That gives me a good idea there of what people would use that for. Okay, so tell me about vector search. So people are, you know, are getting, you know, bored, sure, with the LLM stuff, because it's all in the buzz and things, but it's super useful. And it's really valuable. Give me some use cases of the vector search. What drove you to that? [0:08:09] Pekka Enberg: of ChatGPT 3.5, I think that was the sort of, at least for me, the sort of turning point. Then all of a sudden we were in this situation that everybody wanted to apply these large language models to their applications. And basically the models themselves are super useful, but there's this problem called hallucination because they just make up stuff. So these large language models essentially are limited to whatever they saw during training. And these things get trained by reading essentially through the whole internet. data, right? So you train it and then after that, it doesn't really know about new things that appear. But also for enterprises, these models don't really know your company specific information. And that's why people came up with this retrieval augmented generation, which is essentially just retrieving data for the model. And this is where the vector search part comes in. Imagine an interface where you have a customer typing a question. So the way it essentially works is that you take that question, you run it through a large language model, generate an embedding, which is a vector. And then you use this vector or this embedding to find relevant information. And that relevant information is through vector search, which is managed in some database. For me, the really interesting thing is that initially what happened was that there was this like explosion of different special purpose databases, vector databases. At some point, They were embedding databases, but then I think everybody's converged on vector databases. And these are special purpose things to do just retrieval part. But quickly people also discovered that, hey, we still have this traditional data that we want to access, but also lots of different databases and data sources. So like, how can we simplify this thing? And then you had a lot of Postgres was adding this extension and so forth. But with SQLite, what is really interesting is because it is such a lightweight thing and you can run it in mobile devices, for example, when you actually bring this vector capability to SQLite, you can do all of this model-related processing and all of that searching within the device itself. And you can imagine you have the latency advantage, but also increasingly people are super interested in the sort of privacy aspect, right? Because now you can have the private information on the device. It doesn't necessarily have to leave the device. So I think that's the cool part in using the old traditional SQL database and then vector search. [0:10:34] Noah Labhart: Yeah, wow. So that's really interesting. You can pull data essentially from within the client itself. Maybe it would be a mobile device, and we're talking about mobile devices. Eventually, maybe it could be browsers or something like that, but a client. You don't have to go to a server itself to do the heavy computing. How did you figure that out? Because that's not a small thing. Usually you're reliant on the power of the device, right? So if you're using a weak device, it's not going to work very well. Tell me about that. [0:11:02] Pekka Enberg: So zooming out a little bit and going back to the large language model. So like for us, we actually initially didn't do anything. When we got to the first vector databases out, we decided, okay, we don't really understand this space. We're just going to wait out and see what happens in the market. But then six months later, you could see a Postgres community, for example, really stepping up and doing this. And then we started thinking this kind of becomes like an existential thing. It's one workload, but it still becomes like a super important workload. So what can we do? And then we basically just started exploring how we could implement it. And actually, it wasn't probably us first pointing out the mobile aspect. It was just that we're going to do this feature. And then through our design partners, people were like, hey, this is perfect. Like I can use this for my LLM powered application and all of that stuff. But it also, you could see the trend of large language models, basically splitting into two different directions. You have the really large model. So Llama 3.0 something just got released. And it's like, it's one of the biggest open source models out there. But you also have the smaller one, which actually fit on device. I know we could see Apple, for example, doing some research in that area. I don't know if they roll it out. But basically, you could see that if you have a powerful retrieval augmented generation, so you have this ability to search for data, then you can probably get pretty far with the simpler model. So for us, it started to make sense that, okay, this is something that probably is useful in the mobile space. [0:12:33] Noah Labhart: No doubt. It's a really smart way to solve that problem, right, of the local replica, the being able to vector search on the device while still, you know, or eventually syncing, right, to your edge network, to your remote databases. basis. So then, so you've got VectorSearch, right? You've already have an amazing SQLite product. Now you have VectorSearch, you're fueling this local replica process. Where do you take this next? This is already an incredibly powerful platform, but where do you take this next? Where do you see this going? There's [0:13:09] Pekka Enberg: basically two main things. Mobile space in terms of, you know, you basically have two platforms, right? So you have iOS and Android, but then you also have things like React Native and all that stuff. So it's fragmented. So one of the main things we're focusing on is basically making sure that our SDKs for those platforms are top-notch and things that you can really just get the developer experience. Because like for us, it's always this combination of trying to get the best possible developer experience, but combine that with robust infrastructure. So that's one thing, which is actually surprisingly big investment. You really have to go and do the work for every every fragment of the ecosystem separately. So that's one. The other part is basically, as you also hinted towards, even if you do this stuff on mobile or in the browser, you want to offload to the cloud. And a big part of what we build is the stuff that basically runs on the cloud and getting all of that right and doing the scaling there. Disaggregated storage is something that is super interesting. And basically we're keeping SQLite in the client, like server-side SQLite in a sense, which is also a big part of what we do. [0:14:24] Noah Labhart: Awesome. No, I appreciate that. I want to dive into the SDK portion because you're right, it's super fragmented. There's all kinds of things that you would need to support. How do you choose what is the, you know, most important SDK to go make sure is perfect? And how do you go about deciding if you're going to add new ones? [0:14:43] Pekka Enberg: That's a great question. we struggled with that as well a little bit. So as I mentioned, two main platforms, and then you have React Native, you have Flutter, and other things as well. But I think those are the four main ones to consider. For us, actually starting with React Native just turned out to be pretty natural because our JavaScript SDK for the server side thing is something that is by far the most popular one. And unsurprisingly, JavaScript is such a huge ecosystem. That is the main one we want to tackle first, because there's this upside, of course, that you get this portability between the platforms. But I think down the road, the reality of things is that you anyway, like it really depends on the types of applications. But if you look at the big ones, they will go native. Then it just becomes React Native. We can do start with that. But then you probably have to just do Android and iOS both. Like you can't really make a decision with going just with one of them. Then like the rest of it, Flutter and frameworks like that. I think for us, it's just going to be demand based. We're going to see if we have enough people basically wanting to do something beyond those three. [0:15:57] Noah Labhart: Makes sense. Totally makes sense. And it is a struggle. There's so much out there. Okay. So I'm a developer. I'm building this really cool product and I want to be able to use SQLite. where I can remotely update my databases, but on the device itself, I want to be able to do the vector search. I want to be able to have the embedded replica. I want to essentially be able to process data in a fast way on my local device. How do I get started using Turso? What do I need to do? [0:16:30] Pekka Enberg: So right now, unfortunately, it's not production grade yet. So you just come to our Discord and ask for the beta for React Native client essentially. That's basically the starting point. The way we're integrating is just trying to find existing open source ecosystem libraries, for example, and integrating that. So the one we use today is a library called op-sqlite, and basically it will have Turso support out of the box. And basically then Then you sign up to our service and get your databases on the cloud and off you go. Because once you have a managed database on the cloud, then it's just a configuration thing on the client to connect to your remotely managed database and it will do all the sync and all those things. [0:17:17] Noah Labhart: Fantastic. Well, Pekka, I really appreciate you being on the show today and giving the update on Turso. You've done some really amazing things with the things that you're calling quote unquote boring with multi-tenancy and embedded replicas. search capabilities that are on device and being able to power that fast data retrieval and remote syncing with your edge network is really, really fantastic and fascinating. Really appreciate you being on the show, giving the update. Cool. [0:17:43] Pekka Enberg: Thank you for having me. Incredible. [0:17:45] Noah Labhart: Now with Turso, you can not only have embedded replicas on your device with multi-tenancy and syncing to Turso's edge network but now the tool powers vector search from the device itself leading to natively serverless production loads. Turso continues to push the envelope forward with their product and expanding use cases for developers. If you'd like to learn more about Turso, go to turso.tech. If you'd like to learn more specifically about Vector Search, go to turso.tech slash vector or sign up for their Discord. And thanks again for listening.