felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Bakker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4955) DS based on Dependency Manager
Date Fri, 10 Jul 2015 13:06:04 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14622259#comment-14622259

Paul Bakker commented on FELIX-4955:

No comments on the proposed approach, but I very much like this idea! There seems to be a
split in the OSGi world between DS and DM users, making it difficult to create re-usable components
for both. This could help a lot bridging these worlds.

> DS based on Dependency Manager
> ------------------------------
>                 Key: FELIX-4955
>                 URL: https://issues.apache.org/jira/browse/FELIX-4955
>             Project: Felix
>          Issue Type: New Feature
>          Components: Dependency Manager
>            Reporter: Pierre De Rop
>            Assignee: Pierre De Rop
> (this is an experimental issue)
> Whilst Apache Felix Dependency Manager is a powerful tool that allows to manage OSGi
service components, it is not standard. On the other hand, at Felix we have SCR which is an
implementation of the standard OSGi Declarative Service (DS) specification.
> The intent of this experimental issue is to unify and align both DS and DM in order to
provide a Declarative Service library based on Dependency Manager.
> This new DS library will bring the following benefits:
> - For those who love DM, this new library will provide a unified solution that align
both DM and DS, where each DS component would be actually implemented as a DM component, browsable
from the DM shell.
> - provide some DM extension to DS component: for example, the ability to add some extra
dependencies dynamically from DS component's "init" method.
> This experimentation can be split in the following steps:
> h5. STEP 1: build current SCR in a DM submodule using bndtools
> Create a new DM dependencymanager/org.apache.felix.dependencymanager.ds module that includes
the current Apache SCR implementation. As DM is based on bndtools, the current SCR implementation
will have to be de-mavenified and built using bndtools. The new module will also include the
current SCR junit tests, but not integration tests because current released bndtools requires
to have separate modules
> for integration tests (if I'm correct).
> h5. STEP 2: create a new DM submodule for SCR integration tests.
> Create a new DM dependencymanager/org.apache.felix.dependencymanager.ds.itest sub module
that includes the current Apache SCR integration tests.
> Pax-exam seems to not work well within bndtools. So, it has to be replaced by a simpler
tool that allows to dynamically build a "tiny" bundle under bndtools. That tool will be simply
based on bndlib.
> All tests will also have to be reworked in order to cleanup possibly created test configurations
because in bndtools, the framework is not restarted between tests.
> h5. STEP 3: update the dependency manager load test suite
> Add a new loadtest suite based on current Apache Felix SCR
> Add a new loadtest suite based on the new org.apache.felix.dependencymanager.ds bundle.
> This will allow to compare and make sure that the new DS library will be at minimum as
fast as the current SCR implementation. It will also be used to observe the gain of using
the actor thread model of DM with DS components.
> h5. STEP 4: rework SCR with DM
> That will be of course the most difficult part to do: rework
> dependencymanager/org.apache.felix.dependencymanager.ds in order to map each DS components
to DM components (internally).
> After a quick look over the current implementation, the following things could be done:
> - modify the classes derived from org.apache.felix.scr.impl.manager.AbstractComponentManager
and transform them into DM component.
> - Rework the org.apache.felix.scr.impl.manager.DependencyManager and implements it as
a DM dependency (by extending the org.apache.felix.dm.context.AbstractDependency class).
> h5. STEP 5: build everything in java8
> Java7 is in end of life and the DM loadtest suite requires java8.
> So, for consistency reasons, build every DM submodules using java8.

This message was sent by Atlassian JIRA

View raw message