Fireship · @fireship
SQLite and its weird new fork “libSQL”
Uploaded November 13, 2024 · Length 4:30
Summary
SQLite's fork 'libSQL' allows one database per user, improving performance and security with features like replication, encryption, and web assembly triggers.
- sqlite fork
- libsql database
- one database per user
- replication system
- encryption at rest
- web assembly triggers
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
25 years ago in a Muffy corporate
- 0:02
partition somewhere Richard hip of
- 0:04
General Dynamics was banging out code
- 0:06
for a damage control system on guided
- 0:08
missile destroyers for the US Navy his
- 0:10
work led to one of the most brilliant
- 0:11
important and just Flatout weird
- 0:13
projects ever a SQL light an acid
- 0:16
compliant SQL database that's contained
- 0:18
in one file weighs only 600 kilobytes
- 0:20
and requires no server process what's
- 0:23
crazy though is that it's become the
- 0:24
most deployed database in history with
- 0:26
over 1 trillion in active use almost
- 0:28
every smartphone and computer contains
- 0:30
multiple sqlite databases what's even
- 0:32
more crazy though is that this project
- 0:34
is in the public domain and its source
- 0:36
code is only maintained by three people
- 0:38
no outside contributions allowed and
- 0:40
they don't even have a code of conduct
- 0:42
but that's a good thing if you want to
- 0:43
prevent nerd drama and unauthorized
- 0:45
backdoor penetration but that doesn't
- 0:47
mean you can't Fork it and make it code
- 0:49
do what you want to do and that's
- 0:51
exactly what the creators of lib SQL
- 0:52
have done to support the unhinged use
- 0:54
case of one database for every user in
- 0:56
your app it is November 13th 2024 and
- 0:59
you're watching the code report there's
- 1:01
a reason they call SQL light the most
- 1:03
deployed database in the world it can be
- 1:04
easily embedded it's robust and in
- 1:07
theory can scale up to 140 tabt however
- 1:10
most large scale applications go with
- 1:11
postgress or a nosql database to scale
- 1:14
up to a massive level there's no native
- 1:16
way to Shard and replicate SQL light to
- 1:18
distribute a massive data set around the
- 1:20
world well in October 2022 a couple of
- 1:22
developers launched a fork of SQL light
- 1:24
with no code changes just a Manifesto
- 1:27
and a dream of SQL light with Community
- 1:29
Control that fork is called lib SQL it
- 1:31
maintains SQL like compatibility but
- 1:34
also makes some major changes but the
- 1:35
thing that really inspired me to make
- 1:37
this video is its ability to build apps
- 1:39
where you have one database per user
- 1:41
let's figure out how that's even
- 1:42
possible like I mentioned SQL light
- 1:44
exists as a file and not something you
- 1:46
connect to externally with a server like
- 1:48
poster SQL but alongside this file mode
- 1:51
lib SQL also has a server mode where you
- 1:53
can talk to your database via HTTP and
- 1:55
that allows you to access equl light
- 1:57
from serverless environments like
- 1:58
cloudflare workers or AWS Lambda that's


