Vyacheslav Koptilin created IGNITE-14410:
--------------------------------------------

             Summary: Node components startup
                 Key: IGNITE-14410
                 URL: https://issues.apache.org/jira/browse/IGNITE-14410
             Project: Ignite
          Issue Type: New Feature
            Reporter: Vyacheslav Koptilin


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to