Skip to content

Provider Registry

The Provider Registry is the central catalogue managing provider discovery, registration, validation, lifecycle, and resolution.

Interface

public interface ProviderRegistry {
    RegistrationResult register(ProviderDescriptor descriptor);
    DeactivationResult deactivate(String providerId);
    BaseProviderContract resolve(String capability, TenancyContext context);
    BaseProviderContract resolveSubCapability(String capability, String subCapability, TenancyContext context);
    List<ProviderDescriptor> list(TenancyContext context);
    HealthStatus healthCheck(String providerId);
}

Registration

ProviderDescriptor descriptor = new ProviderDescriptor(
    "spark-transform-v2",           // id (unique)
    "Spark Transformation Provider", // name
    "transformation",                // capability
    null,                            // sub-capability
    "2.0.0",                         // version
    List.of("validate", "execute", "explain", "lineage", "optimise"),
    Map.of("sparkVersion", "3.5"),
    List.of(ComputePlatformProfile.DATABRICKS, ComputePlatformProfile.AWS_NATIVE)
);

RegistrationResult result = registry.register(descriptor);

Resolution

Resolution is scoped by tenancy and namespace:

TenancyContext context = new TenancyContext("acme-corp", "production");

// Resolve by capability
BaseProviderContract provider = registry.resolve("transformation", context);

// Resolve by sub-capability (e.g., security sub-capabilities)
BaseProviderContract encryptor = registry.resolveSubCapability(
    "security", "encryption", context);

Deactivation

Deactivated providers are no longer available for resolution:

DeactivationResult result = registry.deactivate("spark-transform-v2");
// Subsequent resolve() calls will not return this provider

Health Monitoring

HealthStatus status = registry.healthCheck("spark-transform-v2");
// Returns: HEALTHY, DEGRADED, or UNHEALTHY

Listing Providers

List<ProviderDescriptor> providers = registry.list(context);
// Returns all providers visible to the given tenancy/namespace

Provider Descriptor

record ProviderDescriptor(
    String id,                              // Unique identifier
    String name,                            // Human-readable name
    String capability,                      // Capability this provider implements
    String subCapability,                   // Optional sub-capability
    String version,                         // Provider version
    List<String> contractMethods,           // Methods implemented
    Map<String, Object> config,             // Provider configuration
    List<ComputePlatformProfile> targetPlatforms  // Supported platforms
) { }

Resolution Strategy

When multiple providers exist for the same capability:

  1. Filter by tenancy/namespace scope
  2. Filter by target platform (if pipeline has a platformProfile)
  3. Select the highest-version active provider
  4. If no provider found, throw resolution error