Hi All-

I wanted to kick off a thread discussing some changes to the internal model we would like to make. The driver for these are:

* to allow arbitrary relationships between items to be expressed (imagine a UI with a rich graph, where you pick which relationships you are interested in) * to simplify the internal code by making Feeds, Locations, Policies, etc all be Entity instances * to persist entities as YAML -- so the live state of any entity has the same format as the blueprint which deploys it

Thoughts?

The work to add relations to the AbstractBrooklynObject model is in a new PR at https://github.com/apache/incubator-brooklyn/pull/987.

This should facilitate the list of proposed next steps described below (and in the PR).

Best
Alex


Make custom relations usable:
* add CAMP YAML `brooklyn.relations` field to allow callers to specify relations
* add REST API to query relations
* update UI to show relations

Replace management and group membership with relations:
* new "active_child" relationship for a managed child which is important enough to call out in the UI
* add subscriptions for relations on an entity
* replace 'members' field in Group with GROUP_CONTAINS relationship
leave old field there for deserialization for one release cycle, but empty it and move everything to be a relation
    use subscription to update count
* replace `parent/children` fields in Entity with use of relations
* again leaving fields in place for one release cycle in order to update count * add `addChild(Entity, boolean isActive)` such that last item can be set false to establish a management-only relationship
   * REST API call for "children" to show only ACTIVE children

Finally simplify persistence:
* make Policy, Enricher Feed, etc all be Entities
* make Location be Entities and replace the LocationRegistry with use of locations in catalog * use IN_LOCATION, HAS_POLICY, HAS_FEED, etc relations for them, instead of custom persistence * allow Catalog to support arbitrary types (i.e. it becomes a Registry of types, rather than a Catalog)
   * with warning or fail if we try to persist an unknown type
   * with serialization info (to allow migration across versions)
* persist as YAML

END


--
Cloudsoft Corporation Limited, Registered in Scotland No: SC349230. Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. Cloudsoft Corporation Limited does not accept responsibility for changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Cloudsoft Corporation Limited in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Reply via email to