Naistro.
I built the systems that schedule music and control venue players.
After moving playlist and interruption logic from the frontend into backend services.
Scale served by the automated track-processing pipeline.
Fewer scheduling errors. Music resumed correctly.
Music, adverts, and prayer could compete for the same player. I moved scheduling into backend services, resolved overlapping events, and saved track positions so songs continued correctly after an interruption.
The song keeps
its place.
The advert scheduled during prayer is skipped.
How I built itRead the engineering details
Giving an interruption priority solves only half the problem. I also had to preserve how much of the track had played, resolve conflicts between interruptions, and align what came next. Time-zone handling kept those decisions tied to the venue’s day.
- TypeScript, AWS Lambda & Serverless
- Move scheduling decisions into backend services.
- Event ordering & interval handling
- Resolve overlaps and preserve the played portion of an interrupted track.
- SQL & time-zone handling
- Assemble the venue’s day from its schedule and local time.
−80% Scheduling errors. After moving playlist and interruption logic from the frontend into backend services.
Audio processing ran automatically in the background.
Uploaded tracks needed compatible formats and consistent loudness before players could use them. I built queued processing with SQS and FFmpeg, stored prepared audio in S3, and handled failures while preserving compatibility with existing players.
FFmpeg
THE PLAYER
How I built itRead the engineering details
Moving processing into a queue let the request finish sooner, but the file was not ready yet. I handled processing and failure states and temporary-file cleanup. Compatibility work also had to refresh cached files and metadata so older players received the updated audio.
- Amazon SQS & NestJS
- Hand processing work to a consumer outside the original request.
- FFmpeg & Docker
- Normalize and encode audio in an environment containing the required media tools.
- S3 & cache invalidation
- Store prepared files and make updated audio available to existing players.
3,000+ Venues supported. Scale served by the automated track-processing pipeline.
Operators could confirm what players actually did.
Operators couldn’t tell whether a player had carried out a command. I built remote controls with device acknowledgements, so sending a command and confirming the player’s response became separate, visible states.
One request.
Individual results.
How I built itRead the engineering details
One unavailable device should not erase successful sends to the others. I returned per-operation delivery results and worked on aging connection state so a disconnected player would not look active indefinitely. A sent command still needed to be distinguished from observed playback.
- WebSockets
- Carry interactive controls between a dashboard and connected devices.
- DynamoDB & device heartbeats
- Keep track of observed device activity.
- Authentication & access control
- Keep venue and device operations within the appropriate account scope.
20 sec Inactive-device detection. Time to detect inactive devices through real-time health monitoring.
Playback records survived lost connections.
Lost connections put playback records at risk. I stored records on the device until delivery succeeded, including across restarts, and added monitoring to detect inactive players.
Keep the evidence.
What actually
played.
Only a successful send removes the acknowledged batch.
How I built itRead the engineering details
Removing a record when sending started could lose it on failure. I retained unsent records on the device and removed the sent batch after success. Monitoring had a related timing problem: it needed to allow for delayed evidence before treating an expected event as missing.
- Python & file-backed queues
- Count actual play time and retain unsent records across restarts.
- Scheduled monitoring & AWS
- Compare expected activity with device evidence and deliver operational alerts.
- SQL reporting
- Make playback and catalogue information usable for investigation and operations.
Automated releases reduced deployment issues.
Audio workers needed the right media tools and settings in development and production. I packaged the runtime with Docker and automated build and deployment steps, so application code and its dependencies shipped together.
Code is only
part of the release.
A failed check stops the release before deployment.
How I built itRead the engineering details
A successful application build did not prove that the deployed worker had everything it needed. Container configuration and environment-specific settings had to travel through the release process alongside the code.
- Docker & Docker Compose
- Package the runtime and coordinate development services.
- GitHub Actions & AWS ECS
- Automate builds and deploy the service into its target environment.