DESIGN CHOICES / FN-UNS
Why functions and Git-based deployment?
The reasoning behind this implementation, and the responsibilities that come with running it.
Choose for your team and use case
fn-uns keeps processing logic in small programs and deploys them in containers. This suits a team that wants to review code, maintain automated checks, and control its own infrastructure. A visual flow tool or a managed platform may fit other teams and requirements.
Version control is not unique to this approach. Node-RED Projects uses Git. Compare the actual review, testing, deployment, and support process you can operate with each option.
Keep processing responsibilities focused
State tracking, stoppage classification, and KPI calculation have separate components. Engineers can inspect and change one responsibility at a time. Shared topic formats, cache keys, and database tables remain contracts that those components must respect.
if currentState != tracked.State { // State changed — log the completed state duration := now.Sub(tracked.Since).Seconds() db.Exec("INSERT INTO uns_state ...") }
Make changes reviewable
Store code and deployment configuration in Git. Review a proposed change, test it, and deploy an identified revision. fnkit provides the deployment workflow used in this project; the team defines approval rules and the tests required before release.
A code revert does not undo database changes or external side effects. Plan recovery for those separately and verify a rollback before relying on it.
What your team owns
| Area | Work to plan |
|---|---|
| Data quality | Agree signal meanings, detect gaps, and validate calculations against observed production. |
| Change control | Review code and configuration, test contracts, and track deployed versions. |
| Operations | Monitor containers and shared services, manage access, and maintain backups. |
| Capacity | Measure message rates, write volume, retention, and query performance. |
| Support | Assign owners for failures across equipment, networks, and software. |
Make a small, testable choice
Use one meaningful machine signal to compare the workflow with your existing tools. Choose based on who will maintain it and how well the result meets the operational need.