Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each of these issues stem from what is currently expected of a ServiceDeploymentContributor in its contributeService method.
Basically each service deployment contributor is expected to build its own filter chain.
This is currently done by making calls to Deploymentcontext.contributeFilter.
While this provides a great deal of flexibility for each service to define a custom chain we have found that this isn't commonly necessary.
Furthermore it makes if very difficult if not impossible to introduce new filters in a chain without impacting all services.
This design will provide an abstraction to the service deployment contributors that can create either a default or specifically configured chain of filters.
The goal is to support a pattern in service deployment contributors that looks like this:

Code Block
java
java
titleIdeal ServiceDeploymentContributor.contributeService
  public void contributeService( DeploymentContext context, Service service ) throws Exception {
    String chain = null; // Default if null, otherwise specific chain name defined in topoloy.xml
    Map<String,Map<String,String>> params = null; // Default if null, otherwise map of per provider role map of name/value pairs.  
    ResourceDescriptor resource = context.addResource()
    resource.role( "WEBHDFS" );
    resource.pattern( "webhdfs/v1/?**" );
    resource.pattern( "webhdfs/v1/**?**" );
    context.contributeChain( service, resource, null, params );
  }
PlantUML
titleClasses

class ServiceDeploymentContributor {
  + void contributeService( DeploymentContext context, Service service )
}
class DeploymentContext {
  + void contributeChain( Service service, ResourceDescriptor resource, String chainName, Map<String,Map<String,String>> providerParams )
}

...