[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
AW: [geclipse-dev] Dynamic extension of a VO
|
Hi Moritz,
> One AWS Virtual Organization acts as an umbrella facility to house
many
> different services.
This exactly fits the design pattern of a g-Eclipse VO!
> This implies a dynamic structure on the side of gEclipse. A small core
> providing the AWS VO and a set of protocol implementations bundled
under
> the AWS VO.
I agree.
> Here is the problem.
As we will see there is no problem ;-)
> How is something like this achieved in gEclipse?
So here we go ...
The model itself is completely extensible via the gridElementCreator
extension point. Basically it is thought to plug-in implementations of
already in the core defined IGridElement types. Nevertheless it can be
used to plug-in any (and I mean ANY) implementation of IGridElement,
even if it is not declared anywhere in the core!
But the crucial point for your use case is of course the IGridService
interface (which is also an IGridElement). A VO has a method called
getServices(...). What a VO returns as a service is completely up to the
VO. What is defined as a service on the middleware side is on the other
hand completely up to the middleware implementation.
So in fact the next step already foreseen in this direction is to
prepare the GenericVO to be a contained of ANY defined service. That
would mean you could create a GenericVO with a S3, EC2, DataStager and
LFC service if you would like to. This is definitely possible and I will
come up with such an implementation as soon as I find some time for it.
The only restriction of these services to be added to the GenericVO
would be that they (or their creators) are defined as extensions of the
gridElementCreator extension point.
So this is also the way the AWS should handle these things. In principle
you could simply re-use the GenericVO implementation then. But if you
would like to come up with something dedicated to AWS I would suggest to
define a AWS core interface called "IAwsService extends IGridService".
In the AWS VO wizard you could then include a wizard page which allows
to add an AWS service to your AWS VO queried from the types implementing
IAwsService. The crucial method for retrieving such a service list is:
eu.geclipse.core.Extensions.getRegisteredElementCreatorConfigurations(
source, target );
This method gives you all configuration elements belonging to extensions
of the gridElementCreator extension point that are able to create an
IGridElement of the specified target type from the specified source
type. So in your case source could simply be null and target would be
IAwsService.class. Then you would get a list of configuration elements
for element creator extensions that are able to create IAwsService
instances. Furthermore a service should always be created from a URI,
therefore your should prepare the corresponding element creator to
create a service from a URI. Then of course source should be URI.class
instead of null.
Adding any AWS service to your VO with the above mentioned wizard page
would then reduce to select a service type from the list retrieved with
the above described method and specifying a URI for this service.
The GenericVO implementation will exactly use this pattern besides the
fact that it will not search for IAwsService creators but for
IGridService creators.
Cheers, Mathias