frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: SQLite for Rivet Actors – one database per agent, tenant, or document

https://github.com/rivet-dev/rivet
29•NathanFlurry•3h ago
Hey HN! We posted Rivet Actors here previously [1] as an open-source alternative to Cloudflare Durable Objects.

Today we've released SQLite storage for actors (Apache 2.0).

Every actor gets its own SQLite database. This means you can have millions of independent databases: one for each agent, tenant, user, or document.

Useful for:

- AI agents: per-agent DB for message history, state, embeddings

- Multi-tenant SaaS: real per-tenant isolation, no RLS hacks

- Collaborative documents: each document gets its own database with built-in multiplayer

- Per-user databases: isolated, scales horizontally, runs at the edge

The idea of splitting data per entity isn't new: Cassandra and DynamoDB use partition keys to scale horizontally, but you're stuck with rigid schemas ("single-table design" [3]), limited queries, and painful migrations. SQLite per entity gives you the same scalability without those tradeoffs [2].

How this compares:

- Cloudflare Durable Objects & Agents: most similar to Rivet Actors with colocated SQLite and compute, but closed-source and vendor-locked

- Turso Cloud: Great platform, but closed-source + diff use case. Clients query over the network, so reads are slow or stale. Rivet's single-writer actor model keeps reads local and fresh.

- D1, Turso (the DB), Litestream, rqlite, LiteFS: great tools for running a single SQLite database with replication. Rivet is for running lots of isolated databases.

Under the hood, SQLite runs in-process with each actor. A custom VFS persists writes to HA storage (FoundationDB or Postgres).

Rivet Actors also provide realtime (WebSockets), React integration (useActor), horizontal scalability, and actors that sleep when idle.

GitHub: https://github.com/rivet-dev/rivet

Docs: https://www.rivet.dev/docs/actors/sqlite/

[1] https://news.ycombinator.com/item?id=42472519

[2] https://rivet.dev/blog/2025-02-16-sqlite-on-the-server-is-mi...

[3] https://www.alexdebrie.com/posts/dynamodb-single-table/

Comments

swaminarayan•1h ago
“sqlite per actor” feels like very clean actor level isolation. the part I am more curious about is how you recommend handling cross actor queries.
NathanFlurry•1h ago
We built everything with this architecture internally already at Rivet. It's less common than you might expect to have to query cross-DB in practice.

However, we are planning on building a query engine that can operate over multiple databases. One option we're considering is exposing Rivet SQLite as a DuckDB datasource: https://duckdb.org/docs/stable/data/data_sources

nudpiedo•1h ago
I get where you come from, but really needs it to be a whole SQLite instance per database? Wouldn’t be more efficient just logic separation in a larger DB?

Better usage of resources and it always allows a parent style agent do complex queries (e.g: intersection of two different actors data doesn’t need to fetch all, copy and do it in buggy non sql code)

NathanFlurry•58m ago
Hey! This is a common question.

In our experience, most apps don't need cross-tenant queries outside of BI. For example, think about the apps you use on a daily basis: Linear, Slack, ChatGPT all fit well with an actor-per-workspace or actor-per-thread model.

To be clear, we're not trying to replace Postgres. We're focused on modern workloads like AI, realtime, and SaaS apps where per-tenant & per-agent databases are a natural fit.

Using SQLite for your per-tenant or per-agent databases has a lot of benefits:

- Compute + state: running the SQLite database embedded in the actor has performance benefits

- Security: solutions like RLS are a security nightmare, much easier to have peace of mind with full DB isolation per tenant

- Per-tenant isolation: important for SaaS platforms, better for security & performance

- Noisy neighbors: limits the blast radius of a noisy neighbor or bad query to a single tenant's database

- Enables different schemas for every tenant

- AI-generated backends: modern use cases often require AI-generated apps to have their own custom databases; this model makes that easy

A few other points of reference in the space:

- Cloudflare Durable Objects & Agents are built on this model, and much of Cloudflare's internal architecture is built on DO

- https://neon.com/use-cases/database-per-tenant

- https://turso.tech/multi-tenancy

- https://www.thenile.dev/

- Val.town & Replit

> Better usage of resources

I'd be curious to hear more about what you mean by this.

> always allows a parent style agent do complex queries

Do you have a specific use case in mind where agents need to query other agents' data?

fastball•1h ago
We recently replaced an isolated feature built on Durable Objects with Rivet Actors, to allow for much better interop with the rest of our infra (which is built on AWS/Vercel), and are happy with it so far.

There have been some small issues but nothing show-stopping, and the Rivet team has been very responsive to help get things sorted (or help us understand when it was us doing something wrong).

Not using the SQLite datastore yet, but I am excited about the possibilities!

NathanFlurry•56m ago
Cheers!
ZeroAurora•54m ago
I love the idea of DOs and I'm happy to see an OSS implementation.

Would it be interesting to write about comparisons against Cloudflare Durable Object to the project README? Both for clarity and marketing reasons.

NathanFlurry•26m ago
Thanks! Any questions in particular on the comparison?
siliconc0w•48m ago
Really interesting to see these new compute paradigms. I haven't built anything on Durable Objects yet but I can see the appeal and I'd prefer an OSS option.

SqliteDB per tenant may make sense, not sure about per actor. You really don't want to re-implement database transactions.

