We are building in the open #2
The first decision: one school, one cell
Hello again.
Last week I shared where Dante Academy came from. This week: the first architectural decision we made and the one everything else rests on.
Where it breaks. Most software serves all its customers from one shared database. Every school's records sit side by side, separated by a label saying which school they belong to. It works until one line of code forgets to check the label. Then one school can see another's data. In a shared design, keeping schools apart depends on every query, in every feature, being right every time. For children's data, I wasn't willing to rest on that.
How we scoped it. We started from a constraint, not a feature. The school is the data controller: it decides what happens to its students' data. So everything that belongs to a school (its records, its policies, its safeguarding flags, its audit trail, its backups) should sit inside one boundary that belongs to that school alone.
The options.
- One shared database, with a school label on every row. Simple and cheap and one missed filter away from a leak.
- A shared database that enforces the separation itself. Better, but every school still shares one engine and one set of backups and deleting or restoring a single school is hard.
- A separate schema per school on the same server. Cleaner, but still the same server, backups and connections.
- A separate database per school. What we chose.
- A fully separate deployment run by each school. On hold until after launch.
What we chose. Every school gets its own cell: its own database, sign-in accounts, file storage and audit records, its tutoring sessions and its safeguarding flags. A cell belongs to exactly one school and our central database refuses to bind it to a second. Inside each cell we kept the database-level separation too, as a second layer. Our central system knows which schools exist and which cell each one uses. It holds no student or teacher content.
You'll notice I say "designed to keep each school's data separate", not "guarantees security". That's deliberate. No architecture guarantees security. And to be precise: we run each cell on the school's behalf, so we are its data processor. We will never tell a school "we cannot access your data".
What we gave up. Every database change will run once per school, not once. Each school carries a fixed running cost, however small it is. Monitoring and backups multiply. Our own reporting across schools is limited to counts and service health, never school content, by design. And a multi-academy trust that wants one view across its schools is harder to serve. We accepted all of that. In return, one school's data can be deleted, restored or exported without touching any other and a mistake in a query can't reveal another school's records, because they aren't in that database.
What I got wrong. We made this decision early and clearly, but we didn't write down the options we compared at the time. Rebuilding that comparison for this issue took longer than it should have. That's exactly why next week is about writing your reasoning down.
We are in the business of student flourishing.
Massimo