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/09/24 13:00:44 UTC

Tenant and Topology Event order

Hi,

AFAIK CompleteTenantEvent is published with a small interval in between
with the tenant details. From the spawned cartridge's point, is it possible
to receive a tenant event depending on the tenant details, before a
CompleteTenantEvent?

What my concern here is that, if cartridge agent should keep aside
processing of an event received before the tenant list is populated, until
the CompleteTenantEvent is received.

Please note that, this dependency on the CompleteTenantEvent (and the
CompleteTopologyEvent) is until the metadata service starts providing
endpoints to directly query tenant and topology information.

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

Re: Tenant and Topology Event order

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Chamila,

We have implement listing tenant details in CLI. You can find the code from
[1].

[1]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java#L1111

Thanks !


On Wed, Sep 24, 2014 at 5:18 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Udara,
>
>
> The existing client doesn't wait for the CompleteTenantEvent to start
> executing the other tenant event related code.
>
> I agree the best course now is to implement a method to call the REST API
> and get the list of tenants. This will be easily changed when the metadata
> service starts providing the service.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Wed, Sep 24, 2014 at 5:11 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Chamila,
>>
>> For the time being you can get the tenant details by calling  Stratos
>> REST API (admin/tenant/list). Later those you will be added to metadata
>> service.
>>
>> How this scenario is handled by existing Java agent?
>>
>>
>>
>> On Wed, Sep 24, 2014 at 4:30 PM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> AFAIK CompleteTenantEvent is published with a small interval in between
>>> with the tenant details. From the spawned cartridge's point, is it possible
>>> to receive a tenant event depending on the tenant details, before a
>>> CompleteTenantEvent?
>>>
>>> What my concern here is that, if cartridge agent should keep aside
>>> processing of an event received before the tenant list is populated, until
>>> the CompleteTenantEvent is received.
>>>
>>> Please note that, this dependency on the CompleteTenantEvent (and the
>>> CompleteTopologyEvent) is until the metadata service starts providing
>>> endpoints to directly query tenant and topology information.
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Tenant and Topology Event order

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


The existing client doesn't wait for the CompleteTenantEvent to start
executing the other tenant event related code.

I agree the best course now is to implement a method to call the REST API
and get the list of tenants. This will be easily changed when the metadata
service starts providing the service.


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



On Wed, Sep 24, 2014 at 5:11 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Chamila,
>
> For the time being you can get the tenant details by calling  Stratos REST
> API (admin/tenant/list). Later those you will be added to metadata service.
>
> How this scenario is handled by existing Java agent?
>
>
>
> On Wed, Sep 24, 2014 at 4:30 PM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi,
>>
>> AFAIK CompleteTenantEvent is published with a small interval in between
>> with the tenant details. From the spawned cartridge's point, is it possible
>> to receive a tenant event depending on the tenant details, before a
>> CompleteTenantEvent?
>>
>> What my concern here is that, if cartridge agent should keep aside
>> processing of an event received before the tenant list is populated, until
>> the CompleteTenantEvent is received.
>>
>> Please note that, this dependency on the CompleteTenantEvent (and the
>> CompleteTopologyEvent) is until the metadata service starts providing
>> endpoints to directly query tenant and topology information.
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>

Re: Tenant and Topology Event order

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

For the time being you can get the tenant details by calling  Stratos REST
API (admin/tenant/list). Later those you will be added to metadata service.

How this scenario is handled by existing Java agent?



On Wed, Sep 24, 2014 at 4:30 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi,
>
> AFAIK CompleteTenantEvent is published with a small interval in between
> with the tenant details. From the spawned cartridge's point, is it possible
> to receive a tenant event depending on the tenant details, before a
> CompleteTenantEvent?
>
> What my concern here is that, if cartridge agent should keep aside
> processing of an event received before the tenant list is populated, until
> the CompleteTenantEvent is received.
>
> Please note that, this dependency on the CompleteTenantEvent (and the
> CompleteTopologyEvent) is until the metadata service starts providing
> endpoints to directly query tenant and topology information.
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 

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

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