You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Reka Thirunavukkarasu <re...@wso2.com> on 2014/11/14 07:26:40 UTC

Reduce the Cartridge agent waiting time for the Complete Topology

Hi

Since we have CA also listening to Topology now, CA is taking ~1 minute to
receive the complete Topology as we send the Complete Topology in every 1
min. Can we reduce this by introducing a new topic where CA can publish an
event by stating that it is up? So, CC can listen on that topic and
immediately send the complete Topology. This topic can be used by all other
subscribers of Topology who require Complete Topology.

Would this be a feasible approach to reduce the waiting time to get the
Complete Topology? or Is it better to send  the Complete Topology in every
30s/15s?

Thanks,
Reka


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Reduce the Cartridge agent waiting time for the Complete Topology

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Chamila

On Fri, Nov 14, 2014 at 12:47 PM, Chamila De Alwis <ch...@wso2.com>
wrote:

>
> On Fri, Nov 14, 2014 at 12:15 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Is timeout is configurable?
>
>
> There is no timeout for waiting until the CompleteTopologyEvent with self
> member Id right now. The CA will wait for the updated topology forever.
> Even if the CompleteTopologyEvent is received, if it doesn't has the member
> Id in its topology it will wait till it is added, but I guess that is a
> rare path.
>
> As for the time it takes to get the update topology, I guess this would
> affect badly for the container scenario where pre-configured container can
> be spawned within seconds. In that case, is there a possibility to handle
> this in an ad-hoc manner for containers?
>

Yah..This will definitely affect the container much. We need to find a
solution to get the Complete Topology on demand.

Thanks,
Reka

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


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Reduce the Cartridge agent waiting time for the Complete Topology

Posted by Chamila De Alwis <ch...@wso2.com>.
On Fri, Nov 14, 2014 at 12:15 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Is timeout is configurable?


There is no timeout for waiting until the CompleteTopologyEvent with self
member Id right now. The CA will wait for the updated topology forever.
Even if the CompleteTopologyEvent is received, if it doesn't has the member
Id in its topology it will wait till it is added, but I guess that is a
rare path.

As for the time it takes to get the update topology, I guess this would
affect badly for the container scenario where pre-configured container can
be spawned within seconds. In that case, is there a possibility to handle
this in an ad-hoc manner for containers?


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

Re: Reduce the Cartridge agent waiting time for the Complete Topology

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Udara,

On Fri, Nov 14, 2014 at 12:15 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Reka,
>
> Then CC does not publish complete topology periodically?
> Reducing event publish timeout adds overhead to the MQTT broker. It
> depends on the network, for fast networks it is ok.
> Is timeout is configurable? if not we can make it configurable and let the
> user decide it depending on their network.
>
We have a cron job scheduled to send the Complete Topology. So, not sure
whether we can make it to send in seconds..Also, since Complete Topology is
considerably large one, sending it frequently may affect the broker as we
are using matt which is to send small events.

Thanks,
Reka

>
> On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Hi
>>
>> Since we have CA also listening to Topology now, CA is taking ~1 minute
>> to receive the complete Topology as we send the Complete Topology in every
>> 1 min. Can we reduce this by introducing a new topic where CA can publish
>> an event by stating that it is up? So, CC can listen on that topic and
>> immediately send the complete Topology. This topic can be used by all other
>> subscribers of Topology who require Complete Topology.
>>
>> Would this be a feasible approach to reduce the waiting time to get the
>> Complete Topology? or Is it better to send  the Complete Topology in every
>> 30s/15s?
>>
>> Thanks,
>> Reka
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Reduce the Cartridge agent waiting time for the Complete Topology

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

Then CC does not publish complete topology periodically?
Reducing event publish timeout adds overhead to the MQTT broker. It depends
on the network, for fast networks it is ok.
Is timeout is configurable? if not we can make it configurable and let the
user decide it depending on their network.

On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi
>
> Since we have CA also listening to Topology now, CA is taking ~1 minute to
> receive the complete Topology as we send the Complete Topology in every 1
> min. Can we reduce this by introducing a new topic where CA can publish an
> event by stating that it is up? So, CC can listen on that topic and
> immediately send the complete Topology. This topic can be used by all other
> subscribers of Topology who require Complete Topology.
>
> Would this be a feasible approach to reduce the waiting time to get the
> Complete Topology? or Is it better to send  the Complete Topology in every
> 30s/15s?
>
> Thanks,
> Reka
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>


