Distributed systems · case study

Designing the whole life of a notification.

I led the platform implementation, built the Go backend and worked with a frontend engineer on the template-management experience.

My role
Implementation lead · hands-on Go backend
Context
Shared platform engineering
Delivery stage
Backend implementation and platform integration
The engineering question

An accepted request, a processed queue message and a notification received by a user are different events. The platform needs to make those distinctions visible.

Go / GinRabbitMQRedisPostgreSQLReact / MJML
SYSTEM OVERVIEWNotification Platform
COMPONENT NOTES

Accept

Application-facing APIs handle notification requests with product and organisation context. Shared contracts let different applications integrate through a consistent service boundary.

Explore the componentsSimplified architecture

The main delivery path sits alongside bounded retries, audit records and template management.

From a send API to a shared service

Applications need notifications for many different user journeys. If each product manages its own provider integration, templates and failure handling, engineering work is repeated and operational behaviour becomes inconsistent.

The platform brings those capabilities behind a shared service. It supports channel-specific APIs, application and organisation onboarding, template workflows and message tracking. I led the implementation and personally developed the Go backend.

A frontend engineer handled the template-management interface and adaptation of an existing open-source React/MJML email editor. I retained responsibility for backend architecture, API contracts and integration direction.

The delivery path

The backend uses Go with Gin and a layered architecture. Application-facing handlers lead into use cases and service behaviour, with infrastructure concerns kept behind interfaces. PostgreSQL provides message and audit persistence; RabbitMQ carries asynchronous delivery work.

Consumers run for the supported channels and their retry paths. Processing has a time budget, and success, timeout or failure determine the next action. The implementation uses explicit acknowledgements instead of treating queue consumption as equivalent to successful processing.

This separation lets the API and delivery work evolve independently. It also means the system has multiple states worth explaining: a request can be accepted while downstream delivery is still pending.

What happens when processing fails

The consumer implementation includes bounded retries, per-channel retry settings, exponential delay and jitter. The delay calculation also considers the size of the retry queue. After the retry limit, the message can move to a dead-letter path for further analysis.

Audit events record consumption, completion, retries and rejection, while message records track status and retry information. Redis-backed duplicate suppression is another part of the service’s delivery controls.

The engineering distinction matters: retry logic and duplicate suppression address different problems. A retry gives transient failure another opportunity to succeed; a duplicate-control mechanism reduces repeated handling. Neither should be presented as a blanket promise of exactly-once delivery.

Templates are a product workflow

The template system gives applications a reusable way to manage notification content. The backend owns storage, versions and dynamic content resolution; the editor provides a usable way to compose and manage email layouts.

I worked across that boundary with the frontend engineer, defining the API contracts needed to connect the editor to the service. Using an established open-source editor focused the work on integration and the platform experience instead of recreating an entire visual email-authoring product.

The original editor authors retain credit for that foundation. My ownership was the Go backend and the overall implementation and integration direction.

Implementation and engineering scope

The implementation includes the service, API documentation, schema migrations, container configuration, deployment definitions and test scaffolding. The substantive work is the combination: delivery paths, operational state, tenant context and content management behind a common service.

This case study describes that engineering implementation. It does not attach an unverified production uptime, message-volume or delivery-success claim to the project.

Decision notes

Open a note for the reasoning and the trade-off.

Separate acceptance from delivery

Use asynchronous work to keep provider response times out of the application request path. Queueing gives the system a place to absorb work and handle delivery independently.

The API needs to communicate an accepted request honestly. Downstream status and operational visibility remain essential.

Bound retries and keep a failure path

Use increasing retry delays with jitter, then a dead-letter path when the retry budget is exhausted. Persistent failure becomes an inspectable state.

Retrying forever can hide a broken request or provider integration. A finite policy creates a clear operational boundary.

Keep providers and authoring behind contracts

Separate channel adapters from the application API, and separate visual template authoring from backend content resolution.

The interfaces need careful ownership. The benefit is that changing a provider or editor need not reshape every consuming application.

CONTEXT

Public architecture summary. Private source and infrastructure configuration are not included.

Related experienceExplore my role at AI71Platform strategy, shared services and engineering leadership
Continue exploring

TradeLab

A research-first system for exploring autonomous software development, independent review and reproducible evidence in a demanding domain.

Read next case studyAll selected work