eclipse-symphony / symphony

Symphony project
MIT License
24 stars 17 forks source link

[Proposal]: composite Target #204

Open Haishi2016 opened 1 month ago

Haishi2016 commented 1 month ago

Problem Statement

Some users would like to model a complex physical machine as multiple Targets. However, when this happens, we don't have a machine-level view. Although with object tags we can group Targets together, there's no Symphony object to represent or carry the machine-level status. If would be desirable for user to monitor and manage such machine-level status that spans multiple Targets.

Context Symphony Catalog has been designed to accommodate for such requirements. For example, we can create a "machine twin" object that includes templates for multiple Targets. This Catalog can be materialized into a group of Targets. And these targets can report statuses into the "machine twin" object, presenting a unified status view of the whole machine:

1) For each machine, we’ll create a Catalog object – this is essentially the “digital twin” of the machine. This catalog object can define a list of Target templates that collectively represent a physical machine. 2) With a Campaign, we can “materialize” a list of such catalog object into corresponding Targets, and each Target will be tagged by the twin name so that targets from the same twin can be selected together. 3) For a single-machine deployment, nothing changes – we create an Instance target and select Targets by the twin name. 4) For multi-machine deployment, we use a Campaign that list a list of machines and create a new Instance object for each machine. 5) When a target reports status back, the status is attached to the twin Catalog object so that through the Catalog object you can get an overall status of the whole machine.

Proposed Enhancements 1) Ability to materialize multiple targets from a catalog object 2) Ability to select based on a "twin" catalog when designing an Instance 3) Ability to report Target status into a designated catalog object (the "twin" catalog object). In Symphony's design, we have "report into" or "report under" options to attach status(es) to a catalog. 4) Ability to query/present catalogs with attached status objects.