← Selected work

Large learning platform

Event-driven architecture at near-100% uptime

Work that used to wait for a person now runs on events — at under 10 cents per student per year, and without spending uptime to get there.

Contribution
Architected and implemented the event-based system, over three and a half years on the platform across several international teams.
Stack
Python · AWS Lambda · SNS · SQS FIFO · Terraform · RDS · Redis
Service
MVP-to-Scale Transformation
Architecture diagram: internal services publish to an SNS topic; Lambda functions enrich each event, decide what must change, and apply the resulting tasks through an ordered SQS FIFO queue against the third-party virtual classroom, with RDS and ElastiCache behind them.

The problem

A large learning platform, and beside it a third-party virtual classroom where the teaching actually happens. Both hold the same world — districts, schools, courses, students, tutors, school years — and the two copies have to agree. Keeping them in agreement was the job.

For a long time, people did that job. The software did the work and staff did the joins between the work: steps that should have followed one another automatically instead waited on somebody noticing, checking and clicking. That costs twice — staff time on one side, running cost on the other, because systems idling in wait still bill by the hour.

Two constraints made it harder than it sounds. The data is structured, so the order of operations is part of being correct: a district has to exist before a school inside it, a school and a course before anyone can be enrolled on it. And people depend on a learning platform during their working day, so there was no window in which availability could be spent to buy the rearchitecture. It had to change underneath a running service.

The approach

Three systems in sequence, and the first two are part of the argument rather than an embarrassment before it.

One function doing everything. The original path was a single Lambda sitting between the internal services and the classroom tool, handling every kind of work synchronously and remembering nothing between runs.

A database and a build pipeline. The team was new, and wanted improvements rather than an overhaul. A relational database gave the sync a memory; the processing moved onto build pipelines, which offer far more compute than a function, reach business value faster than standing up servers, and beat servers on cost-to-value. Cheap, quick, and honest about its limits: it struggled with dynamic input, needed a full data sync before it could do anything, and broke whenever its database drifted out of step with the downstream tool. Those limits are what specified the third system.

Events. Internal services publish to a shared topic. One set of functions reacts to those events and enriches them — attaching the context a decision will need. A second set holds all the decision logic: given an enriched event, work out what must change downstream, and emit the answer as tasks. A third set executes them, where one task is exactly one operation on one resource. Small, specialised pieces, deployed independently, each doing one job: compute that only exists while it runs, a relational store for what must persist, a cache for what must be fast, and Terraform describing all of it so the new path was reviewable before it carried anything real.

Ordering is bought where it is actually needed. Tasks go onto a FIFO queue with message grouping, which guarantees strict order within a group while separate groups still run in parallel — correctness per entity, not a global queue that serialises the whole system to protect a few relationships.

Some data has no events to react to. Attendance, for instance, exists only inside the classroom tool, which offers no hooks — so that path polls. Notably, it polls using the same parts in the same shape, with a clock where the event source would otherwise be, rather than becoming a second mechanism to understand and maintain.

Working subsystem by subsystem, each cut over on its own, is what made the whole thing survivable. There was never a migration weekend, because there was never a moment when the whole platform moved at once.

The result

Manual user actions fell significantly, operational costs came down, and availability stayed at near-100% across the change.

The cost line is worth being specific about, because serverless is usually sold on a promise and rarely on a receipt: the running cost of the finished system came to under 10 cents per student per year. Messaging and compute were close to free at this shape; effectively all of the bill was the database and the cache.

The durable part is not the cost. It is that growth stopped translating into more people watching the system. Before, volume arrived as work for somebody; after, volume arrives as events, and the number of humans in the path does not have to move when the number of users does. That is usually the difference between a platform that scales and one that only scales its payroll.

Have a system shaped like this one?

Thirty minutes, no pitch deck. You describe the problem; I tell you honestly whether I’m the right person to solve it.

Book a 30-min discovery call
Book a call