Component manager

The heart of the component framework is the component manager. It is responsible for coordinating the execution of all component instances, providing them with their capabilities, and intermediating connections between components.

Components can be launched explicitly (from a URL, for example) or implicitly from a request for a particular capability. Component manager performs the necessary resolution to determine whether to launch a new component or route the request to an existing instance. For this routing to take place, every component must declare any capabilities that it provides to the system and any it consumes.

Component manager parses each component‘s declaration to determine how to run the component and supply the necessary capabilities. Components are typically declared to the system through a component manifest file within the component’s package.

Below is a simple example of a component manifest that describes an ELF executable with some additional command arguments:

program: {
    runner: "elf",
    binary: "bin/hello",
    args: [ "Hello", "World!" ],
},

Notice the runtime declaration telling the component manager that this component requires the ELF runner. This is an example of a capability!