This is one of the core areas of C5 kernel. In previous carbon versions, the multi-tenancy aspect was limited to run-time execution only. In there, we used the Axis2 Configuration & Context model to achieve the multi-tenancy where each tenant got its own execution space during run-time. But the OSGi environment was not partitioned for tenants and was visible to all, where a bundle (the library and its packages) installed by a tenant was visible to other tenants as well.
The idea here is to implement Multi-Tenancy at OSGi framework level also, so that each tenant gets its totally isolated run-time environment. We are planning to use OSGi "Regions" [1] concept to achieve this with the usage of OSGi framework hooks. A region is a grouping of bundles in an OSGi run-time, which is governed by controls when accessing resources (packages, services) from other regions. Each tenant gets its own region and there will be a separate "Kernel" region where the core bundles/packages/service resides and will be exposed to tenant regions. We can still limit/decide on what to expose from kernel region. Each tenant region will be isolated from each other. They will not see any events (related to bundle, service) or package visibility from other regions, but only see from it self and kernel. Below image is high level view of this concept. [image: Inline image 1] An overview of the framework hooks. *RegionResolverHook* - manages the package resolve process for requirements from bundles in regions. *RegionBundleFindHook* - manages/filters the BundleContext.getBundle lookups from region bundles. *RegionBundleEventHook* - manages/filters the bundle's life-cycle events for regions. *RegionBundleCollisionHook* - manages the duplicate bundle resolving in multiple regions. This will facilitate to have same bundles in different regions. *RegionServiceFindHook* and *RegionServiceEventHook* - manages/filters the service lookup and life-cycle events for regions. Thoughts suggestions are welcome. Thanks, Kishanthan. [1] http://wiki.eclipse.org/Virgo/Concepts#Regions -- *Kishanthan Thangarajah* Senior Software Engineer, Platform Technologies Team, WSO2, Inc. lean.enterprise.middleware Mobile - +94773426635 Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>* Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
