All Aboard to Turso Town

Issue #226.September 28, 2023.2 Minute read.
Bytes

Welcome to Turso Town, the happiest place database on Earth, where the sun is always shining and the air smells like warm root beer.

Today’s issue covers all the goodness from Turso’s ongoing Launch Week, plus a potential PsyOp from the Big Runtime Industry™️, and a more appropriate place to vent about the Popover API than your nephew’s baptism.

Welcome to #226.


Eyeballs logo

The Main Thing

the family from the movie HalloweenTown

Everybody gets free databases in Turso Town.

Turso wants to give you 500 databases (for free)

“Ok, that’s nice…” I can hear you say, “but why exactly would I want that? And also, what’s Turso?”

Both good questions. Turso is an edge-hosted, distributed database that’s based on their open-source fork of SQLite called libSQL. On Monday, they announced that their free tier now comes with up to 500 databases, and their $29/month tier comes with 10,000 databases.

That brings brings us back to our first question: Why tho??

Turns out, there are three main reasons:

1. You can spin up a completely new DB for every project you have — not a new schema, not a new instance, but a fully separate database that can have its own unique logic. It’s now easier (and cheaper) to get a new database for your project than to get a new domain.

2. It makes it way simpler to build a multi-tenant SaaS app. Instead of building complex permission logic on the backend to isolate each customer’s data to fit their unique requirements, you can just set up a completely separate, bespoke DB for every customer.

3. You can give users their own database if you’re running any kind of platform where users can deploy their own compute. That’s what Val Town did. They’re a hot new serverless functions platform that uses Turso to give every user (even those on the free tier) their own SQLite DB.

“Ok, but how the fr*ck can they do that for free, when it would cost me half a kidney to set up 500 DB’s with Firebase?”

Another good question by you. And it all comes down to the magic of SQLite/libSQL. Because each SQLite database is just a file, they’re cheaper and easier to spin up than NoSQL databases used by platforms like Firebase. It’s also a lot more portable, because you can easily download all your own data.

SQLite does introduce some tradeoffs, but by forking it to create libSQL, Turso was able to overcome most of its shortcomings while also making it edge-compatible. And with their new Embedded Replicas, you get all the local speed of SQLite, with the convenience of a remote DB you can deploy anywhere.

Bottom Line: Drizzle probably said it best when they tweeted that Turso now makes it possible to build, “500 startups with 0 users and still pay $0 for serverless databases. What time to be alive.”

Don’t tempt me with a good time, Drizzle.

        

Nylas logo

Our Friends
(With Benefits)

A guy smoking a cigarette looking tired

MFW when I've spent the last month trying to build email integrations.

Email, Calendar, and Contacts ➡ in your app. Build for free with Nylas.️

Over 250,000 developers use simple APIs from Nylas to seamlessly integrate emails, calendars, and contacts in their apps.

Why? Because communications features can instantly make your app more powerful, but building them from scratch is painful af. Thankfully, Nylas lets you:

  • Build in-app calendar views & scheduling tools
  • Enable instant, in-app event booking
  • Power automated one-to-one email outreach that lands in inboxes, not spam

Want to flex your skills? Compete for a chance at $10,000 worth of prizes in the Nylas Hackathon by building cool communication tools with Nylas’ Node.js SDK + AI.

If you want some inspiration, check out the Nylas + AI virtual workshop to learn how to combine tools like ChatGPT and Huggingface with email capabilities, so you can build a winning app.


Pop Quiz logo

Pop Quiz

Sponsored by Secureframe

They’ll help get your app SOC 2 compliant in weeks instead of months, so you can start selling to big enterprises. Get a personalized demo today.

How can we improve this code?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Dynamic List</title>
  </head>
  <body>
    <ul id="myList"></ul>

    <script>
      let items = [...Array(1000).keys()].map((i) => `Item ${i}`);

      let ul = document.getElementById("myList");

      for (let item of items) {
        let li = document.createElement("li");
        li.textContent = item;
        ul.appendChild(li);
      }
    </script>
  </body>
