Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Gyrex/Context Runtime"

(New page: == Summary == A common concept of on-line shop systems is to have store items which represent products. Even some shop systems work with products directly. In the auction world this is ...)
 
m (Introduction)
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Summary ==
+
{{Gyrex}}
  
A common concept of on-line shop systems is to have store items which
+
== Introduction  ==
represent products. Even some shop systems work with products directly.  
+
Eclipse is a dynamic and extensible platform. For example, the Eclipse extension registry allows for a great extensibility where some component defines an extension point and allows others to provide an implementation for it. Another possibility are OSGi services. There can be multiple extensions as well as multiple instances of an OSGi service. This is especially of interest in a multi-tenant environment because it allow for tenant-specific extensions as well as implementations.
In the auction world this is similar. There are various reasons for
+
decoupling the store items from the products most notably being design
+
driven (separation of concerns) and performance.  
+
  
The listing story presented here is a based on the same basic
+
This flexibility requires some management and processes to handle all the extensions and service implementations in order to pick the right one to use in a specific situation. We refer to this situation as "''execution context''" ("''runtime context''", or just "''context''") in Gyrex. Gyrex allows to put or execute  operations within (or on behalf of) a particular context. The context runtime is one of the key elements of Gyrex and allows - for example - the development of multi-tenant software offerings.  
principles. However, the concept proposed in this document goes beyond
+
these principles and creates a full-fledged listing store which is  
+
suitable for serving auction sites as well as classic storefronts and  
+
can be extended for any other scenario.  
+
  
It's also essential to note that the listing story is deeply integrated
+
Let's look at an example. On an online shopping website inventory information is displayed along the items. The inventory information is retrieved from a service. This service is defined in a bundle with a default implementation backed by a database. This will be the default for all shops served by the system. The other day a new client comes along which likes the shopping website to retrieve the inventory information directly from an inventory system instead of a database. With OSGi or the Eclipse extension registry this is a no-brainer. You simply implement the special inventory service and provide it as an OSGi service (or Eclipse extension). But now the shopping website needs to deal with two services implementations (or two extensions). It needs to know which one to use in which shop. Ideally this would be configurable by a system operator. Here comes the Gyrex Context Runtime to the rescue. Using the Context Runtime a shop can be defined as a runtime context. The shopping website simply delegates the call. Instead of asking the extension registry or the OSGi service registry directly, it asks the context which service (or extension) to use. The rest will all be configurable through an administration interface (or via APIs). Your code does not need to implement any filtering or permission checks. The Gyrex Context Runtime takes care of that.
with search. Actually, search will be the only way to retrieve listings
+
from the underlying store. Traditional browsing will be possible by  
+
filtering.  
+
  
Following the CloudFree approach the listing service provides a common
+
== The Runtime Context  ==
interface for storefront/auction (i.e., web site) developers and hides
+
The runtime context is the central element of the context runtime. It provides API to get a specific, ready-configured service instance. Callers will pass a key and it will return an object. Thus, the context is basically a configurable object registry. However, it's dynamic, i.e. it can change between invocations. Therefore callers may not hold on to the returned instances forever.  
the complexity from them.  
+
  
 +
The context will support dependency-injection, i.e. it can be injected into objects. The injection is also dynamic. The context keeps track of all injected objects and updates the objects if an injected value changes. These capabilities will be implemented on top of the Eclipse e4 dependency-injection mechanism.
  
== The Listings ==
+
Out of the box, the context runtime will support retrieval of the following objects:
 +
* Context specific objects
 +
* OSGi services
 +
* Eclipse extensions
 +
* Eclipse adapters for adaptable objects
 +
* Eclipse preferences
  
The listings are the core elements in this story. The can represent
+
=== Context Specific Objects ===
products for sale on a storefront or items for sale in an auction.  
+
Context specific objects are objects which exist specifically in/for a particular context. They are contributed to the context runtime using a factory/provider pattern. Whenever necessary the context runtime delegates to the provider to create such an object for a context. The provider are registered as OSGi services using the whiteboard pattern.
However, the key is that they are not limited to those two
+
possibilities. Basically, a listing can by anything that you want to  
+
present in some way to somebody. It's also possible that listings are  
+
digital goods which can be downloaded or simply texts which can be
+
viewed on-line.  
+
  
Therefore, listings do not provide a fixed structure. They are
+
Those familiar with OSGi services can compare the behavior to OSGi service factories. But instead of creating a service instance per consuming bundle it’s possible to create a service instance per consuming context. Context specific objects allow a convenient programming model of context specific behavior. All other object retrievals are implemented based on context specific objects.
unstructured documents consisting of a bunch of simple name-value
+
attributes. The attributes describe the listing further.  
+
  
 +
=== OSGi Services ===
 +
These are pure OSGi services. A context acquires services instances on behalf of the consuming bundle. Therefore it needs a <code>BundleContext</code> on which’s behalf services shall be acquired. This is also important for security reasons to properly verify that a consumer is really allowed to consume a particular OSGi service.
  
== Base Listing Attributes ==
+
The OSGi service registry does not know about runtime contexts. OSGi services have a different lifecycle than runtime contexts. In order to access a runtime context as well as context objects from within an OSGi service its method signatures need to requested the objects explicitly.
  
In order to provide a common infrastructure for working with listings
+
The advantage of using a runtime context to acquire an OSGi service is that the caller does not need to implement any logic which service to use in case many services are available. A runtime context will filter all service instances that are not relevant in a specific context. Of course, clients may still want to track all instances of a service themselves. Therefore the context runtime will also offer convenient API for filtering a set of given services (eg., <code>ServiceReference</code>).
the following attributes will be defined as the base attribtes.  
+
  
* <code>id</code>
+
It is assumed that OSGi services are configured by the service exporter/creator which is an external entity that may not even know about the context. Therefore, dependency injection into OSGi services will not be supported by the context runtime. But it will be possible to inject OSGi services into context objects. Injected OSGi services will be dynamic, i.e. they will be uninjected when they go away and updated when they change.
* <code>name</code>
+
* <code>title</code>
+
* <code>description</code>
+
  
<code>id</code> .. a machine generated unique identifier of a listing. It's purpose
+
=== Eclipse Extensions ===
is to locate a single specific listing if necessary.  
+
These are pure Eclipse extensions (<code>IExtension</code>). In the context runtime it should be possible to limit the visibility of available extensions in a particular context. Therefore, the runtime context will offer API to retrieve a filtered set of extensions that are available for use in a particular context. It may also offer convenient API to filter a set of given extensions.
  
<code>name</code> .. a human-readable name of a listing which is typically an
+
At this point, dependency injection will not be supported for Eclipse extensions. This may be re-evaluated in the future.
identifier that makes sense in a given context (eg. a product/sku
+
number)
+
  
<code>title</code> .. a human-readable listing title
+
=== Eclipse Adapters ===
 +
Eclipse provides an implementation and makes heavy use of the adaptable pattern (<code>IAdaptable</code>). As with OSGi services and Eclipse extensions they don’t know anything about a runtime context. However, it should be possible to use specific adapter implementations in a particular context. Therefore, the runtime context will offer API to retrieve a context specific (“preferred”) adapter from a set of available adapter implementations.
  
<code>description</code> .. a human-readable description of the listing
+
At this point, dependency injection will not be supported for Eclipse extensions. This may be re-evaluated in the future.
  
All other listing attributes are specific to the context where the
+
=== Eclipse Preferences ===
listing is being used. For example, a "price" attribute can be used for
+
In order to support implementers with context specific configuration capabilities of their implementations a runtime context will provide access to the Eclipse Preferences API using a context specific view. This also includes proper handling of the built-in preference scopes.
listing in a classic storefront to represent the actually item price.
+
However, in an auction site the "price" attribute can represent a "Buy
+
Now" price.  
+
  
 +
Another interesting capability is the injection of preferences into context objects. It will be supported to inject preference node objects as well as pure value objects into context objects.
  
== Navigational Attributes ==
 
  
It is assumed that listings can be navigated. In order to make the  
+
== Multi-Version Support  ==
navigation as flexible as possible it will be based on the listing
+
Multi-version support is an essential requirement especially in a multi-tenant software offering. There are tenants who always want the latest and greatest and there will also be tenants who are very conservative in there update strategies.
attributes as well. Therefore, the following attributes will be used for
+
navigation.  
+
  
* <code>path</code>
+
In a multi-version environment, several versions of a service may be available. This includes multiple implementation versions as well as multiple service definitions.
* <code>uripath</code>
+
* <code>tags</code>
+
* <code>start</code>
+
* <code>end</code>
+
  
<code>path</code> .. path a listing is contained in (eg. "folder/sub/subsub").
+
Multi-version support applies to Context Specific Objects, OSGi Services, Eclipse Adapters and partially Eclipse Extensions (multiple extensions for one extension point).
Note, the complete path is used here in order to have an implicit
+
assignment to the parent path as well. A listing may be attached to
+
multiple paths. In this case, multiple path attributes may be used. If a
+
path for a listing cannot be determined it will be listed in the root
+
path (i.e. '/').  
+
  
<code>uripath</code> .. a URI path portion for direct lookup of listings. This is  
+
=== Multiple Service Definitions ===
useful for building search engine friendly site URLs. The URI does not
+
If a service is defined by an interface (or an abstract class) the interface may be available in a 1.1 version as well as a 2.0 version. Complementary, there will be a (at least) one implementation for each service definition.
need to be unique across the board but should be unique within the same
+
lookup context (eg. unique across all auction listings of a site). Thus,  
+
it will be interpreted relative to the context base. If the uri is not
+
provided it will be computed based on the title attribute. If no title
+
attribute is available the name attribute will be used with a last
+
fall-back to the listing id. URI must not start or end with a slash
+
('/'). Note, the URI path is not encoded but contains the raw string as
+
entered by a user.
+
  
<code>tags</code> .. tags (aka. labels) attached to a listing. This allows to navigate
+
In order to handle this scenario correctly, the runtime context must know which version of a service definition the caller requested. Therefore, we’ll rely on the OSGi fundamentals that there will be different class objects for the service definitions. The usage of <code>java.lang.Class</code> keys ensures that a context knows about the requested service definition version. It can then inspect the available service implementations and filter out the incompatible once.
listings through a tag cloud or to filter based on tags. Tags are
+
optional.  
+
  
<code>start</code> .. a timestamp which represents the time after which a listing
+
=== Multiple Service Implementations ===
should be visible (UTC; yyyyMMddHHmm, eg. 200801311200). If the start
+
It may be possible that multiple service implementations are available for the same service definition. For example, a service interface may be available in a 1.1 version only. But there might be a 1.1.1 implementation and a 1.1.2 implementation (containing a little change in the implementation).
timestamp cannot be determined it will be set to "0" to make the listing
+
In order to handle this scenario correctly, the runtime context must know which version of a service implementation to return to the caller. This will be implemented using a configuration capability. A context may be configured with an LDAP-style filter (a concept used broadly within OSGi). A matching will be performed on available service implementations and the first matching one will be returned.  
visible as soon as possible.  
+
  
<code>end</code> .. a timestamp which represents the time after which a listing
+
Note, “first” implies an ordering mechanism involved. We’ll rely on the natural ordering of service implementations. In the case of OSGi services this may be the service ranking. For extensions the order is determined by the Eclipse extension registry.
should not be visible anymore (UTC; yyyyMMddHHmm, eg. 201012312359). If
+
This scenario also includes the situation when there are tenant-specific implementations of a service available. However, in order to not require all available contexts to be configured to ‘’not’’ use a tenant specific implementation, the context runtime will provide capabilities to define a preferred service implementation.
the end timestamp cannot be determined it will be set to "0" which will  
+
to make the listing visible forever.  
+
  
  
== Performance ==
+
== Context Hierarchy ==
 +
Contexts are hierarchical organized in a path like structure. Based on this hierarchical organization a context is able to inherit behavior (configuration) from a parent context.
  
Performance is an important design goal. The most important thing to  
+
There is a root context ("/") which typically defines the core pieces (“root”) of a system. In a single system it's actually possible to just work with the root context. In a multi-tenant system the root context may define default behavior for all tenant contexts (for example, preferred system-wide service implementations). Complementary, a tenant context is able to define default behavior for all sub-contexts of that tenant.
note is that under all circumstances listing display time must be cheap
+
(read: flying fast). In order to achieve this we will aggregate as much
+
data as possible in listing attributes and move any computing and
+
aggregation into the listing generation process.  
+
  
The general strategy is that listings will be generated from underlying
+
=== Hierarchy Organization ===
data on specific events. Additionally, all listing attributes will be
+
At this point, the actual organization of contexts is left to the implementers of systems. As already outlined above, several possibilities are available.  
attached to a listing prior to making it available. We specifically
+
trade in actuality for performance, i.e. all updates to the underlying
+
data will be reflected on the listing only after an event has been
+
triggered to update the listing as well and only after the listing
+
update process has finished. The reason is that the listing update
+
process is considered to be expensive.  
+
  
Even through the listing process is considered to be expensive it still
+
TODO: We should elaborate this further and come up with some recommended strategies/examples for different scenarios.
has to scale. Therefore, any implementation must be able to scale
+
horizontally. The listing generation process will process items in
+
parallel and be able to leverage a computing grid in order to scale.  
+
  
It is important that during listing generation really all possible data
+
==== Simple Tenant-Centric Example ====
is aggregated into the listing. For example, if during a promotion
+
<code>/<tenant>/…</code>
discounts are granted to a product the discount will be calculated
+
* / - for establishing system wide default behavior<br>Examples:
during the listing generation process. Additionally, the applied
+
** Use simple database based inventory management service implementation
discounts will be attached to the listing so that a storefront can
+
* /<tenant> - for establishing tenant wide default behavior
simply read the info from the listing without issuing an additional
+
** Use tenant-specific inventory management service implementation
lookup for discounts and without additional computations. Of course,
+
this is only possible with product discounts but not with order-time
+
discounts. However, following this philosophy it's also possible to
+
aggregate promotional information (eg., buy three get one free) into the
+
listing which would safe additional lookups during basket calculation.
+
  
 +
==== Multi-Organization Tenant Example ====
 +
<code>/<tenant-head-organization>/<tenant-sub-organization>/…</code>
  
== Real-Time Trade-Off ==
 
  
When real-time information needs to be displayed the listing story needs
+
== Context Registry ==
to make an exception to the performance goal. The underlying assumption
+
The configuration of contexts is persisted and kept across sessions. A central registry is responsible for "loading" of contexts. However, access to the registry may be guarded by security constraints to allow only trusted code access to a specific set of contexts. This prevents client code with a lower level of trust to not execute operations outside of the client context.  
is that any real-time service is performant and scalable to query. Very
+
likely, the real-time service will use a short cache for handling peak
+
loads. Based on this assumption it is further assumed that using the
+
real-time service directly is more efficient than performing frequent
+
invocations of the listing update process which is simply not designed
+
to handle real-time updates.  
+
  
One example is the auction pricing model. The auction pricing model
+
The registry may provide capabilities to define new contexts and maintain existing contexts. It may also provide capabilities to export a context configuration as well as creating new contexts based on such exported configurations to support advanced operations (such as cloning).
requires real-time bid information to be present on an auction listing.  
+
Therefore, the auction pricing *will* perform an additional lookup for
+
the bid information on a listing details page. Further performance
+
investigations will show if it's eventually possible to avoid the
+
additional lookups on listings browsing pages. However, the current
+
assumption is that the bidding service will provide this information in
+
a performant and scalable manner even for listing browsing pages which
+
would be more efficient than performing frequent invocations of the
+
listing update process.  
+
  
Another example is inventory availability in an on-line shop. It's a
 
common functionality these days to indicate if an item is available and
 
can be shipped immediately (i.e., "on stock") or if there is a delay or
 
even sold out.
 
  
Of course, following the CloudFree approach the site developer will not
+
== Security  ==
recognize the complexity behind this. A site developer will just query
+
Wherever possible, the context runtime relies on OSGi fundamentals for security. For example, OSGi permissions shall be used to verify that a consumer is able to consume a service. OSGi permissions may also be used to limit the packages a consumer may have access to.
the listing service and the listing service implementation will query
+
the listing store and any real-time service if necessary.  
+
  
  
== Storage ==
+
== Context Applications ==
 
+
TODO (an application model for context specific applications based on the OSGi application admin spec)
The power of the listing story relies in the listing store. It is
+
assumed that the listing store will be capable of hosting all listings
+
and allows to query for listings very quickly. The listing store an be
+
compared to an index. It needs to provide query and filter capabilities.
+
The listing store shall also provide faceting capabilities. The listings
+
returned by the listing store will contain all the stored attributes.
+
The result has to be paged. The maximum listings per page shall be
+
reasonable low.
+
 
+
The storage itself will be pluggable supporting various client needs and
+
future growth. One store might be build upon open source search
+
technology like Apache Solr. Another store might be a commercial one
+
based on commercial offerings such as FAST or FACT-Finder.
+

Latest revision as of 13:53, 28 November 2012

Gyrex
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse SourceProject Set File

Introduction

