You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Lahiru Sandaruwan <la...@wso2.com> on 2014/11/07 10:45:29 UTC

Scale dependency design in Application model

Hi all,

We have done a design for application scaling.

We can define scaling ratio in the parents. Ratio only applies to the
immediate children of the group and not further. Cartridge to cartridge
ratio can be anything where Group to cartridge ratio should be 1:* always.
Because when we have cartridges and groups as siblings, cartridges will be
depending on groups always.

Let’s go through some sample scenarios. G* represents groups and C*
represents cartridges.


   -

   Scenario 1




   -

   Scenario 2

We cannot have scale ratio at a parent which only has groups as
children(G1). If the user needs to have a scale ratio between such
children, s/he should move children of one of the groups to parent(G1).


   -

   Scenario 3

Case where several groups and cartridges are in a parent.

Give your feedback.

Thanks.

-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Scale dependency design in Application model

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

Nice work! +1 for the overall idea.



On Fri, Nov 7, 2014 at 7:12 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> It seems getting the min count as the ratio would be more appropriate
> since the above mentioned scenario cannot handle scenarios like 2:1 ratio
> for Group:cartridge.
>
> On Fri, Nov 7, 2014 at 5:11 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Here are the jsons with the scale ratio for following scenario,
>>
>> Application Json,
>>
>> {
>>
>>    "applicationId": “app_1”,
>>
>>    "alias": “tomcatapp",
>>
>>    "components": {
>>
>>        "groups": [
>>
>>            {
>>
>>                "name": "group1”,
>>
>>                "alias": "mygroup1”,
>>
>>                "subscribables": [
>>
>>     {
>>
>>                        "type": “mysql”,
>>
>>                        "alias": "mygroup1mysql”
>>
>>                    },
>>
>>                    {
>>
>>                        "type": “mongodb”,
>>
>>                        "alias": "mygroup1mongodb”
>>
>>                    }
>>
>>                ]
>>
>>            }
>>
>>        ],
>>
>>        "cartridges": [
>>
>>             "tomcat"
>>
>>        ]
>>
>>    },
>>
>>    "subscribableInfo": [
>>
>>        {
>>
>>            "alias": "mygroup1mysql”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1"
>>
>>        },
>>
>>        {
>>
>>            "alias": "mygroup1mongodb”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1"
>>
>>        },
>>
>>        {
>>
>>            "alias": “mytomcat”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1",
>>
>>            "repoURL": "www.mygit.com/php.git",
>>
>>            "privateRepo": "true",
>>
>>            "repoUsername": "admin",
>>
>>            "repoPassword": "xxxx"
>>
>>        }
>>
>>    ],
>>
>>    "dependencies": {
>>
>>        "startupOrders": [
>>
>>             "group.group1,cartridge.tomcat"
>>
>> ],
>>
>>        "terminationBehaviour": "terminate-dependents”,
>>
>> *        “scaleRatio”: [*
>>
>> *     “group.group1,cartridge.tomcat” : “1,3”, *
>>
> When we are scaling based on a group, I assume we are scaling all the
cartridge instances of the Group? If so, how do we specify a ratio between
that Group's cartridges? Does it come

> *        ]*
>>
>>    }
>>
>> }
>>
>> Group 1 Json,
>>
>> {
>>
>>    "name": "group1",
>>
>>    "cartridges": [
>>
>>        “mysql”,
>>
>>        “mongodb”
>>
>>    ],
>>
>>    "dependencies": {
>>
>>        "startupOrders": [
>>
>>             "cartridge.mongodb,cartridge.mysql"
>>
>> ],
>>
>>        "terminationBehaviour": "terminate-dependents",
>>
>>       * “scaleRatio”: [*
>>
>> *     “cartridge.mongodb,cartridge.mysql” : “1,1”, *
>>
>> *        ]*
>>
>>    }
>>
>> }
>>
>>
>> Thanks.
>>
>>
>> On Fri, Nov 7, 2014 at 3:49 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>>    -
>>>
>>>    Scenario 4
>>>
>>> We can have independent ratios between siblings.
>>>
>>> ​
>>>
>>> On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> We have done a design for application scaling.
>>>>>
>>>>> We can define scaling ratio in the parents. Ratio only applies to the
>>>>> immediate children of the group and not further. Cartridge to cartridge
>>>>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>>>>> Because when we have cartridges and groups as siblings, cartridges will be
>>>>> depending on groups always.
>>>>>
>>>>> Let’s go through some sample scenarios. G* represents groups and C*
>>>>> represents cartridges.
>>>>>
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 1
>>>>>
>>>>>
>>>>>
>>>>> ​
>>>>>
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 2
>>>>>
>>>>> We cannot have scale ratio at a parent which only has groups as
>>>>> children(G1). If the user needs to have a scale ratio between such
>>>>> children, s/he should move children of one of the groups to parent(G1).
>>>>>
>>>>>
>>>>> ​
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 3
>>>>>
>>>>> Case where several groups and cartridges are in a parent.
>>>>>
>>>>> ​
>>>>>
>>>>> Give your feedback.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
> --
> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
> Thanks and Regards,
>
> Isuru H.
> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
> +94 716 358 048 <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>*
> <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Scale dependency design in Application model

Posted by Lahiru Sandaruwan <la...@wso2.com>.
It seems getting the min count as the ratio would be more appropriate since
the above mentioned scenario cannot handle scenarios like 2:1 ratio for
Group:cartridge.

On Fri, Nov 7, 2014 at 5:11 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Here are the jsons with the scale ratio for following scenario,
>
> Application Json,
>
> {
>
>    "applicationId": “app_1”,
>
>    "alias": “tomcatapp",
>
>    "components": {
>
>        "groups": [
>
>            {
>
>                "name": "group1”,
>
>                "alias": "mygroup1”,
>
>                "subscribables": [
>
>     {
>
>                        "type": “mysql”,
>
>                        "alias": "mygroup1mysql”
>
>                    },
>
>                    {
>
>                        "type": “mongodb”,
>
>                        "alias": "mygroup1mongodb”
>
>                    }
>
>                ]
>
>            }
>
>        ],
>
>        "cartridges": [
>
>             "tomcat"
>
>        ]
>
>    },
>
>    "subscribableInfo": [
>
>        {
>
>            "alias": "mygroup1mysql”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1"
>
>        },
>
>        {
>
>            "alias": "mygroup1mongodb”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1"
>
>        },
>
>        {
>
>            "alias": “mytomcat”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1",
>
>            "repoURL": "www.mygit.com/php.git",
>
>            "privateRepo": "true",
>
>            "repoUsername": "admin",
>
>            "repoPassword": "xxxx"
>
>        }
>
>    ],
>
>    "dependencies": {
>
>        "startupOrders": [
>
>             "group.group1,cartridge.tomcat"
>
> ],
>
>        "terminationBehaviour": "terminate-dependents”,
>
> *        “scaleRatio”: [*
>
> *     “group.group1,cartridge.tomcat” : “1,3”, *
>
> *        ]*
>
>    }
>
> }
>
> Group 1 Json,
>
> {
>
>    "name": "group1",
>
>    "cartridges": [
>
>        “mysql”,
>
>        “mongodb”
>
>    ],
>
>    "dependencies": {
>
>        "startupOrders": [
>
>             "cartridge.mongodb,cartridge.mysql"
>
> ],
>
>        "terminationBehaviour": "terminate-dependents",
>
>       * “scaleRatio”: [*
>
> *     “cartridge.mongodb,cartridge.mysql” : “1,1”, *
>
> *        ]*
>
>    }
>
> }
>
>
> Thanks.
>
>
> On Fri, Nov 7, 2014 at 3:49 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>>    -
>>
>>    Scenario 4
>>
>> We can have independent ratios between siblings.
>>
>> ​
>>
>> On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> We have done a design for application scaling.
>>>>
>>>> We can define scaling ratio in the parents. Ratio only applies to the
>>>> immediate children of the group and not further. Cartridge to cartridge
>>>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>>>> Because when we have cartridges and groups as siblings, cartridges will be
>>>> depending on groups always.
>>>>
>>>> Let’s go through some sample scenarios. G* represents groups and C*
>>>> represents cartridges.
>>>>
>>>>
>>>>    -
>>>>
>>>>    Scenario 1
>>>>
>>>>
>>>>
>>>> ​
>>>>
>>>>
>>>>    -
>>>>
>>>>    Scenario 2
>>>>
>>>> We cannot have scale ratio at a parent which only has groups as
>>>> children(G1). If the user needs to have a scale ratio between such
>>>> children, s/he should move children of one of the groups to parent(G1).
>>>>
>>>>
>>>> ​
>>>>
>>>>    -
>>>>
>>>>    Scenario 3
>>>>
>>>> Case where several groups and cartridges are in a parent.
>>>>
>>>> ​
>>>>
>>>> Give your feedback.
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Scale dependency design in Application model

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi Udara,

On Fri, Nov 7, 2014 at 6:40 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> When we are having ration between a group and cartridge, are we scaling
> the whole group when the cartridge is scaling up? If so what is the scaling
> ratio of the cartridges inside the group (when the group have multiple
> cartridges)?
>

IMO we should scale only the cartridge children of the particular group
when group gets the notification. Group children should be notified
according to the ratio of the parent group.


>
> Are we scaling down with the ratios?
>

Yes. we can use same ratio for scaling down.

>
> On Fri, Nov 7, 2014 at 5:11 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Here are the jsons with the scale ratio for following scenario,
>>
>> Application Json,
>>
>> {
>>
>>    "applicationId": “app_1”,
>>
>>    "alias": “tomcatapp",
>>
>>    "components": {
>>
>>        "groups": [
>>
>>            {
>>
>>                "name": "group1”,
>>
>>                "alias": "mygroup1”,
>>
>>                "subscribables": [
>>
>>     {
>>
>>                        "type": “mysql”,
>>
>>                        "alias": "mygroup1mysql”
>>
>>                    },
>>
>>                    {
>>
>>                        "type": “mongodb”,
>>
>>                        "alias": "mygroup1mongodb”
>>
>>                    }
>>
>>                ]
>>
>>            }
>>
>>        ],
>>
>>        "cartridges": [
>>
>>             "tomcat"
>>
>>        ]
>>
>>    },
>>
>>    "subscribableInfo": [
>>
>>        {
>>
>>            "alias": "mygroup1mysql”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1"
>>
>>        },
>>
>>        {
>>
>>            "alias": "mygroup1mongodb”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1"
>>
>>        },
>>
>>        {
>>
>>            "alias": “mytomcat”,
>>
>>            "deploymentPolicy": "deployment_policy_1",
>>
>>            "autoscalingPolicy": "autoscale_policy_1",
>>
>>            "repoURL": "www.mygit.com/php.git",
>>
>>            "privateRepo": "true",
>>
>>            "repoUsername": "admin",
>>
>>            "repoPassword": "xxxx"
>>
>>        }
>>
>>    ],
>>
>>    "dependencies": {
>>
>>        "startupOrders": [
>>
>>             "group.group1,cartridge.tomcat"
>>
>> ],
>>
>>        "terminationBehaviour": "terminate-dependents”,
>>
>> *        “scaleRatio”: [*
>>
>> *     “group.group1,cartridge.tomcat” : “1,3”, *
>>
>> *        ]*
>>
>>    }
>>
>> }
>>
>> Group 1 Json,
>>
>> {
>>
>>    "name": "group1",
>>
>>    "cartridges": [
>>
>>        “mysql”,
>>
>>        “mongodb”
>>
>>    ],
>>
>>    "dependencies": {
>>
>>        "startupOrders": [
>>
>>             "cartridge.mongodb,cartridge.mysql"
>>
>> ],
>>
>>        "terminationBehaviour": "terminate-dependents",
>>
>>       * “scaleRatio”: [*
>>
>> *     “cartridge.mongodb,cartridge.mysql” : “1,1”, *
>>
>> *        ]*
>>
>>    }
>>
>> }
>>
>>
>> Thanks.
>>
>>
>> On Fri, Nov 7, 2014 at 3:49 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>>    -
>>>
>>>    Scenario 4
>>>
>>> We can have independent ratios between siblings.
>>>
>>> ​
>>>
>>> On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> We have done a design for application scaling.
>>>>>
>>>>> We can define scaling ratio in the parents. Ratio only applies to the
>>>>> immediate children of the group and not further. Cartridge to cartridge
>>>>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>>>>> Because when we have cartridges and groups as siblings, cartridges will be
>>>>> depending on groups always.
>>>>>
>>>>> Let’s go through some sample scenarios. G* represents groups and C*
>>>>> represents cartridges.
>>>>>
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 1
>>>>>
>>>>>
>>>>>
>>>>> ​
>>>>>
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 2
>>>>>
>>>>> We cannot have scale ratio at a parent which only has groups as
>>>>> children(G1). If the user needs to have a scale ratio between such
>>>>> children, s/he should move children of one of the groups to parent(G1).
>>>>>
>>>>>
>>>>> ​
>>>>>
>>>>>    -
>>>>>
>>>>>    Scenario 3
>>>>>
>>>>> Case where several groups and cartridges are in a parent.
>>>>>
>>>>> ​
>>>>>
>>>>> Give your feedback.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Scale dependency design in Application model

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

When we are having ration between a group and cartridge, are we scaling the
whole group when the cartridge is scaling up? If so what is the scaling
ratio of the cartridges inside the group (when the group have multiple
cartridges)?

Are we scaling down with the ratios?

On Fri, Nov 7, 2014 at 5:11 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Here are the jsons with the scale ratio for following scenario,
>
> Application Json,
>
> {
>
>    "applicationId": “app_1”,
>
>    "alias": “tomcatapp",
>
>    "components": {
>
>        "groups": [
>
>            {
>
>                "name": "group1”,
>
>                "alias": "mygroup1”,
>
>                "subscribables": [
>
>     {
>
>                        "type": “mysql”,
>
>                        "alias": "mygroup1mysql”
>
>                    },
>
>                    {
>
>                        "type": “mongodb”,
>
>                        "alias": "mygroup1mongodb”
>
>                    }
>
>                ]
>
>            }
>
>        ],
>
>        "cartridges": [
>
>             "tomcat"
>
>        ]
>
>    },
>
>    "subscribableInfo": [
>
>        {
>
>            "alias": "mygroup1mysql”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1"
>
>        },
>
>        {
>
>            "alias": "mygroup1mongodb”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1"
>
>        },
>
>        {
>
>            "alias": “mytomcat”,
>
>            "deploymentPolicy": "deployment_policy_1",
>
>            "autoscalingPolicy": "autoscale_policy_1",
>
>            "repoURL": "www.mygit.com/php.git",
>
>            "privateRepo": "true",
>
>            "repoUsername": "admin",
>
>            "repoPassword": "xxxx"
>
>        }
>
>    ],
>
>    "dependencies": {
>
>        "startupOrders": [
>
>             "group.group1,cartridge.tomcat"
>
> ],
>
>        "terminationBehaviour": "terminate-dependents”,
>
> *        “scaleRatio”: [*
>
> *     “group.group1,cartridge.tomcat” : “1,3”, *
>
> *        ]*
>
>    }
>
> }
>
> Group 1 Json,
>
> {
>
>    "name": "group1",
>
>    "cartridges": [
>
>        “mysql”,
>
>        “mongodb”
>
>    ],
>
>    "dependencies": {
>
>        "startupOrders": [
>
>             "cartridge.mongodb,cartridge.mysql"
>
> ],
>
>        "terminationBehaviour": "terminate-dependents",
>
>       * “scaleRatio”: [*
>
> *     “cartridge.mongodb,cartridge.mysql” : “1,1”, *
>
> *        ]*
>
>    }
>
> }
>
>
> Thanks.
>
>
> On Fri, Nov 7, 2014 at 3:49 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>>    -
>>
>>    Scenario 4
>>
>> We can have independent ratios between siblings.
>>
>> ​
>>
>> On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> We have done a design for application scaling.
>>>>
>>>> We can define scaling ratio in the parents. Ratio only applies to the
>>>> immediate children of the group and not further. Cartridge to cartridge
>>>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>>>> Because when we have cartridges and groups as siblings, cartridges will be
>>>> depending on groups always.
>>>>
>>>> Let’s go through some sample scenarios. G* represents groups and C*
>>>> represents cartridges.
>>>>
>>>>
>>>>    -
>>>>
>>>>    Scenario 1
>>>>
>>>>
>>>>
>>>> ​
>>>>
>>>>
>>>>    -
>>>>
>>>>    Scenario 2
>>>>
>>>> We cannot have scale ratio at a parent which only has groups as
>>>> children(G1). If the user needs to have a scale ratio between such
>>>> children, s/he should move children of one of the groups to parent(G1).
>>>>
>>>>
>>>> ​
>>>>
>>>>    -
>>>>
>>>>    Scenario 3
>>>>
>>>> Case where several groups and cartridges are in a parent.
>>>>
>>>> ​
>>>>
>>>> Give your feedback.
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Scale dependency design in Application model

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Here are the jsons with the scale ratio for following scenario,

Application Json,

{

   "applicationId": “app_1”,

   "alias": “tomcatapp",

   "components": {

       "groups": [

           {

               "name": "group1”,

               "alias": "mygroup1”,

               "subscribables": [

    {

                       "type": “mysql”,

                       "alias": "mygroup1mysql”

                   },

                   {

                       "type": “mongodb”,

                       "alias": "mygroup1mongodb”

                   }

               ]

           }

       ],

       "cartridges": [

            "tomcat"

       ]

   },

   "subscribableInfo": [

       {

           "alias": "mygroup1mysql”,

           "deploymentPolicy": "deployment_policy_1",

           "autoscalingPolicy": "autoscale_policy_1"

       },

       {

           "alias": "mygroup1mongodb”,

           "deploymentPolicy": "deployment_policy_1",

           "autoscalingPolicy": "autoscale_policy_1"

       },

       {

           "alias": “mytomcat”,

           "deploymentPolicy": "deployment_policy_1",

           "autoscalingPolicy": "autoscale_policy_1",

           "repoURL": "www.mygit.com/php.git",

           "privateRepo": "true",

           "repoUsername": "admin",

           "repoPassword": "xxxx"

       }

   ],

   "dependencies": {

       "startupOrders": [

            "group.group1,cartridge.tomcat"

],

       "terminationBehaviour": "terminate-dependents”,

*        “scaleRatio”: [*

*     “group.group1,cartridge.tomcat” : “1,3”, *

*        ]*

   }

}

Group 1 Json,

{

   "name": "group1",

   "cartridges": [

       “mysql”,

       “mongodb”

   ],

   "dependencies": {

       "startupOrders": [

            "cartridge.mongodb,cartridge.mysql"

],

       "terminationBehaviour": "terminate-dependents",

      * “scaleRatio”: [*

*     “cartridge.mongodb,cartridge.mysql” : “1,1”, *

*        ]*

   }

}


Thanks.


On Fri, Nov 7, 2014 at 3:49 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
>    -
>
>    Scenario 4
>
> We can have independent ratios between siblings.
>
> ​
>
> On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> We have done a design for application scaling.
>>>
>>> We can define scaling ratio in the parents. Ratio only applies to the
>>> immediate children of the group and not further. Cartridge to cartridge
>>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>>> Because when we have cartridges and groups as siblings, cartridges will be
>>> depending on groups always.
>>>
>>> Let’s go through some sample scenarios. G* represents groups and C*
>>> represents cartridges.
>>>
>>>
>>>    -
>>>
>>>    Scenario 1
>>>
>>>
>>>
>>> ​
>>>
>>>
>>>    -
>>>
>>>    Scenario 2
>>>
>>> We cannot have scale ratio at a parent which only has groups as
>>> children(G1). If the user needs to have a scale ratio between such
>>> children, s/he should move children of one of the groups to parent(G1).
>>>
>>>
>>> ​
>>>
>>>    -
>>>
>>>    Scenario 3
>>>
>>> Case where several groups and cartridges are in a parent.
>>>
>>> ​
>>>
>>> Give your feedback.
>>>
>>> Thanks.
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Scale dependency design in Application model

Posted by Lahiru Sandaruwan <la...@wso2.com>.
   -

   Scenario 4

We can have independent ratios between siblings.

​

On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
> On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> We have done a design for application scaling.
>>
>> We can define scaling ratio in the parents. Ratio only applies to the
>> immediate children of the group and not further. Cartridge to cartridge
>> ratio can be anything where Group to cartridge ratio should be 1:* always.
>> Because when we have cartridges and groups as siblings, cartridges will be
>> depending on groups always.
>>
>> Let’s go through some sample scenarios. G* represents groups and C*
>> represents cartridges.
>>
>>
>>    -
>>
>>    Scenario 1
>>
>>
>>
>> ​
>>
>>
>>    -
>>
>>    Scenario 2
>>
>> We cannot have scale ratio at a parent which only has groups as
>> children(G1). If the user needs to have a scale ratio between such
>> children, s/he should move children of one of the groups to parent(G1).
>>
>>
>> ​
>>
>>    -
>>
>>    Scenario 3
>>
>> Case where several groups and cartridges are in a parent.
>>
>> ​
>>
>> Give your feedback.
>>
>> Thanks.
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Scale dependency design in Application model

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi all,
>
> We have done a design for application scaling.
>
> We can define scaling ratio in the parents. Ratio only applies to the
> immediate children of the group and not further. Cartridge to cartridge
> ratio can be anything where Group to cartridge ratio should be 1:* always.
> Because when we have cartridges and groups as siblings, cartridges will be
> depending on groups always.
>
> Let’s go through some sample scenarios. G* represents groups and C*
> represents cartridges.
>
>
>    -
>
>    Scenario 1
>
>
>
> ​
>
>
>    -
>
>    Scenario 2
>
> We cannot have scale ratio at a parent which only has groups as
> children(G1). If the user needs to have a scale ratio between such
> children, s/he should move children of one of the groups to parent(G1).
>
>
> ​
>
>    -
>
>    Scenario 3
>
> Case where several groups and cartridges are in a parent.
>
> ​
>
> Give your feedback.
>
> Thanks.
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146