Skip to content

0006 execution to broadcast events

nehashri edited this page Sep 25, 2017 · 1 revision

6. Execution to broadcast events

This ADR has been recorded retrospectively.

Status

Accepted

Context

During execution, we need to handle reporting and re-run functionality. Reporting and re-run functionality is tightly coupled with execution. As and when there is a change in reporting or re-run functionality, execution also needs to change.

Decision

Remove this tight coupling between execution and reporting/re-run functionality. Instead use publish-subscribe pattern.
Gauge needs to broadcast events that occur during execution. Reporting and re-run can subscribe to relevant events and perform their respective functions. This removes their tight coupling with execution package.

Consequences

Any functionality can now subscribe to events published during execution. Execution need not change to accommodate any new functionality.