Hi Imesh,

Thanks for the clarification. I've removed this logic that forced CC and AS
to wait for SM to be activated to schedule sync tasks. This is not needed
since SM can initialize the topology and application models on-demand.

Thanks.

On Tue, Nov 10, 2015 at 4:12 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Akila,
>
> Yes as I can recall this logic was introduced as a part of the component
> synchronization process to make sure that topology and application managers
> get initialized soon after SM gets activated. Otherwise once SM becomes
> active the Stratos API will be accessible to the endusers and it would not
> return proper values until topology and application managers get
> initialized in SM.
>
> Correct, this logic will not be needed anymore with the introduction of
> the topology initialization improvement.
>
> Thanks
>
> On Mon, Nov 9, 2015 at 4:57 AM, Akila Ravihansa Perera <raviha...@wso2.com
> > wrote:
>
>> 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
>>
>
>
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



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

Blog: http://ravihansa3000.blogspot.com

Reply via email to