Details
Description
Need to define requirements/rules that should define components lifecycle and theirs mutual interaction.
For testability purposes, we require that component dependencies are defined upfront and provided at the construction time. This additionaly requires that component dependencies form no cycles. Therefore, components form an acyclic directed graph that is constructed in topological sort order wrt root.
Components created and initialized also in an order consistent with a topological sort of the components graph. This enforces serveral rules related to the components interaction:
- Since metastorage watches can only be added during the component startup, the watch notification order is consistent with the component initialization order. I.e. if a component B depdends on a component A, then A receives watch notification prior to B.
- Dependent component can directly call an API method on a dependee component (because it can obtain the dependee reference during construction). Direct inverse calls are prohibited (this is enforced by only acquiring component references during the components construction). Nevertheless, inverse call can be implemented by means of listeners or callbacks: the dependent component installs a listener to a dependeee, which can be later invoked.
Attachments
There are no Sub-Tasks for this issue.