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* <http://wso2.com/>*

Reply via email to