You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Isuru Haththotuwa <is...@apache.org> on 2014/10/01 07:03:43 UTC

Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Hi Martin,

On Tue, Sep 30, 2014 at 11:32 PM, Martin Eppel (meppel) <me...@cisco.com>
wrote:

>  Hi Isuru,
>
>
>
> Please see inline (“Martin:”)
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 30, 2014 4:34 AM
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> For the initial meta data service integration with Service Grouping, I
> thought of following a simple approach:
>
>    - Autoscaler will publish information about what is depending on which
>    (using cluster ids) in a Application
>    - The dependency information will be published by the Cartridge Agent
>    in the instance, prior to sending the InstanceActivated event
>    “Martin:”  can you clarify this – does it mean the cartridge agent
>    instance will receive the dependency information and make it available to
>    the cartridge agent ?
>    Is this a new event to publish the dependency ?
>
> Each cartridge agent will be publishing its own information to the meta
data service, so that depending instances in the same application can query
them. This is not a new event, but will be directly publishing to the meta
data service.

>
>    -
>    - Any interested instance (depending instance) can first query its
>    dependency cluster ids, and then get the dependency information
>    - There will be a extension point so that custom implementation can be
>    plugged in
>
> One main reason for doing this in simple way is that there is an ongoing
> effort to write a python based light weight Cartridge Agent. Therefore, we
> would anyway need to change the publishing code, which is currently in Java
> and re-write it using python. Therefore, this implementation will be
> temporary AFAIU.
>
> “Martin:” What is the time line for the python based cartridge agent ?
>
AFAIU, its still under initial stages of development. Will update on the
timeline.

>
>
>
>
> On Thu, Sep 25, 2014 at 10:26 PM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Sure, I’ll keep a reference to the commit
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 11:26 PM
>
>
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> Hi Martin,
>
> Seems this model might not work if there are only cartridges at the
> application without Groups. We can specify an application without Groups,
> but with multiple single cartridge subscriptions. In that case also, we may
> need to share some information.
>
> For now, I will revert the commit. Please keep a diff with you so that we
> can apply accordingly when we think through this.
>
>
>
> On Wed, Sep 24, 2014 at 10:54 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Sure will do, I’ll check if we have any requirements like this
>
>
>
> Btw, I haven’t added the new fields to the schema yet,
>
>
>
> Regards
>
>
>
> Martin
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 10:09 PM
>
>
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> That is totally fine. Please do share if you have any ideas for improving
> it so that we can work on them. The main requirement is to expose some
> information from one Group/leaf level subscription so that any depending
> instances can use them to form the connections within the application.
>
>
>
> On Wed, Sep 24, 2014 at 9:47 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Mmmh, I already added it …
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 7:58 PM
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> Hi Martin,
>
>
>
> On Wed, Sep 24, 2014 at 4:44 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> 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 ?
>
> By properties, I meant just key value pairs. The actual use case is to
> expose information about a particular Group, to a depending Group which
> will be interested in communicating with the former. For an example, take a
> PHP instance and a DB Group. The PHP instance might require the DB's
> endpoint to communicate with it. In that case, DB Group will expose the
> endpoint and PHP can pick it up. So, in the DB group, we should specify the
> endpoint as a dynamic property in the definition. The static properties are
> similar to the payload parameters that we currently specify in the
> cartridge definition.
>
> Currently I can't point to a single location to say that these will be
> used from that location of the code.
>
> Also, as per the M1 task list [1] I shared, we might not need this for M1.
> Therefore, maybe we can properly think through before implementing. WDYT?
>
> [1]. Planing for Service Grouping - M1
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@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
>
> --
>  <%2B94%20716%20358%20048>
>
> Thanks and Regards,
>
> Isuru H.
>  <%2B94%20716%20358%20048>
>
> +94 716 358 048
>
> --
>
>  <%2B94%20716%20358%20048>
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
>
> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
>
> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
> *+94 716 358 048-- <%2B94%20716%20358%20048>*
>
>
>
> *Thanks and Regards,Isuru H. <%2B94%20716%20358%20048>*
>
>
>
> * +94 716 358 048 <%2B94%20716%20358%20048> <http://wso2.com/>*
>
>
>
> * <http://wso2.com/>*
>
>

Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi

On Wed, Oct 1, 2014 at 10:33 AM, Isuru Haththotuwa <is...@apache.org>
wrote:

> Hi Martin,
>
> On Tue, Sep 30, 2014 at 11:32 PM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
>>  Hi Isuru,
>>
>>
>>
>> Please see inline (“Martin:”)
>>
>>
>>
>> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
>> Haththotuwa
>> *Sent:* Tuesday, September 30, 2014 4:34 AM
>> *To:* dev
>> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
>> Group Definition
>>
>>
>>
>> For the initial meta data service integration with Service Grouping, I
>> thought of following a simple approach:
>>
>>    - Autoscaler will publish information about what is depending on
>>    which (using cluster ids) in a Application
>>
>> As i think, from autoscaler we need to publish these dependency
information to metadataservice. Then cartridge agent need to get the
dependent cluster/group from metadata service and listen on the dependent
group/cluster's activated event. Once the activated event received,
cartridge agent can retrieve all the information from the metadata service.

>
>>    -
>>    - The dependency information will be published by the Cartridge Agent
>>    in the instance, prior to sending the InstanceActivated event
>>    “Martin:”  can you clarify this – does it mean the cartridge agent
>>    instance will receive the dependency information and make it available to
>>    the cartridge agent ?
>>    Is this a new event to publish the dependency ?
>>
>> Each cartridge agent will be publishing its own information to the meta
> data service, so that depending instances in the same application can query
> them. This is not a new event, but will be directly publishing to the meta
> data service.
>
>>
>>    -
>>    - Any interested instance (depending instance) can first query its
>>    dependency cluster ids, and then get the dependency information
>>    - There will be a extension point so that custom implementation can
>>    be plugged in
>>
>> One main reason for doing this in simple way is that there is an ongoing
>> effort to write a python based light weight Cartridge Agent. Therefore, we
>> would anyway need to change the publishing code, which is currently in Java
>> and re-write it using python. Therefore, this implementation will be
>> temporary AFAIU.
>>
>> “Martin:” What is the time line for the python based cartridge agent ?
>>
> AFAIU, its still under initial stages of development. Will update on the
> timeline.
>
>>
>>
>>
>>
>> On Thu, Sep 25, 2014 at 10:26 PM, Martin Eppel (meppel) <me...@cisco.com>
>> wrote:
>>
>> Sure, I’ll keep a reference to the commit
>>
>>
>>
>> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
>> Haththotuwa
>> *Sent:* Tuesday, September 23, 2014 11:26 PM
>>
>>
>> *To:* dev
>> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
>> Group Definition
>>
>>
>>
>> Hi Martin,
>>
>> Seems this model might not work if there are only cartridges at the
>> application without Groups. We can specify an application without Groups,
>> but with multiple single cartridge subscriptions. In that case also, we may
>> need to share some information.
>>
>> For now, I will revert the commit. Please keep a diff with you so that we
>> can apply accordingly when we think through this.
>>
>>
>>
>> On Wed, Sep 24, 2014 at 10:54 AM, Martin Eppel (meppel) <me...@cisco.com>
>> wrote:
>>
>> Sure will do, I’ll check if we have any requirements like this
>>
>>
>>
>> Btw, I haven’t added the new fields to the schema yet,
>>
>>
>>
>> Regards
>>
>>
>>
>> Martin
>>
>>
>>
>> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
>> Haththotuwa
>> *Sent:* Tuesday, September 23, 2014 10:09 PM
>>
>>
>> *To:* dev
>> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
>> Group Definition
>>
>>
>>
>> That is totally fine. Please do share if you have any ideas for improving
>> it so that we can work on them. The main requirement is to expose some
>> information from one Group/leaf level subscription so that any depending
>> instances can use them to form the connections within the application.
>>
>>
>>
>> On Wed, Sep 24, 2014 at 9:47 AM, Martin Eppel (meppel) <me...@cisco.com>
>> wrote:
>>
>> Mmmh, I already added it …
>>
>>
>>
>> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
>> Haththotuwa
>> *Sent:* Tuesday, September 23, 2014 7:58 PM
>> *To:* dev
>> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
>> Group Definition
>>
>>
>>
>> Hi Martin,
>>
>>
>>
>> On Wed, Sep 24, 2014 at 4:44 AM, Martin Eppel (meppel) <me...@cisco.com>
>> wrote:
>>
>> 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 ?
>>
>> By properties, I meant just key value pairs. The actual use case is to
>> expose information about a particular Group, to a depending Group which
>> will be interested in communicating with the former. For an example, take a
>> PHP instance and a DB Group. The PHP instance might require the DB's
>> endpoint to communicate with it. In that case, DB Group will expose the
>> endpoint and PHP can pick it up. So, in the DB group, we should specify the
>> endpoint as a dynamic property in the definition. The static properties are
>> similar to the payload parameters that we currently specify in the
>> cartridge definition.
>>
>> Currently I can't point to a single location to say that these will be
>> used from that location of the code.
>>
>> Also, as per the M1 task list [1] I shared, we might not need this for
>> M1. Therefore, maybe we can properly think through before implementing.
>> WDYT?
>>
>> [1]. Planing for Service Grouping - M1
>>
>>
>>
>> Thanks
>>
>>
>>
>> Martin
>>
>>
>>
>> *From:* isuruh@wso2.com [mailto:isuruh@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
>>
>> --
>>  <%2B94%20716%20358%20048>
>>
>> Thanks and Regards,
>>
>> Isuru H.
>>  <%2B94%20716%20358%20048>
>>
>> +94 716 358 048
>>
>> --
>>
>>  <%2B94%20716%20358%20048>
>>
>>
>>
>>
>>
>> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>>
>>
>>
>>
>>
>> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>>
>>
>>
>>
>>
>> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>>
>>
>>
>>
>>
>> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>>
>>
>>
>>
>>
>> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>>
>>
>>
>>
>> *+94 716 358 048-- <%2B94%20716%20358%20048>*
>>
>>
>>
>> *Thanks and Regards,Isuru H. <%2B94%20716%20358%20048>*
>>
>>
>>
>> * +94 716 358 048 <%2B94%20716%20358%20048> <http://wso2.com/>*
>>
>>
>>
>> * <http://wso2.com/>*
>>
>>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Martin,

On Wed, Oct 1, 2014 at 10:58 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:

>  Hi Isuru,
>
>
>
> Thanks for the reply, one more clarification – how will the cartridge
> agent know it’s dependencies – through an event or by querying the meta
> service ?
>
>
>
> Also, when you say the autoscaler published the dependency information, is
> it published to the meta service or by topology event ?
>
I think this can be simplified even more; will start a new thread with the
ideas.

>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 30, 2014 10:04 PM
> *To:* Martin Eppel (meppel)
> *Cc:* dev@stratos.apache.org
>
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> Hi Martin,
>
>
>
> On Tue, Sep 30, 2014 at 11:32 PM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Hi Isuru,
>
>
>
> Please see inline (“Martin:”)
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 30, 2014 4:34 AM
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> For the initial meta data service integration with Service Grouping, I
> thought of following a simple approach:
>
>    - Autoscaler will publish information about what is depending on which
>    (using cluster ids) in a Application
>    - The dependency information will be published by the Cartridge Agent
>    in the instance, prior to sending the InstanceActivated event
>    “Martin:”  can you clarify this – does it mean the cartridge agent
>    instance will receive the dependency information and make it available to
>    the cartridge agent ?
>    Is this a new event to publish the dependency ?
>
>   Each cartridge agent will be publishing its own information to the meta
> data service, so that depending instances in the same application can query
> them. This is not a new event, but will be directly publishing to the meta
> data service.
>
>
>    -
>    - Any interested instance (depending instance) can first query its
>    dependency cluster ids, and then get the dependency information
>    - There will be a extension point so that custom implementation can be
>    plugged in
>
> One main reason for doing this in simple way is that there is an ongoing
> effort to write a python based light weight Cartridge Agent. Therefore, we
> would anyway need to change the publishing code, which is currently in Java
> and re-write it using python. Therefore, this implementation will be
> temporary AFAIU.
>
> “Martin:” What is the time line for the python based cartridge agent ?
>
>  AFAIU, its still under initial stages of development. Will update on the
> timeline.
>
>
>
>
>
> On Thu, Sep 25, 2014 at 10:26 PM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Sure, I’ll keep a reference to the commit
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 11:26 PM
>
>
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> Hi Martin,
>
> Seems this model might not work if there are only cartridges at the
> application without Groups. We can specify an application without Groups,
> but with multiple single cartridge subscriptions. In that case also, we may
> need to share some information.
>
> For now, I will revert the commit. Please keep a diff with you so that we
> can apply accordingly when we think through this.
>
>
>
> On Wed, Sep 24, 2014 at 10:54 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Sure will do, I’ll check if we have any requirements like this
>
>
>
> Btw, I haven’t added the new fields to the schema yet,
>
>
>
> Regards
>
>
>
> Martin
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 10:09 PM
>
>
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> That is totally fine. Please do share if you have any ideas for improving
> it so that we can work on them. The main requirement is to expose some
> information from one Group/leaf level subscription so that any depending
> instances can use them to form the connections within the application.
>
>
>
> On Wed, Sep 24, 2014 at 9:47 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Mmmh, I already added it …
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@wso2.com] *On Behalf Of *Isuru
> Haththotuwa
> *Sent:* Tuesday, September 23, 2014 7:58 PM
> *To:* dev
> *Subject:* Re: [Discuss] [Grouping] Specifying Dependency Information in
> Group Definition
>
>
>
> Hi Martin,
>
>
>
> On Wed, Sep 24, 2014 at 4:44 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> 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 ?
>
> By properties, I meant just key value pairs. The actual use case is to
> expose information about a particular Group, to a depending Group which
> will be interested in communicating with the former. For an example, take a
> PHP instance and a DB Group. The PHP instance might require the DB's
> endpoint to communicate with it. In that case, DB Group will expose the
> endpoint and PHP can pick it up. So, in the DB group, we should specify the
> endpoint as a dynamic property in the definition. The static properties are
> similar to the payload parameters that we currently specify in the
> cartridge definition.
>
> Currently I can't point to a single location to say that these will be
> used from that location of the code.
>
> Also, as per the M1 task list [1] I shared, we might not need this for M1.
> Therefore, maybe we can properly think through before implementing. WDYT?
>
> [1]. Planing for Service Grouping - M1
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* isuruh@wso2.com [mailto:isuruh@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
>
> --
>  <%2B94%20716%20358%20048>
>
> Thanks and Regards,
>
> Isuru H.
>  <%2B94%20716%20358%20048>
>
> +94 716 358 048
>
> --
>
>  <%2B94%20716%20358%20048>
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
>
> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
>
> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
> *+94 716 358 048 -- <%2B94%20716%20358%20048>*
>
>
>
>
> *Thanks and Regards, Isuru H. <%2B94%20716%20358%20048>*
>
>
>
>
> *+94 716 358 048-- <%2B94%20716%20358%20048>*
>
>
>
> *Thanks and Regards,Isuru H. <%2B94%20716%20358%20048>*
>
>
>
> * +94 716 358 048 <%2B94%20716%20358%20048> <http://wso2.com/>*
>
>
>
> * <http://wso2.com/>*
>
>

RE: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Hi Isuru,

Thanks for the reply, one more clarification – how will the cartridge agent know it’s dependencies – through an event or by querying the meta service ?

Also, when you say the autoscaler published the dependency information, is it published to the meta service or by topology event ?

Thanks

Martin

From: isuruh@wso2.com [mailto:isuruh@wso2.com] On Behalf Of Isuru Haththotuwa
Sent: Tuesday, September 30, 2014 10:04 PM
To: Martin Eppel (meppel)
Cc: dev@stratos.apache.org
Subject: Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Hi Martin,

On Tue, Sep 30, 2014 at 11:32 PM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Hi Isuru,

Please see inline (“Martin:”)

From: isuruh@wso2.com<ma...@wso2.com> [mailto:isuruh@wso2.com<ma...@wso2.com>] On Behalf Of Isuru Haththotuwa
Sent: Tuesday, September 30, 2014 4:34 AM
To: dev
Subject: Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

For the initial meta data service integration with Service Grouping, I thought of following a simple approach:

  *   Autoscaler will publish information about what is depending on which (using cluster ids) in a Application
  *   The dependency information will be published by the Cartridge Agent in the instance, prior to sending the InstanceActivated event
“Martin:”  can you clarify this – does it mean the cartridge agent instance will receive the dependency information and make it available to the cartridge agent ?
Is this a new event to publish the dependency ?
Each cartridge agent will be publishing its own information to the meta data service, so that depending instances in the same application can query them. This is not a new event, but will be directly publishing to the meta data service.

  *
  *   Any interested instance (depending instance) can first query its dependency cluster ids, and then get the dependency information
  *   There will be a extension point so that custom implementation can be plugged in

One main reason for doing this in simple way is that there is an ongoing effort to write a python based light weight Cartridge Agent. Therefore, we would anyway need to change the publishing code, which is currently in Java and re-write it using python. Therefore, this implementation will be temporary AFAIU.
“Martin:” What is the time line for the python based cartridge agent ?
AFAIU, its still under initial stages of development. Will update on the timeline.



On Thu, Sep 25, 2014 at 10:26 PM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Sure, I’ll keep a reference to the commit

From: isuruh@wso2.com<ma...@wso2.com> [mailto:isuruh@wso2.com<ma...@wso2.com>] On Behalf Of Isuru Haththotuwa
Sent: Tuesday, September 23, 2014 11:26 PM

To: dev
Subject: Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Hi Martin,
Seems this model might not work if there are only cartridges at the application without Groups. We can specify an application without Groups, but with multiple single cartridge subscriptions. In that case also, we may need to share some information.
For now, I will revert the commit. Please keep a diff with you so that we can apply accordingly when we think through this.

On Wed, Sep 24, 2014 at 10:54 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Sure will do, I’ll check if we have any requirements like this

Btw, I haven’t added the new fields to the schema yet,

Regards

Martin

From: isuruh@wso2.com<ma...@wso2.com> [mailto:isuruh@wso2.com<ma...@wso2.com>] On Behalf Of Isuru Haththotuwa
Sent: Tuesday, September 23, 2014 10:09 PM

To: dev
Subject: Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

That is totally fine. Please do share if you have any ideas for improving it so that we can work on them. The main requirement is to expose some information from one Group/leaf level subscription so that any depending instances can use them to form the connections within the application.

On Wed, Sep 24, 2014 at 9:47 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Mmmh, I already added it …

From: isuruh@wso2.com<ma...@wso2.com> [mailto:isuruh@wso2.com<ma...@wso2.com>] On Behalf Of Isuru Haththotuwa
Sent: Tuesday, September 23, 2014 7:58 PM
To: dev
Subject: Re: [Discuss] [Grouping] Specifying Dependency Information in Group Definition

Hi Martin,

On Wed, Sep 24, 2014 at 4:44 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
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 ?
By properties, I meant just key value pairs. The actual use case is to expose information about a particular Group, to a depending Group which will be interested in communicating with the former. For an example, take a PHP instance and a DB Group. The PHP instance might require the DB's endpoint to communicate with it. In that case, DB Group will expose the endpoint and PHP can pick it up. So, in the DB group, we should specify the endpoint as a dynamic property in the definition. The static properties are similar to the payload parameters that we currently specify in the cartridge definition.
Currently I can't point to a single location to say that these will be used from that location of the code.

Also, as per the M1 task list [1] I shared, we might not need this for M1. Therefore, maybe we can properly think through before implementing. WDYT?

[1]. Planing for Service Grouping - M1

Thanks

Martin

From: isuruh@wso2.com<ma...@wso2.com> [mailto:isuruh@wso2.com<ma...@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>
Thanks and Regards,

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

--

<tel:%2B94%20716%20358%20048>
Thanks and Regards,

Isuru H.

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

--

<tel:%2B94%20716%20358%20048>
Thanks and Regards,

Isuru H.

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

--

<tel:%2B94%20716%20358%20048>
Thanks and Regards,

Isuru H.

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

--
<tel:%2B94%20716%20358%20048>
Thanks and Regards,

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