Hi Isuru,

What kind of properties are you referring to where this would be the case ? Is 
there an actual use case for this ? Which code in stratos would actually take 
these properties into account and apply them ?

Thanks

Martin

From: isu...@wso2.com [mailto:isu...@wso2.com] On Behalf Of Isuru Haththotuwa
Sent: Sunday, September 21, 2014 1:05 AM
To: dev
Subject: [Discuss] [Grouping] Specifying Dependency Information in Group 
Definition

Hi Devs,
In Service Grouping, a cartridge that is depending on another might need some 
information (endpoint, etc.) about the latter. AFAIU this information will be 
specific to a Service in a Group. Therefore, I suggest we add this properties 
to the cartridges section of the Group definition. I have shown a simple Group 
Definition with the proposed changes [1].
Here, dynamicProperties contains the names of properties of which values should 
be dynamically picked at the runtime. If a user needs custom properties, we 
should define a abstraction so that a custom implementation can be loaded at 
the runtime. The per-defined property name-value pairs are defined in the 
staticProperties section.
These data can be published to the meta data service. The relevant member 
instances can query them and get the information about the dependencies. 
Handling this information would be done at the instance level (using Cartridge 
Agent, etc.).

Please share your feedback.

[1].
{
  "name": "group1",
  "cartridges": [
    {
      "type": "mysql",
      "dynamicProperties": [
        "hostname",
        "port"
      ],
      "staticProperties": [
        {
          "name": "property1",
          "value": "property1_value"
        },
        {
          "name": "property2",
          "value": "property2_value"
        }
      ]
    }
  ],
  "dependencies": {
    "killBehaviour": "kill-none"
  }
}

--
Thanks and Regards,

Isuru H.
+94 716 358 048<tel:%2B94%20716%20358%20048>

Reply via email to