Look OK as long as we do not make non-tenant case complicated. When you list streams, would you see the tenantA part? what happen when people debug things? What would happen with super tenant?
--Srinath On Wed, Jan 22, 2014 at 6:10 PM, Mohanadarshan Vivekanandalingam < [email protected]> wrote: > Hi All, > > As you already knew that CEP & BAM works based on stream concept. We are > defining the streams in a strict format. Here streams are uniquely > identified by combination of StreamName and Stream Version (Simply > StreamId). If an event comes to CEP or BAM, we check the streamId of the > event and do processing accordingly. But here we found that, there are some > issues occurred when dispatching events in multiple tenant environment. > > *Issue* > > For example - If says Tenant-A created a stream called testStream with > the version is 1.0.0 (streamId:1.0.0), again Tenant-B also creating a > stream called testStream with version 1.0.0. Then there are two streams > defined in CEP with the same streamId in different tenants since it is > possible to do. Then if says there is an event coming to CEP, then CEP only > checks the streamId of the event and redirect to specific stream. In this > case since two tenants are registered a stream with same streamId, it will > process the execution plans of both tenants. Then It will leads to > un-acceptable situation. > > If Tenant-A send events for its' execution, then these events leads to > execution of both Tenant-A & Tenant-B. We can detect the tenant id for some > input transports (Thrift, Http and etc) but not for all (jms can send > events without authentication). Then it is not possible for CEP to derive > the tenant specific information from events at all the time. > > [image: Inline image 4] > > > *Solution* > > If we make the streamId unique across multiple tenants then we can > overcome this issue. That means prefixing the tenant domain with streamId. > > For example - If Tenant-A (tenant domain is tenantA) created a stream > called testStream with version 1.0.0 then streamId is defined as > *tenantA:testStream:1.0.0 > *, If a super tenant created a stream then it defined as > *testStream:1.0.0* without any prefix. By this approach we can make > streamId unique across multiple tenants. > > > WDYT ?? Appreciate any ideas or feedback on this.. > > > > Thanks & Regards, > Mohan > > -- > *V. Mohanadarshan* > *Software Engineer,* > *Data Technologies Team,* > *WSO2, Inc. http://wso2.com <http://wso2.com> * > *lean.enterprise.middleware.* > > email: [email protected] > phone:(+94) 771117673 > -- ============================ Srinath Perera, Ph.D. Director, Research, WSO2 Inc. Visiting Faculty, University of Moratuwa Member, Apache Software Foundation Research Scientist, Lanka Software Foundation Blog: http://srinathsview.blogspot.com/ Photos: http://www.flickr.com/photos/hemapani/ Phone: 0772360902
<<eventTenant.png>>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
