ADR-0002: Use Node.js for WatchTower Backend
- Status: Accepted
- Date: 2026-05-20
Context
WatchTower is a centralized observability system that captures:
- user interaction
- errors
- performance signals
- deployment telemetry
The system requires:
- live event updates
- network communication
- lightweight deployment compatibility
Decision
Use Node.js as the backend runtime for WatchTower.
Rationale
- Node.js is optimized for I/O-bound and event-driven systems
- WatchTower primarily handles:
- incoming telemetry
- DB connections
- network requests
- streaming updates
- Node.js supports realtime communication naturally through:
- async event handling
- event loops
- callback functions
- JSON handling is native and aligns well with browser-based telemetry data
- Shared style wtih JS so frontend and backend readability is increased and complexity is reduced
Alternatives Considered
Go
Rejected due to skill overhead needed to proficiently write in Go and increased backend complexity.
Python
Rejected because of potential compilation overhead and less natural live event handling.
Java/Spring
Rejected due to architectural and technical overhead.
Consequences
Positive
- Strong realtime support
- Efficient concurrent connection handling
- Fast prototyping
- Simplified frontend/backend integration
Negative
- CPU-intensive operations can block the event loop
- Heavy computation may require worker threads or external services
Conclusion
Node.js was selected due to it being able to efficiently handle asynchronous telemetry ingestion and live operational updates, key specifications for a Watchtower.