</html>

Cool Bits logo

Cool Bits

  1. We mentioned it earlier, but Turso’s new Embedded Replicas are also a pretty big deal. They allows users using VMs or VPS to replicate a Turso database inside their application — so you can ditch your external cache faster than my prom date ditched me after I started doing my special interpretive dance to Party in the USA.

  2. Jared Wilcurt wrote an article called, Bun hype. How we learned nothing from Yarn, but this could just be another PsyOp from the Big Runtime Industry™️, so proceed with caution.

  3. Clerk gives you simple React components to onboard your users and let them manage their accounts. It seems like every React side project uses it these days, probably because of its surprisingly moochable generous free tier. [sponsored]

  4. Chintan Dhokai wrote this Comprehensive Guide to Vue 3 State Management with Vuex. But is it pronounced Vue-x, or Vueks?

  5. The WebSocket API is coming to Node.js. Get hyped, socket stans.

  6. This morning, Turso announced new integrations with Prisma, NexaFlow, Hasura, and Cloudflare. OK fine we made one of those up.

  7. The State of HTML survey is going on right now, so if you’ve got some burning hot takes about dialog boxes and the Popover API, this is the appropriate venue to share them. Unlike last time, when you started ranting about popovers during your nephew’s baptism.

  8. Zero created an easy way to integrate 3rd-party API credentials into your project. Their SDK is available for TypeScript, Rust, Python, and Go. [sponsored]

  9. PartyKit just raised $2.5m from Sequoia Capital to make it easier to build real-time multiplayer collaboration into your app (like Figma or Google Docs). Congrats to Sunil Pai (❤️) and the rest of the team 🎈.

  10. React Native Core Team member, Tzvetan Mikov gave a 25-minute talk at React Native EU about Static Hermes: the Next Generation of Hermes, which is React Native’s JavaScript engine. It’s also the Greek god of “trade, wealth, luck, fertility, animal husbandry, sleep, language, and thieves.” Sadly, Tzvetan didn’t spend much time explaining the extended metaphor there, but I’m very interested to learn how animal husbandry is involved.


Pop Quiz logo

Pop Quiz: Answer

Sponsored by Secureframe

In the initial example, we are appending each list item to the DOM as we create it. This is inefficient because the DOM is updated each time we append a new list item. Instead, we can create a document fragment and append all of the list items to the fragment. Then, we can append the fragment to the DOM. This way, the DOM is only updated once.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Dynamic List</title>
  </head>
  <body>
    <ul id="myList"></ul>

    <script>
      let items = [...Array(1000).keys()].map((i) => `Item ${i}`);

      let ul = document.getElementById("myList");
      let fragment = document.createDocumentFragment();

      for (let item of items) {
        let li = document.createElement("li");
        li.textContent = item;
        fragment.appendChild(li);
      }

      ul.appendChild(fragment);
    </script>
  </body>
</html>

one question interview logo

One Question Interview

As a front-end developer, why should I care about databases?

I believe at some point in the future, one way or another, you’ll have to. I started Turso to make sure you will have at least one easy, fast and cost effective database offering when that inflection point comes. It used to be the case that databases were a very niche thing: notoriously hard to operate and configure, (there used to be an entire job role called DBA!), fickle and easy to break. So much so, that a large part of the role of a backend developer, was making sure that stuff wouldn’t just break the database.

This is changing rapidly: platforms like Vercel and Cloudflare make it super simple to handle your backend, so the database is the next frontier… If SQL itself is the problem… ChatGPT is to the rescue (it generates surprisingly good SQL code!!).

With Turso we want to make the database more and more accessible to everybody. We built our product around SQLite, which is really just a library. And with embedded replicas you can have your own copy of the database and brutalize it in any way you want.

We will keep building with developers in mind, and will keep doing our best to make the database just a function that you call in your code, like any other. And when you master that, you will be able to go much deeper down the stack.

– Glauber, Turso CEO