You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Chamila De Alwis <ch...@wso2.com> on 2014/11/21 22:44:39 UTC

Use of CompleteTopologyEvent to update member information

Hi,

Is the $subject reasonable at a point when there is no event to represent a
specific change done to a particular member?

The scenario is a component whose topology information is outdated because
when a particular state change is done a corresponding event is not being
fired.

Or is the idea to use Member{Status}Event to broadcast a member status
change among the listeners?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Use of CompleteTopologyEvent to update member information

Posted by Chamila De Alwis <ch...@wso2.com>.
On Sun, Nov 23, 2014 at 5:10 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> According to the current model, we are notifying event listeners to on an
> update. So, if we use Complete topology event to recover the missing
> events, then we need a way to identify the missing events by looking at the
> topology, and that would be tricky.
>

One workaround would be for components to refresh the topology model by re
initializing with the ConpleteTopologyEvent in a larger interval. Of course
this will be a temporary workaround.

The scenario I came across was the StratosManager's topology not being
updated when a member's status is changed by CC. If a certain event is
lost, then the API will reflect incorrect topology state.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Use of CompleteTopologyEvent to update member information

Posted by Nirmal Fernando <ni...@gmail.com>.
According to the current model, we are notifying event listeners to on an
update. So, if we use Complete topology event to recover the missing
events, then we need a way to identify the missing events by looking at the
topology, and that would be tricky.

One would argue that if we use reliable messaging, we shouldn't be losing
any events?! May be this is what we need  to check.

On Sun, Nov 23, 2014 at 6:06 AM, Akila Ravihansa Perera <ra...@wso2.com>
wrote:

> Hi Chamila,
>
> Yes, a corresponding event must be fired on member status change.
> Furthermore, you need to think about scenarios in which those events can be
> lost (due to network failures). We identified some scenarios in current
> Stratos model in which event losses can cause the system to go into an
> inconsistent state. We need to handle those edge cases as well.
>
> IMHO, I feel we need to rethink the current topology based messaging model.
>
> Thanks.
>
>
>
> On Fri, Nov 21, 2014 at 10:08 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> Otherwise others will have different states.
>>
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>> On Nov 22, 2014 10:33 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>>
>>> Sorry, accidentally clipped this part from the previous email.
>>>
>>> What my concern is that whenever we change the state of a member in the
>>> cloud controller, should we send a corresponding event to let the
>>> components update their model?
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>> On Sat, Nov 22, 2014 at 10:16 AM, Chamila De Alwis <ch...@wso2.com>
>>> wrote:
>>>
>>>> Hi Udara,
>>>>
>>>> Yes, that is how it is done. When the first CompleteTopologyEvent is
>>>> received, the topology is updated and a flag is set to stop further
>>>> processing of the event.
>>>>
>>>>
>>>> Regards,
>>>> Chamila de Alwis
>>>> Software Engineer | WSO2 | +94772207163
>>>> Blog: code.chamiladealwis.com
>>>>
>>>>
>>>>
>>>> On Sat, Nov 22, 2014 at 7:24 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi Chamila,
>>>>>
>>>>> Component first wait for complete topology to build its in memory
>>>>> model. Later individual events update the in memory model. That's the
>>>>> current model. I am not sure whether components update its in memory upon
>>>>> each Complete topology event receiving, I guess it need not to.
>>>>>
>>>>>
>>>>>
>>>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>>> On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Is the $subject reasonable at a point when there is no event to
>>>>>> represent a specific change done to a particular member?
>>>>>>
>>>>>> The scenario is a component whose topology information is outdated
>>>>>> because when a particular state change is done a corresponding event is not
>>>>>> being fired.
>>>>>>
>>>>>> Or is the idea to use Member{Status}Event to broadcast a member
>>>>>> status change among the listeners?
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Chamila de Alwis
>>>>>> Software Engineer | WSO2 | +94772207163
>>>>>> Blog: code.chamiladealwis.com
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>
>
> --
> Akila Ravihansa Perera
> Software Engineer, WSO2
>
> Blog: http://ravihansa3000.blogspot.com
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Use of CompleteTopologyEvent to update member information

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
Hi Chamila,

Yes, a corresponding event must be fired on member status change.
Furthermore, you need to think about scenarios in which those events can be
lost (due to network failures). We identified some scenarios in current
Stratos model in which event losses can cause the system to go into an
inconsistent state. We need to handle those edge cases as well.

IMHO, I feel we need to rethink the current topology based messaging model.

Thanks.



On Fri, Nov 21, 2014 at 10:08 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> Otherwise others will have different states.
>
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
> On Nov 22, 2014 10:33 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>
>> Sorry, accidentally clipped this part from the previous email.
>>
>> What my concern is that whenever we change the state of a member in the
>> cloud controller, should we send a corresponding event to let the
>> components update their model?
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Sat, Nov 22, 2014 at 10:16 AM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>> Hi Udara,
>>>
>>> Yes, that is how it is done. When the first CompleteTopologyEvent is
>>> received, the topology is updated and a flag is set to stop further
>>> processing of the event.
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>> On Sat, Nov 22, 2014 at 7:24 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Chamila,
>>>>
>>>> Component first wait for complete topology to build its in memory
>>>> model. Later individual events update the in memory model. That's the
>>>> current model. I am not sure whether components update its in memory upon
>>>> each Complete topology event receiving, I guess it need not to.
>>>>
>>>>
>>>>
>>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>> On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Is the $subject reasonable at a point when there is no event to
>>>>> represent a specific change done to a particular member?
>>>>>
>>>>> The scenario is a component whose topology information is outdated
>>>>> because when a particular state change is done a corresponding event is not
>>>>> being fired.
>>>>>
>>>>> Or is the idea to use Member{Status}Event to broadcast a member status
>>>>> change among the listeners?
>>>>>
>>>>>
>>>>> Regards,
>>>>> Chamila de Alwis
>>>>> Software Engineer | WSO2 | +94772207163
>>>>> Blog: code.chamiladealwis.com
>>>>>
>>>>>
>>>>>
>>>
>>


