On Wed, Mar 22, 2017 at 10:51 AM, Jasintha Dasanayake <jasin...@wso2.com>
wrote:

> Hi Sinthuja
>
> On Tue, Mar 21, 2017 at 4:23 PM, Sinthuja Ragendran <sinth...@wso2.com>
> wrote:
>
>> Hi Jasintha,
>>
>> I have a concern on how are we going to handle already created tenants if
>> we are going to go with different receiver configurations per tenant? It
>> works for the case if this component is attached for the server runtime
>> from the initial stages, but if it is to be incorporated into an already
>> running system then how that the tenanted receiver artefact is going to be
>> connected? Are you planning to add some component into analytics server
>> side, to create the receiver configurations for all tenants? I would prefer
>> this logic to be handled within the custom new receiver implementation,
>> hence if such receiver configuration is there, automatically the required
>> logic will be executed, and we can handle all those necessary checks and
>> validation in the receiver implementation.
>>
>> In this scenario , all the existing tenants also need to login to the
> device cloud and activate androidsens for their devices at that time we
> create the receiver, (it won't be by default activate for all tenants)
>

We can use this as a quick solution to get the things working without
introducing changes to DAS. I think in the long run we have to do a custom
receiver implementation, which runs in super tenant mode and subscribes to
topics on behalf of tenants. We may also have to change DAS deployers to
pick receiver configurations and inform the custom receiver implementation
to subscribe to relevant topics. In that way, we can avoid invoking admin
services to create receivers whenever a tenant has to be loaded.

- Chathura


>
>> On Tue, Mar 21, 2017 at 4:03 PM, Jasintha Dasanayake <jasin...@wso2.com>
>> wrote:
>>
>>> HI
>>>
>>> Thanks for all feedback , So I am going to implement this by creating
>>> event receiver configuration dynamically for each tenant and deploying into
>>> DAS using the event receiver admin service. As Mohan mentioned , IMO
>>> keeping a per tenant receiver will be a better option because an existing
>>> subscriptions will not be effected when adding/removing another tenant's
>>> artifacts.
>>>
>>
>> IMHO if you have one receiver configuration/or seperate receiver
>> configuration doesn't make a difference here, in both cases any tenanted
>> behaviour will not interfere with other.
>>
>> Additionally, if you are going with seperate receiver configurations per
>> tenant, then you need to make sure, that you don't create multiple receiver
>> configurations for same tenant.
>>
>
> By design in the IOT users won't be able to activate it more than one time.
>
> Thanks and Regards
> /Jasintha
>
>>
>> Thanks,
>> Sinthuja.
>>
>>
>>>
>>> Thanks
>>> /Jasintha
>>>
>>> On Tue, Mar 21, 2017 at 11:27 AM, Anjana Fernando <anj...@wso2.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Mon, Mar 20, 2017 at 11:02 AM, Sinthuja Ragendran <sinth...@wso2.com
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> As the receiver configurations are deployable artefacts, those will be
>>>>> active when the tenant is loaded. One approach is to have all tenants
>>>>> loaded indefinitely. I think this will have high memory. And therefore we
>>>>> internally discussed below approach to handling this problem.
>>>>>
>>>>> Instead of having multiple MQTT receiver configurations per tenant to
>>>>> handle this, implement a specialised/privileged MQTT event receiver which
>>>>> could handle multiple subscriptions on behalf of tenants, and it's only
>>>>> deployable in the super tenant mode. In that case, this event receiver 
>>>>> will
>>>>> have the topic URI with {tenantDomain} placeholder and it is used to
>>>>> subscribe to the specific tenanted topic. And then, based on which topic
>>>>> the event has arrived the tenant flow will be started and an event will be
>>>>> inserted into specific tenant space. By this way, only the tenants which
>>>>> are actively used/sending events will be loaded, and not all tenants are
>>>>> required to be loaded.
>>>>>
>>>>> Please share your thoughts on this. Also, AFAIR we had the similar
>>>>> requirement for Task execution. @Anjana, how are we handling that?
>>>>>
>>>>
>>>> Yes, the tasks and their definitions are stored in the super tenant
>>>> space. So they get triggered appropriately, and as required, any tenant
>>>> specific resources would be loaded by the task implementation.
>>>>
>>>> Cheers,
>>>> Anjana.
>>>>
>>>>
>>>>>
>>>>> Thanks,
>>>>> Sinthuja.
>>>>>
>>>>> On Mon, Mar 20, 2017 at 10:50 AM, Jasintha Dasanayake <
>>>>> jasin...@wso2.com> wrote:
>>>>>
>>>>>> HI All
>>>>>>
>>>>>> When DAS working in tenant mode and a particular tenant has MQTT
>>>>>> receivers, those cannot be activated once tenants get unloaded. For an
>>>>>> example , if I restart the DAS then those tenants specific MQTT receivers
>>>>>> are not loaded unless we explicitly load that particular tenant. IMO,
>>>>>> expected behavior would be, those receivers should be loaded and 
>>>>>> subscribed
>>>>>> to a particular topic without loading the tenants explicitly.
>>>>>>
>>>>>> Are there any known mechanism to address this particular problem ?
>>>>>>
>>>>>> Thanks and Regards
>>>>>> /jasintha
>>>>>>
>>>>>> --
>>>>>>
>>>>>> *Jasintha Dasanayake**Associate Technical Lead*
>>>>>>
>>>>>> *WSO2 Inc. | http://wso2.com <http://wso2.com/>lean . enterprise .
>>>>>> middleware*
>>>>>>
>>>>>>
>>>>>> *mobile :- 0711-368-118 <071%20136%208118>*
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Sinthuja Rajendran*
>>>>> Technical Lead
>>>>> WSO2, Inc.:http://wso2.com
>>>>>
>>>>> Blog: http://sinthu-rajan.blogspot.com/
>>>>> Mobile: +94774273955 <077%20427%203955>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Anjana Fernando*
>>>> Associate Director / Architect
>>>> WSO2 Inc. | http://wso2.com
>>>> lean . enterprise . middleware
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Jasintha Dasanayake**Associate Technical Lead*
>>>
>>> *WSO2 Inc. | http://wso2.com <http://wso2.com/>lean . enterprise .
>>> middleware*
>>>
>>>
>>> *mobile :- 0711-368-118 <071%20136%208118>*
>>>
>>
>>
>>
>> --
>> *Sinthuja Rajendran*
>> Technical Lead
>> WSO2, Inc.:http://wso2.com
>>
>> Blog: http://sinthu-rajan.blogspot.com/
>> Mobile: +94774273955 <077%20427%203955>
>>
>>
>>
>
>
> --
>
> *Jasintha Dasanayake**Associate Technical Lead*
>
> *WSO2 Inc. | http://wso2.com <http://wso2.com/>lean . enterprise .
> middleware*
>
>
> *mobile :- 0711-368-118*
>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to