Case study · 2019
Relay
A small Node service that accepts an event once and fans it out by topic to Android, iOS, and web push over Firebase, with a log that says what was delivered.
- Runs on
- Service
- Built with
- Bootstrap 4 · Node.js · Express
The problem
Several apps needed to tell people when something happened: a gate cleared, a job was assigned, a booking was accepted. Left to each app, every one would integrate three push channels in its own way.
When a notification goes missing, someone has to answer a simple question: did it go out, and on which channel?
Constraints
- Three channels with different delivery: Android, iOS, and web push.
- Apps should publish what happened, not know how each channel works.
- Every send has to be traceable afterwards.
Accept once, fan out
Decisions
Accept once, then fan out
An app sends one event to one endpoint. The service accepts it, queues it, and only then routes it to each channel, so a slow channel never holds up the app that sent the event.
Topics decide the channels
Routing rules map a topic to the channels that should receive it. Changing who hears about an event is a rule change, not a code change in every app.
Trade-off. Topic names become a shared contract between apps, so they are named for what happened, not for the screen that sends them.
One delivery path
Android, iOS, and web push all go out over Firebase, so there is one integration to keep healthy instead of three.
A log for every send
Each event's delivery is recorded per channel as sent, queued, or failed, so a missing notification can be traced in a minute. Bootstrap's dashboard layout covered the admin console, so the effort went into the service.
Result
- One service for push across Android, iOS, and web.
- Apps publish an event once instead of integrating each channel.
Read deeper
- The frontend is a control plane
Operator interfaces work when navigation, state, and actions follow the system a person is responsible for. A dashboard that only reports on that system is a different product.
Older work, kept here for the record.
Next: Seed →