-- 
Akila Ravihansa Perera
Software Engineer, WSO2

Blog: http://ravihansa3000.blogspot.com

Re: Use of CompleteTopologyEvent to update member information

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

Otherwise others will have different states.



Touched, not typed. Erroneous words are a feature, not a typo.
On Nov 22, 2014 10:33 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:

> Sorry, accidentally clipped this part from the previous email.
>
> What my concern is that whenever we change the state of a member in the
> cloud controller, should we send a corresponding event to let the
> components update their model?
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Sat, Nov 22, 2014 at 10:16 AM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi Udara,
>>
>> Yes, that is how it is done. When the first CompleteTopologyEvent is
>> received, the topology is updated and a flag is set to stop further
>> processing of the event.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Sat, Nov 22, 2014 at 7:24 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Chamila,
>>>
>>> Component first wait for complete topology to build its in memory model.
>>> Later individual events update the in memory model. That's the current
>>> model. I am not sure whether components update its in memory upon each
>>> Complete topology event receiving, I guess it need not to.
>>>
>>>
>>>
>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>> On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Is the $subject reasonable at a point when there is no event to
>>>> represent a specific change done to a particular member?
>>>>
>>>> The scenario is a component whose topology information is outdated
>>>> because when a particular state change is done a corresponding event is not
>>>> being fired.
>>>>
>>>> Or is the idea to use Member{Status}Event to broadcast a member status
>>>> change among the listeners?
>>>>
>>>>
>>>> Regards,
>>>> Chamila de Alwis
>>>> Software Engineer | WSO2 | +94772207163
>>>> Blog: code.chamiladealwis.com
>>>>
>>>>
>>>>
>>
>

Re: Use of CompleteTopologyEvent to update member information

Posted by Chamila De Alwis <ch...@wso2.com>.
Sorry, accidentally clipped this part from the previous email.

What my concern is that whenever we change the state of a member in the
cloud controller, should we send a corresponding event to let the
components update their model?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Sat, Nov 22, 2014 at 10:16 AM, Chamila De Alwis <ch...@wso2.com>
wrote:

> Hi Udara,
>
> Yes, that is how it is done. When the first CompleteTopologyEvent is
> received, the topology is updated and a flag is set to stop further
> processing of the event.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Sat, Nov 22, 2014 at 7:24 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Chamila,
>>
>> Component first wait for complete topology to build its in memory model.
>> Later individual events update the in memory model. That's the current
>> model. I am not sure whether components update its in memory upon each
>> Complete topology event receiving, I guess it need not to.
>>
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>> On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Is the $subject reasonable at a point when there is no event to
>>> represent a specific change done to a particular member?
>>>
>>> The scenario is a component whose topology information is outdated
>>> because when a particular state change is done a corresponding event is not
>>> being fired.
>>>
>>> Or is the idea to use Member{Status}Event to broadcast a member status
>>> change among the listeners?
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>

Re: Use of CompleteTopologyEvent to update member information

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Udara,

Yes, that is how it is done. When the first CompleteTopologyEvent is
received, the topology is updated and a flag is set to stop further
processing of the event.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Sat, Nov 22, 2014 at 7:24 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Chamila,
>
> Component first wait for complete topology to build its in memory model.
> Later individual events update the in memory model. That's the current
> model. I am not sure whether components update its in memory upon each
> Complete topology event receiving, I guess it need not to.
>
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
> On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:
>
>> Hi,
>>
>> Is the $subject reasonable at a point when there is no event to represent
>> a specific change done to a particular member?
>>
>> The scenario is a component whose topology information is outdated
>> because when a particular state change is done a corresponding event is not
>> being fired.
>>
>> Or is the idea to use Member{Status}Event to broadcast a member status
>> change among the listeners?
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>

Re: Use of CompleteTopologyEvent to update member information

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

Component first wait for complete topology to build its in memory model.
Later individual events update the in memory model. That's the current
model. I am not sure whether components update its in memory upon each
Complete topology event receiving, I guess it need not to.



Touched, not typed. Erroneous words are a feature, not a typo.
On Nov 22, 2014 3:16 AM, "Chamila De Alwis" <ch...@wso2.com> wrote:

> Hi,
>
> Is the $subject reasonable at a point when there is no event to represent
> a specific change done to a particular member?
>
> The scenario is a component whose topology information is outdated because
> when a particular state change is done a corresponding event is not being
> fired.
>
> Or is the idea to use Member{Status}Event to broadcast a member status
> change among the listeners?
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>