GitHub user ahgittin opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/987

    Introduce relationships between brooklyn objects

    adds BrooklynObject.relations() and relationships such as MANAGER_OF and 
IN_GROUP.
    includes tests, also convering persistence.
    also adds self-bounding generics to BrooklynObject, and lifts 
getConfig(key) to Configurable to avoid generics conflicts (not sure why 
`public <T> T getConfig(ConfigKey<T> key)` declared in two interfaces is 
incompatible but it is apparently).
    
    there is a lot more we'd like to do -- i'll open a thread on the mailing 
list -- but this is ready to be merged.
    
    for ease of reference the things i'd like to see following this are below
    
    ---
    
    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


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/incubator-brooklyn relationships

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/987.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #987
    
----
commit 772e707f81fd34e3db2eafca3067890f384cb9e1
Author: Alex Heneveld <[email protected]>
Date:   2015-06-23T06:09:15Z

    Introduce relationships between brooklyn objects
    
    adds BrooklynObject.relations() and relationships such as MANAGER_OF and 
IN_GROUP.
    includes tests, also convering persistence.
    also adds self-bounding generics to BrooklynObject, and lifts 
getConfig(key) to Configurable to avoid generics conflicts (not sure why 
`public <T> T getConfig(ConfigKey<T> key)` declared in two interfaces is 
incompatible but it is apparently).
    
    however there is much still to do:
    * add relations to CAMP, and to the REST API and UI
    * use relations for groups and children, and for locations, policies, etc 
(ensuring old persistence is still supported)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to