Articles
Notes on hosted SQLite: running it, testing it, and using it from agents.
-
The SQLite function that almost shipped
Before launch, our tests found a way for a customer's SQL to hand the server a memory address and call it code. Here is how it got past the first round of tests, and what we changed.
-
What happens to your writes when we pull the plug
Every change to Served has to survive the same routine: kill the server mid-write, start it again, and find every write it had confirmed. This is what that routine covers, and what it cannot.
-
Give your agent its own SQLite database
An agent that can make an HTTP request can have durable, queryable storage in three calls. A practical guide, with the instructions and tool definition to paste in.
-
SQLite over HTTP, without holding a connection
SQLite was built to be opened by one program. Here is how Served puts it behind an HTTP API without inventing a protocol: one connection per request, and transactions as arrays.
-
One database per customer
Giving every customer their own SQLite file removes a whole class of bugs. What the pattern buys you, what it costs, and how to run it.
-
Back up a hosted database with one line of cron
Your backup is a file you can open. A cron line that downloads it every night, checks it, and keeps a month of copies.
-
Served, Turso or Cloudflare D1?
Three ways to have SQLite hosted for you, and they are less alike than they look. Where each one fits, including the cases where Served is the wrong choice.