-- 

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

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

Re: Reduce the Cartridge agent waiting time for the Complete Topology

Posted by Imesh Gunaratne <im...@apache.org>.
Yes exactly, the complete topology event publisher might need to wait for
certain time period (may be few seconds) for complete topology request
messages before publishing. Otherwise it may publish the same message
number of times unnecessarily.

On Fri, Nov 14, 2014 at 11:37 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> When a message is sent it is received by all subscribers. So we don't need
> to send multiple times for multiple requests, isn't it Imesh?
>
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
> On Nov 14, 2014 11:15 PM, "Imesh Gunaratne" <im...@apache.org> wrote:
>
>> Hi Reka,
>>
>> On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
>> wrote:
>>
>> Since we have CA also listening to Topology now, CA is taking ~1 minute
>> to receive the complete Topology as we send the Complete Topology in every
>> 1 min. Can we reduce this by introducing a new topic where CA can publish
>> an event by stating that it is up? So, CC can listen on that topic and
>> immediately send the complete Topology. This topic can be used by all other
>> subscribers of Topology who require Complete Topology.
>>
>> +1 I like this idea! We might need to analyze this solution in detail.
>> What if multiple topology subscribers send this request message at the same
>> time?
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Reduce the Cartridge agent waiting time for the Complete Topology

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

When a message is sent it is received by all subscribers. So we don't need
to send multiple times for multiple requests, isn't it Imesh?



Touched, not typed. Erroneous words are a feature, not a typo.
On Nov 14, 2014 11:15 PM, "Imesh Gunaratne" <im...@apache.org> wrote:

> Hi Reka,
>
> On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
> Since we have CA also listening to Topology now, CA is taking ~1 minute to
> receive the complete Topology as we send the Complete Topology in every 1
> min. Can we reduce this by introducing a new topic where CA can publish an
> event by stating that it is up? So, CC can listen on that topic and
> immediately send the complete Topology. This topic can be used by all other
> subscribers of Topology who require Complete Topology.
>
> +1 I like this idea! We might need to analyze this solution in detail.
> What if multiple topology subscribers send this request message at the same
> time?
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Re: Reduce the Cartridge agent waiting time for the Complete Topology

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Reka,

On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

Since we have CA also listening to Topology now, CA is taking ~1 minute to
receive the complete Topology as we send the Complete Topology in every 1
min. Can we reduce this by introducing a new topic where CA can publish an
event by stating that it is up? So, CC can listen on that topic and
immediately send the complete Topology. This topic can be used by all other
subscribers of Topology who require Complete Topology.

+1 I like this idea! We might need to analyze this solution in detail. What
if multiple topology subscribers send this request message at the same time?


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Reduce the Cartridge agent waiting time for the Complete Topology

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

This is a good discussion point.

On Fri, Nov 14, 2014 at 11:56 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi
>
> Since we have CA also listening to Topology now, CA is taking ~1 minute to
> receive the complete Topology as we send the Complete Topology in every 1
> min. Can we reduce this by introducing a new topic where CA can publish an
> event by stating that it is up? So, CC can listen on that topic and
> immediately send the complete Topology. This topic can be used by all other
> subscribers of Topology who require Complete Topology.
>
Usually a MB is used to pump events when they are available. I'm not sure
if we can get on-demand information from a MB like you have explained here.
In this case, do we need to persist the Topology at the MB as well?

Would this be a feasible approach to reduce the waiting time to get the
> Complete Topology? or Is it better to send  the Complete Topology in every
> 30s/15s?
>
 IMHO sending the complete Topology each 30/15 seconds can sort of flood
the network, specially when the Topology is large.

How about making the Topology accessible via a service endpoint to get the
relevant information? We do not have to have two topologies, but can re-use
the CC's Topology.

>
> Thanks,
> Reka
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
> --
> <%2B94776442007>
> <%2B94776442007>
> Thanks and Regards,
>
> Isuru H.
> <%2B94776442007>
> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>