Just to clarify, this is a configuration which is specific for this algorithm. The same application policy JSON definition can be used for defining different network partition algorithms.
The idea of introducing the property "networkPartitionGroups" is to make the concept clear for the user. Otherwise it would be confusing to define both network partitions and network partition groups on the same JSON element. Thanks On Mon, Mar 9, 2015 at 1:02 PM, Gayan Gunarathne <[email protected]> wrote: > Great thoughts to include the group of network partitions. > > Can't we have that group thing in the "networkPartitions" array > > eg : > > "networkPartitions":[ > "network-partition-1&network-partition-2", > "network-partition-3", > "network-partition-4" > ] > > > IMO If we add the "networkPartitionGroups" in the properties array it > will be confused the end user. > > Thanks, > Gayan > > > On Mon, Mar 9, 2015 at 12:57 PM, Rajkumar Rajaratnam <[email protected]> > wrote: > >> May be we can use & as a separator. WDYT? >> >> And support to burst in either of network-partition-4 or >> network-partition-5 can be easily implemented, if we have some factors to >> decide which network partition to choose from the group in an iteration. >> But note that these two network partitions are fresh network partitions. >> They are not used in any iteration. >> >> I have another concern. Say we have somehow decided network-partition-5 >> in an iteration. But we will not select network-partition-4 in the next >> iteration. We will go to next network partition groups in next iteration >> (because, that is what one-after-another is). >> >> Thanks. >> >> On Mon, Mar 9, 2015 at 12:29 PM, Rajkumar Rajaratnam <[email protected]> >> wrote: >> >>> Okay. Seems you are confused with bit wise OR operator :). We just used >>> pipe character as a separator, not to meant OR. >>> >>> There is a small issue in supporting to burst either in >>> network-partition-4 or network-partition-5. How stratos will decide which >>> one to use in an iteration? >>> >>> On Mon, Mar 9, 2015 at 12:19 PM, Sajith Kariyawasam <[email protected]> >>> wrote: >>> >>>> Great! :) >>>> >>>> Couldn't we improve that by using '&' for AND and '|' for OR ? >>>> As I understood your implementation supports AND only, and is >>>> represented by '|'. >>>> Couldn't there be a requirement , say, 2nd app burst in either >>>> network-partition-4 *or* network-partition-5 ? >>>> >>>> >>>> On Mon, Mar 9, 2015 at 12:11 PM, Rajkumar Rajaratnam < >>>> [email protected]> wrote: >>>> >>>>> Hi Devs, >>>>> >>>>> I have extended one-after-another algorithm to support any app >>>>> bursting pattern of your choice. >>>>> >>>>> { >>>>> "id": "application-policy-4", >>>>> "algorithm":"one-after-another", >>>>> "networkPartitions":[ >>>>> "network-partition-1", >>>>> "network-partition-2", >>>>> "network-partition-3", >>>>> "network-partition-4" >>>>> ], >>>>> "properties":[ >>>>> { >>>>> "name": "networkPartitionGroups", >>>>> "value": "network-partition-1|network-partition-2, >>>>> network-partition-3, network-partition-4|network-partition-5" >>>>> }, >>>>> { >>>>> "name": "key-2", >>>>> "value": "value-2" >>>>> }, >>>>> ] >>>>> } >>>>> >>>>> The property "networkPartitionGroups" can be used to configure your >>>>> app bursting pattern for one-after-another network partition algorithm. >>>>> You >>>>> can group network partitions using a pipe character and you can separate >>>>> network partition groups using a comma character. Stratos will create >>>>> application instances in network partition groups in each app bursting >>>>> iteration. >>>>> >>>>> For example, according to above application policy; >>>>> >>>>> - Initially stratos will create 2 application instances, each in >>>>> network-partition-1 and network-partition-2 >>>>> - In the 1st app bursting iteration, it will create an application >>>>> instance in network-partition-3 >>>>> - In the 2nd app bursting iteration, it will create 2 application >>>>> instances, each in network-partition-4 and network-partition-5 >>>>> >>>>> So at the end of 2nd app bursting iteration, we will have 5 >>>>> application instances running. There is no app bursting after that. >>>>> For more information, refer app-bursting-pattern sample application [1] >>>>> >>>>> 1. >>>>> https://github.com/apache/stratos/tree/master/samples/applications/app-bursting-pattern >>>>> >>>>> Thanks. >>>>> >>>>> -- >>>>> Rajkumar Rajaratnam >>>>> Committer & PMC Member, Apache Stratos >>>>> Software Engineer, WSO2 >>>>> >>>>> Mobile : +94777568639 >>>>> Blog : rajkumarr.com >>>>> >>>> >>>> >>> >>> >>> -- >>> Rajkumar Rajaratnam >>> Committer & PMC Member, Apache Stratos >>> Software Engineer, WSO2 >>> >>> Mobile : +94777568639 >>> Blog : rajkumarr.com >>> >> >> >> >> -- >> Rajkumar Rajaratnam >> Committer & PMC Member, Apache Stratos >> Software Engineer, WSO2 >> >> Mobile : +94777568639 >> Blog : rajkumarr.com >> > > > > -- > > Gayan Gunarathne > Technical Lead > WSO2 Inc. (http://wso2.com) > email : [email protected] | mobile : +94 766819985 > > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos
