Swappable backends — external OpenFGA/NATS/DB drivers (the microlith → connected-services move) #10
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ginjiruu/toolbelt#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make the platform's embedded backends swappable for external services — the move from "microlith" to "connected services." Today every app embeds OpenFGA, NATS, and SQLite because those are the only options; the ability to run against an external OpenFGA, NATS, and a real database driver is what unlocks the next architecture level.
Scope
For each embedded backend, decide the seam and provide the external option:
embeddedfga.Clientinstead of the embeddedOpenFGAServer. Note: the Client and Server are not interchangeable today (different method signatures, different arg order, different tuple types — SDKclient.ClientTupleKeyvsembeddedfga.Tuple), so this needs a shared backend interface first.embeddednatsvs an external JetStream cluster.toolbelt/dbis SQLite-only today. sqlc already supports Postgres, MySQL, and SQLite (https://docs.sqlc.dev/en/latest/reference/language-support.html), so other drivers would "only require a lot of plumbing" — but the plumbing is real: migrations, driver wiring, dialect-specific SQL, and thetoolbelt/dbabstraction.Not in scope here: the design details of each seam. This issue tracks the effort; it spawns its own tickets.
Decisions this effort must make
authz.Backendread interface + the existingembeddedfga.Serverwrite seam).fga.mode,nats.uri, db driver fields).toolbelt/dbbecomes driver-agnostic or gains a Postgres/MySQL variant.Why it's separate
Ruled out of the glue-absorption map ("Toolbelt glue absorption — map: what the toolbelt absorbs from duplicated consumer glue") — this is a platform architecture effort, not absorption of duplicated consumer glue. Tracked here so the absorption map can reference it and a fresh effort can chart it later.