NathanFlurry•16m ago
Cheers!
malkosta•26m ago
It’s crazy how pretty much every tool people post to support AI systems is already in Erlang/OTP or in elixir standard libraries.
NathanFlurry•16m ago
Yep, everyone seems to reinventing the actor model from first principles right now.

We're taking a different approach of building the best actor primitive for mainstream languages and letting people build a thin AI layer on top. We did not set out out build for AI when we started it, it was a happy accident.

Cognitive Debt: When Velocity Exceeds Comprehension

https://www.rockoder.com/beyondthecode/cognitive-debt-when-velocity-exceeds-comprehension/
366•pagade•3h ago•147 comments

Obsidian Sync now has a headless client

https://help.obsidian.md/sync/headless
172•adilmoujahid•2h ago•71 comments

Verified Spec-Driven Development (VSDD)

https://gist.github.com/dollspace-gay/d8d3bc3ecf4188df049d7a4726bb2a00
60•todsacerdoti•2h ago•26 comments

Addressing Antigravity Bans and Reinstating Access

https://github.com/google-gemini/gemini-cli/discussions/20632
139•RyanShook•5h ago•115 comments

Woxi: Wolfram Mathematica Reimplementation in Rust

https://github.com/ad-si/Woxi
166•adamnemecek•3d ago•68 comments

The happiest I've ever been

https://ben-mini.com/2026/the-happiest-ive-ever-been
33•bewal416•2d ago•7 comments

New evidence that Cantor plagiarized Dedekind?

https://www.quantamagazine.org/the-man-who-stole-infinity-20260225/
50•rbanffy•3d ago•37 comments

Show HN: Now I Get It – Translate scientific papers into interactive webpages

https://nowigetit.us
112•jbdamask•6h ago•74 comments

Ghosts'n Goblins – “Worse danger is ahead”

https://superchartisland.com/ghostsn-goblins/
30•elvis70•3d ago•11 comments

Werner Herzog Between Fact and Fiction

https://www.thenation.com/article/culture/werner-herzog-future-truth/
17•Hooke•1d ago•3 comments

The whole thing was a scam

https://garymarcus.substack.com/p/the-whole-thing-was-scam
156•guilamu•2h ago•40 comments

747s and Coding Agents

https://carlkolon.com/2026/02/27/engineering-747-coding-agents/
69•cckolon•1d ago•23 comments

How Long Is the Coast of Britain? (1967)

https://www.jstor.org/stable/1721427
14•Hooke•3d ago•1 comments

Techno‑Feudal Elite Are Attempting to Build a Twenty‑First‑Century Fascist State

https://collapseofindustrialcivilization.com/2026/02/16/americas-oligarchic-techno-feudal-elite-a...
60•measurablefunc•32m ago•2 comments

We Will Not Be Divided

https://notdivided.org
2389•BloondAndDoom•18h ago•757 comments

Unsloth Dynamic 2.0 GGUFs

https://unsloth.ai/docs/basics/unsloth-dynamic-2.0-ggufs
158•tosh•10h ago•48 comments

From Noise to Image – interactive guide to diffusion

https://lighthousesoftware.co.uk/projects/from-noise-to-image/
46•simedw•2d ago•10 comments

The Eternal Promise: A History of Attempts to Eliminate Programmers

https://www.ivanturkovic.com/2026/01/22/history-software-simplification-cobol-ai-hype/
176•dinvlad•3d ago•120 comments

OpenAI fires an employee for prediction market insider trading

https://www.wired.com/story/openai-fires-employee-insider-trading-polymarket-kalshi/
189•bookofjoe•5h ago•116 comments

The Future of AI

https://lucijagregov.com/2026/02/26/the-future-of-ai/
70•BerislavLopac•8h ago•59 comments

The Life Cycle of Money

https://doap.metal.bohyen.space/blog/post/complete-life-cycle-of-money/
57•nanacnote•5h ago•9 comments

Stop Burning Your Context Window – How We Cut MCP Output by 98% in Claude Code

https://mksg.lu/blog/context-mode
104•mksglu•9h ago•21 comments

The United States and Israel have launched a major attack on Iran

https://www.cnn.com/2026/02/28/middleeast/israel-attack-iran-intl-hnk
801•lavp•12h ago•1905 comments

Show HN: Tomoshibi – A writing app where your words fade by firelight

https://tomoshibi.in-hakumei.com/
11•hakumei•2h ago•5 comments

OpenAI agrees with Dept. of War to deploy models in their classified network

https://twitter.com/sama/status/2027578652477821175
1240•eoskx•16h ago•587 comments

Don't use passkeys for encrypting user data

https://blog.timcappalli.me/p/passkeys-prf-warning/
208•zdw•16h ago•173 comments

Don't trust AI agents

https://nanoclaw.dev/blog/nanoclaw-security-model
260•gronky_•6h ago•148 comments

CSP for Pentesters: Understanding the Fundamentals

https://www.kayssel.com/newsletter/issue-20/
8•zdw•1h ago•2 comments

More Cows, More Wives

https://www.worksinprogress.news/p/more-cows-more-wives
68•oxw•3d ago•43 comments

Seeing Like a Sedan

https://asteriskmag.com/issues/13/seeing-like-a-sedan
12•surprisetalk•3d ago•3 comments