There are two use cases that led the current scheme-based delegation:

1) One NodeFactory in the JVM can host nodes that connect to different SCA domains. Different SCA domain might use different endpoint registry implementations. 2) Allowing multiple endpoint registry implementation in the runtime allows me to test the Tribes/Hazelcast/Zookeeper based registry by just changing the domain registry URI, especially for the all-in-one distro.

What problems do you see with the scheme-based approach?

There are a few tweaks we can do to make the current code more flexible though:

a) Add an extension point named DomainRegistryProviderExtensionPoint

b) Rename DomainRegistryFactory to be DomainRegistryProvider. The providers will be registered to the DomainRegistryProviderExtensionPoint. Each provider can support one or more URI schemes. The DomainRegistryProviderExtensionPoint can either lookup the DomainRegistryProvider by scheme, or simply loop through the DomainRegistryProvider instances to find the provider that can handle the registry URI.

c) DomainRegistryProvider will have a method getDomainRegistry(domainURI) to return an EndpointRegistry (should be renamed to DomainRegistry) instance for the given SCA domain.

Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Thursday, January 21, 2010 6:57 AM
To: <[email protected]>
Subject: Changing the endpoint registry usage to be based on the discovered impl not the domain uri scheme

I'd like to change the way the endpoint registries are used so that it
just uses which ever registry impl is discovered using the standard
Tuscany discovery mechanism instead of having the registry looked up
by the domain uri scheme. I don't think we need the scheme based
lookup as theres no real need to support multiple registry
implementations within the runtime and having the discovered registry
handle all URIs gives it the flexibility to handle both in-VM and
distributed domains.

...ant

Reply via email to