This repository has been archived on 2023-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
soft-arch/src/sa/model/decisions/0006-web-connector-between-...

39 lines
1.8 KiB
Plaintext

## ADR #0006: The web connector is used to connect the engine components
1. **What did you decide?**
The web connector is the only component used to connect the engine components
of SmartHut in a ring architecture.
2. **What was the context for your decision?**
The chosen connector shall maintain the microservice-ready architecture of SmartHut that was designed in the component diagram. The chosen connector shall
be used to pass events (such as device updates) and commands (such as application of a scene) seamlessly. The chosen connector shall allow for concurrent access to resources.
3. **What is the problem you are trying to solve?**
Which connector is the most suited to connect the engine components toghether and to allow for an efficient flow of data between them?
4. **Which alternative options did you consider?**
- Disruptor
- Event bus
- Point-to-point web connectors
5. **Which one did you choose?**
- Point-to-point web connectors
6. **What is the main reason for that?**
Given the limited number of actors the connector type shall connect toghether,
one-to-many connectors do not pose a significant advantage compared to point-to-point connections and mainly introduce drawbacks, like weak definition of data structures and too loose coupling between components. The use of the web connector allows for well-defined endpoints and high degree of transparency while still allowing complex interactions to take place, like the coexistence of internal and external clients seamlessly acting on the same interface.
Pros:
- Simple, well-defined architecture
- OpenAPI allows clear documentation of endpoints and data structures
- Transparent enough to allow external clients
Cons:
- Tight coupling
- Cascading failover possible