Skip to content

[Feature] Support components to start in dependency order #1329

@robocanic

Description

@robocanic

What would you like to be added:
Components can be initialized and started based on their dependencies between components. There are two ways to make it:

  1. Lazy loading.
  2. Using DAG to automatically resolve dependencies.

Why is this needed:
At first, the start order of each component is hardcoded in bootstrap, so the start order is certain and ordered. The originial purpose of Order() defined in Component is to provide the start order: the larger the number, the earlier it starts. But if we defined a new component called A and A depends on Store, we need to look up the order of Store. if A depends on many other components, we need to look up to the order of every components. So the design of Order() is not convenient enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions