Hi,

As per some offline discussions, it seems this logic was introduced to
avoid longer wait time until complete topology and complete application
model is initialized in SM. If that is the case then it will be addressed
by topology initialize optimization improvement. So we should be able to
remove this logic in CC and AS, in which scheduleEventSynchronizers call is
blocked until SM is activated.

Note that component startup order; CC -> AS -> SM will remain as it is.

@Imesh: could you please clarify?

Thanks.

On Mon, Nov 9, 2015 at 1:16 PM, Gayan Gunarathne <gay...@wso2.com> wrote:

> I think this is to preserve the startup order of the component. But I
> don't see the reason for do this. Currently  we are control this by
> checking the Stratos component startup synchronize enabled.
>
>  if (componentStartUpSynchronizer.isEnabled()) {
>             componentStartUpSynchronizer.addEventListener(new
> ComponentActivationEventListener() {
>                 @Override
>                 public void activated(Component component) {
>                     if (component == Component.StratosManager) {
>                         scheduleEventSynchronizers();
>                     }
>                 }
>             });
>         } else {
>             scheduleEventSynchronizers();
>         }
>
> As per the logic I can see if componentStartUpSynchronizer is enable only
> we are checking for the ComponentActivationEventListener. Otherwise we are
> schedule Event Synchronizers directly.
> IMHO we can directly schedule the event synchronizers  without waiting for
> the SM.
>
> Thanks,
> Gayan
> --
>
> On Sun, Nov 8, 2015 at 11:13 PM, Akila Ravihansa Perera <
> raviha...@wso2.com> wrote:
>
>> Hi Imesh,
>>
>> I noticed that ComponentActivationEventListener's registered in
>> AutoScaler and CloudController components are waiting for StratosManager
>> component to be activated to schedule synchronization tasks [1, 2]. Is this
>> the expected behavior?
>>
>> From what I understood, synchronization tasks related to each component
>> should be started once the corresponding component is activated. There is
>> no need to wait for SM to be activated. Am I missing something?
>>
>> [1]
>> https://github.com/apache/stratos/blob/stratos-4.1.x/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java#L179
>>
>> [2]
>> https://github.com/apache/stratos/blob/stratos-4.1.x/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java#L233
>>
>> Thanks.
>>
>> --
>> Akila Ravihansa Perera
>> WSO2 Inc.;  http://wso2.com/
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>
>
>



-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com

Reply via email to