Hi Tim,
> The application assembler is then responsible for setting up a repository and/or bndrun file which ensures that the authorization implementation that they want is deployed.
Hmmmm. Perhaps I am missing something, but somehow I don’t feel comfortable with this.
Just to set up some context:
SystemAPI - api that is used by the system, but not directly as a service, and thus requires a cap/req means of being pulled into the system
SystemImplX - an implementation of the api in question, which provides the above-mentioned capability
So SystemImplA, SystemImplB, SystemImplC … are the different implementations of SystemAPI.
I hope this works for the discussion. :-)
What effectively you are saying:
* The application assembler is the one who sets up the assembly (I agree)
* This is done by curating the repository
—> If SystemImplA is the desired implementation, then make only it available from the repository
—> i.e. ensure that SystemImplB, SystemImplC… are **not** available
* All that is needed is a @RequireImplA annotation to set up the requirement
I agree that having a curated repository is very important. However, this seems IMO to be a misuse of the role of curation.
With deference to you, as you have much more experience than I do, it seems to me that the main role of curation is to ensure that none of the dependencies are pulling in other, unwanted dependencies (which can then make the dependency tree get out of control). To me, curation does not feel like the right place to control every single detail of the resolution process. That is what cap/reqs are for in the first place.
So instead of excluding SystemImplB, SystemImplC etc from the repository (they are not bad or dangerous, because they are not pulling in unwanted junk), rather the choice should be made at the same place where other similar choices are made, i.e. in the application descriptor:
@RequireSomething
@RequireSomethingElse
@RequireYetSomethingElse
@RequireSystemImplA
public class MyApp {}
It is perfectly fine and safe to keep all the implementations in the repository.
If one buys into this approach, then the next question is: which is better?
This?
* @RequireSystemA, @RequireSystemB, @RequireSystemC…
or this?
* @Requiresystem(“A”), @RequireSystem(“B”)…
But that is a different discussion. If you could first comment on the above issue of curation vs. capabilities, that would be helpful to me.
Thanks!
=David