ADR-02: No databaseΒΆ
ContextΒΆ
Most web applications use a (relational) database (PostgreSQL, SQLite, β¦) to store metadata, user state, and application data. The question was whether TINO should follow that convention.
DecisionΒΆ
TINO stores all persistent state on the filesystem:
Bucket metadata (description, access rules) lives in a
.meta.ymlfile inside the bucket directory.Source files are plain files in the bucket.
Fonts and local packages are files in configurable directories.
User sessions are signed cookies β no server-side session store.
There is no database process, schema, migration, or connection pool.
Note
The absence of a database is a deliberate design choice, not an oversight. If TINOβs requirements ever outgrow the filesystem, introducing a database would be the natural next step β but that day has not come.
ConsequencesΒΆ
PositiveΒΆ
- Zero dependenciesDeploy with a single container and a volume β no database process, schema, or connection pool.
- Simple backupBackup and restore are a plain filesystem copy,
rsyncor similar. - InspectableAll state is readable and editable with standard tools (
cat,git,vim).
NegativeΒΆ
- No rich queryingListing buckets iterates the directory. Acceptable at the scale TINO targets (tens to low hundreds of buckets).
- Manual write serialisationPer-slug write serialisation must be handled in application code (threading locks on
BucketService) rather than by the database. - No cross-bucket transactionsAtomic operations spanning multiple buckets are not possible.