Yes, I had a chat with Jasintha on this as well. In this case, we have a topic for each tenant since there are some permission and authorizations involved with each tenant. Then we need to connect to multiple topics to consume events from multiple tenants. This means we need to maintain multiple subscriptions from DAS (1 subscription for 1 topic).
Now the question is how to maintain tenant specific subscriptions in DAS. Since we are using MQTT here, eager loading is the option that we suggest to deploy tenant specific artifacts in server startup but since this is cloud scenario, loading all the tenants in the startup is not an option as suggested by Sinthuja. Then good option is maintaining the subscriptions of tenants in super tenant level and push events by starting the tenant flow based on the topic that we received the message. Here I believe, it is good to have 1 receiver artifact for each tenant then if need to remove a subscription of tenant then we can simply delete relevant artifact. Thanks, Mohan On Mon, Mar 20, 2017 at 2:05 PM, Sinthuja Ragendran <sinth...@wso2.com> wrote: > Hi Ayyoob, > > On Mon, Mar 20, 2017 at 1:54 PM, Ayyoob Hamza <ayy...@wso2.com> wrote: > >> Agree that it's better to handle this in super tenant layer due to its >> complexity, but I wonder whether this needs to be specific for >> MQTT scenarios. Because we need the same requirement for HTTP and thrift >> receivers. So for HTTP and Thrift can we have it through super tenant space >> or do we have to think of a generic solution on how to deploy the artifacts >> for the tenants. >> > > Thrift case is different, because there is only one listener for all > tenants and we don't start different endpoints/listeners per tenant. And > the tenent flow is started, once the tenant is authenticated and sending > the events. In the case of HTTP, we do have the same problem as MQTT. In > HTTP case, there is seperate HTTP endpoints registered for different > tenants, and AFAIR those will be removed once the tenant is unloaded. So > far, we didn't have problems in the deployments as HTTP or other receivers > than thrift is used in the multi tenant case. > >> >> In addition to recievers, we are using publishers and >> tenant-specific summarisation scripts, does these gets undeployed when the >> tenant is unloaded ?. >> > > Summarization scripts will work, AFAIR the tasks registered for the > tenants will be still active though the tenant is unloaded, and once the > trigger has been received for the task, it will be loading the tenant and > executing the script. For the event publishers, the same issue exists, but > before the publisher gets tiggered the event should be arrived into the > core, and by that time the tenant is already loaded and hence I believe the > publishers will not be having this problem. > > Thanks, > Sinthuja. > > >> >> Thanks, >> *Ayyoob Hamza* >> *Software Engineer* >> WSO2 Inc.; http://wso2.com >> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495> >> > > > > -- > *Sinthuja Rajendran* > Technical Lead > WSO2, Inc.:http://wso2.com > > Blog: http://sinthu-rajan.blogspot.com/ > Mobile: +94774273955 <+94%2077%20427%203955> > > > > _______________________________________________ > Architecture mailing list > Architecture@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- *V. Mohanadarshan* *Associate Tech Lead,* *Data Technologies Team,* *WSO2, Inc. http://wso2.com <http://wso2.com> * *lean.enterprise.middleware.* email: mo...@wso2.com phone:(+94) 771117673 <+94%2077%20111%207673>
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture