Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330776

Summary: Re-implement user region using framework hooks instead of nested framework
Product: [RT] Virgo Reporter: Glyn Normington <glyn.normington>
Component: unknownAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: tjwatson
Version: 2.1.0.RELEASE   
Target Milestone: 3.0.0.M01   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 330236, 332650, 332771, 333071, 333189, 333193, 333667    
Bug Blocks: 333646    

Description Glyn Normington CLA 2010-11-22 04:22:25 EST
Nested frameworks was an early prototype of OSGi RFC 138. The RFC has changed to define framework hooks which allow users of the hooks to partition the OSGi framework themselves with user-controlled levels of isolation between the partitions. The nested frameworks prototype will be withdrawn in Equinox 3.7 or 3.8, so it is necessary to migrate Virgo to use the framework hooks instead.

This depends on upgrading to Equinox 3.7 which implements the framework hooks.
Comment 1 Glyn Normington CLA 2010-12-08 04:38:59 EST
Note that the surrogate bundle will disappear. This is referenced, e.g. in AbstractDeployerIntegrationTest.setUp and these references will need fixing.
Comment 2 Glyn Normington CLA 2011-01-04 03:56:16 EST
See bug 169603 for the possibility of moving the Equinox console out of the framework which could then allow Virgo to install it in the user region.
Comment 3 Glyn Normington CLA 2011-01-14 12:25:06 EST
The current prototype is on kernel branch bug330776-framework-hooks. A proper "connected regions" API in draft form is now pushed and described in the regions design document available in the documentation repository in the design-docs/regions directory.
Comment 4 Glyn Normington CLA 2011-01-21 05:46:00 EST
Notes on manageing shrinkable collections

The following ideas may be implemented if and when performance requires it.

* Track the allowed candidates as we traverse the digraph.

* Keep a working set of candidates primed from the input shrinkable collection.

* Remove allowed candidates from the working set of candidates as these are never going to be removed from the shrinkable collection.

* If the working set of candidates becomes empty, we can stop the search and return from the hook as the whole shrinkable collection is allowed by the hook. This will favour intra-region finds etc. which should be commonplace.

* On the last edge at depth 0 (e.g. the last edge from the starting region of the search in the case of find hooks), if a candidate is removed from the working set of candidates, it can also be removed from the shrinkable collection. This will favour the commonly expected types of digraph with most regions connected to one other region, except for the kernel.
Comment 5 Glyn Normington CLA 2011-01-21 07:05:28 EST
Note that the region support will need to recompiled when the implementation of bug 334574 is picked up in an Equinox driver.