Eclipse is a dynamic and extensible platform. For example, the Eclipse extension registry allows for a great extensibility where some component defines an extension point and allows others to provide an implementation for it. Another possibility are OSGi services. There can be multiple extensions as well as multiple instances of an OSGi service. This is especially of interest in a multi-tenant environment because it allow for tenant-specific extensions as well as implementations.

This flexibility requires some management and processes to handle all the extensions and service implementations in order to pick the right one to use in a specific situation. We refer to this situation as "execution context" ("runtime context", or just "context") in Gyrex. Gyrex allows to put or execute  operations within (or on behalf of) a particular context. The context runtime is one of the key elements of Gyrex and allows - for example - the development of multi-tenant software offerings.

Let's look at an example. On an online shopping website inventory information is displayed along the items. The inventory information is retrieved from a service. This service is defined in a bundle with a default implementation backed by a database. This will be the default for all shops served by the system. The other day a new client comes along which likes the shopping website to retrieve the inventory information directly from an inventory system instead of a database. With OSGi or the Eclipse extension registry this is a no-brainer. You simply implement the special inventory service and provide it as an OSGi service (or Eclipse extension). But now the shopping website needs to deal with two services implementations (or two extensions). It needs to know which one to use in which shop. Ideally this would be configurable by a system operator. Here comes the Gyrex Context Runtime to the rescue. Using the Context Runtime a shop can be defined as a runtime context. The shopping website simply delegates the call. Instead of asking the extension registry or the OSGi service registry directly, it asks the context which service (or extension) to use. The rest will all be configurable through an administration interface (or via APIs). Your code does not need to implement any filtering or permission checks. The Gyrex Context Runtime takes care of that.

The Runtime Context

The runtime context is the central element of the context runtime. It provides API to get a specific, ready-configured service instance. Callers will pass a key and it will return an object. Thus, the context is basically a configurable object registry. However, it's dynamic, i.e. it can change between invocations. Therefore callers may not hold on to the returned instances forever.

The context will support dependency-injection, i.e. it can be injected into objects. The injection is also dynamic. The context keeps track of all injected objects and updates the objects if an injected value changes. These capabilities will be implemented on top of the Eclipse e4 dependency-injection mechanism.

Out of the box, the context runtime will support retrieval of the following objects:

  • Context specific objects
  • OSGi services
  • Eclipse extensions
  • Eclipse adapters for adaptable objects
  • Eclipse preferences

Context Specific Objects

Context specific objects are objects which exist specifically in/for a particular context. They are contributed to the context runtime using a factory/provider pattern. Whenever necessary the context runtime delegates to the provider to create such an object for a context. The provider are registered as OSGi services using the whiteboard pattern.

Those familiar with OSGi services can compare the behavior to OSGi service factories. But instead of creating a service instance per consuming bundle it’s possible to create a service instance per consuming context. Context specific objects allow a convenient programming model of context specific behavior. All other object retrievals are implemented based on context specific objects.

OSGi Services

These are pure OSGi services. A context acquires services instances on behalf of the consuming bundle. Therefore it needs a BundleContext on which’s behalf services shall be acquired. This is also important for security reasons to properly verify that a consumer is really allowed to consume a particular OSGi service.

The OSGi service registry does not know about runtime contexts. OSGi services have a different lifecycle than runtime contexts. In order to access a runtime context as well as context objects from within an OSGi service its method signatures need to requested the objects explicitly.

The advantage of using a runtime context to acquire an OSGi service is that the caller does not need to implement any logic which service to use in case many services are available. A runtime context will filter all service instances that are not relevant in a specific context. Of course, clients may still want to track all instances of a service themselves. Therefore the context runtime will also offer convenient API for filtering a set of given services (eg., ServiceReference).

It is assumed that OSGi services are configured by the service exporter/creator which is an external entity that may not even know about the context. Therefore, dependency injection into OSGi services will not be supported by the context runtime. But it will be possible to inject OSGi services into context objects. Injected OSGi services will be dynamic, i.e. they will be uninjected when they go away and updated when they change.

Eclipse Extensions

These are pure Eclipse extensions (IExtension). In the context runtime it should be possible to limit the visibility of available extensions in a particular context. Therefore, the runtime context will offer API to retrieve a filtered set of extensions that are available for use in a particular context. It may also offer convenient API to filter a set of given extensions.

At this point, dependency injection will not be supported for Eclipse extensions. This may be re-evaluated in the future.

Eclipse Adapters

Eclipse provides an implementation and makes heavy use of the adaptable pattern (IAdaptable). As with OSGi services and Eclipse extensions they don’t know anything about a runtime context. However, it should be possible to use specific adapter implementations in a particular context. Therefore, the runtime context will offer API to retrieve a context specific (“preferred”) adapter from a set of available adapter implementations.

At this point, dependency injection will not be supported for Eclipse extensions. This may be re-evaluated in the future.

Eclipse Preferences

In order to support implementers with context specific configuration capabilities of their implementations a runtime context will provide access to the Eclipse Preferences API using a context specific view. This also includes proper handling of the built-in preference scopes.

Another interesting capability is the injection of preferences into context objects. It will be supported to inject preference node objects as well as pure value objects into context objects.


Multi-Version Support

Multi-version support is an essential requirement especially in a multi-tenant software offering. There are tenants who always want the latest and greatest and there will also be tenants who are very conservative in there update strategies.

In a multi-version environment, several versions of a service may be available. This includes multiple implementation versions as well as multiple service definitions.

Multi-version support applies to Context Specific Objects, OSGi Services, Eclipse Adapters and partially Eclipse Extensions (multiple extensions for one extension point).

Multiple Service Definitions

If a service is defined by an interface (or an abstract class) the interface may be available in a 1.1 version as well as a 2.0 version. Complementary, there will be a (at least) one implementation for each service definition.

In order to handle this scenario correctly, the runtime context must know which version of a service definition the caller requested. Therefore, we’ll rely on the OSGi fundamentals that there will be different class objects for the service definitions. The usage of java.lang.Class keys ensures that a context knows about the requested service definition version. It can then inspect the available service implementations and filter out the incompatible once.

Multiple Service Implementations

It may be possible that multiple service implementations are available for the same service definition. For example, a service interface may be available in a 1.1 version only. But there might be a 1.1.1 implementation and a 1.1.2 implementation (containing a little change in the implementation). In order to handle this scenario correctly, the runtime context must know which version of a service implementation to return to the caller. This will be implemented using a configuration capability. A context may be configured with an LDAP-style filter (a concept used broadly within OSGi). A matching will be performed on available service implementations and the first matching one will be returned.

Note, “first” implies an ordering mechanism involved. We’ll rely on the natural ordering of service implementations. In the case of OSGi services this may be the service ranking. For extensions the order is determined by the Eclipse extension registry. This scenario also includes the situation when there are tenant-specific implementations of a service available. However, in order to not require all available contexts to be configured to ‘’not’’ use a tenant specific implementation, the context runtime will provide capabilities to define a preferred service implementation.


Context Hierarchy

Contexts are hierarchical organized in a path like structure. Based on this hierarchical organization a context is able to inherit behavior (configuration) from a parent context.

There is a root context ("/") which typically defines the core pieces (“root”) of a system. In a single system it's actually possible to just work with the root context. In a multi-tenant system the root context may define default behavior for all tenant contexts (for example, preferred system-wide service implementations). Complementary, a tenant context is able to define default behavior for all sub-contexts of that tenant.

Hierarchy Organization

At this point, the actual organization of contexts is left to the implementers of systems. As already outlined above, several possibilities are available.

TODO: We should elaborate this further and come up with some recommended strategies/examples for different scenarios.

Simple Tenant-Centric Example

/<tenant>/…

  • / - for establishing system wide default behavior
    Examples:
    • Use simple database based inventory management service implementation
  • /<tenant> - for establishing tenant wide default behavior
    • Use tenant-specific inventory management service implementation

Multi-Organization Tenant Example

/<tenant-head-organization>/<tenant-sub-organization>/…


Context Registry

The configuration of contexts is persisted and kept across sessions. A central registry is responsible for "loading" of contexts. However, access to the registry may be guarded by security constraints to allow only trusted code access to a specific set of contexts. This prevents client code with a lower level of trust to not execute operations outside of the client context.

The registry may provide capabilities to define new contexts and maintain existing contexts. It may also provide capabilities to export a context configuration as well as creating new contexts based on such exported configurations to support advanced operations (such as cloning).


Security

Wherever possible, the context runtime relies on OSGi fundamentals for security. For example, OSGi permissions shall be used to verify that a consumer is able to consume a service. OSGi permissions may also be used to limit the packages a consumer may have access to.


Context Applications

TODO (an application model for context specific applications based on the OSGi application admin spec)

Back to the top