>
> The following is the type of thing I had in mind:
>
> JVM1
> Node1
> service1
>
> JVM2
> Node2
> service2
> Node3
> service3 that uses service1 and service2
>
> JVM3
> Node4
> client that uses service3
>
> In the JVM2 case (which could be a tomcat with tuscany integration
> jvm) that should ideally use a single port, share a local endpoint
> registry instance, and not make a real remote call when service3 calls
> service2.
Relating this to the previous posts. This would be the case if the
runtime for JVM2 were Tomcat/Tuscany with shared tuscany library. It
would also be the case with two nodes running in a single JVM as per
two-nodes-test (the single port part would depend on node
configuration). It would not be the case if JVM2 was running with
Tomcat/Tuscany with a non-shared tuscany library. Sound right?
> And there would be some way for having a shared endpont
> registry across all the Nodes using tribes or whatever.
>
> To set that up with the current Tuscany API/SPI it would be code along
> the lines of:
>
> JVM1: NodeFactory.newInstance().createNode(new
> Contribution("service1", service1Contribution.jar));
>
> JVM2: NodeFactory.newInstance().createNode(new
> Contribution("service2", service2Contribution.jar));
> NodeFactory.newInstance().createNode(new
> Contribution("service3", service3Contribution.jar));
>
> JVM3: NodeFactory.newInstance().createNode(new Contribution("client",
> clientContribution.jar));
>
> And ideally that would be it. So can we get that to work just like
> that, or what is the minimum extra configuration needed?
I think the minimum extra configuration is the URL of the domain to
which the nodes belong as we need some way to determine which endpoint
registries should join together. Other than that we should be able to
rely on defaults.
> I guess
> without some sort of auto discovery then each JVM needs to be told
> about the other JVMs, but it seems like that should be per JVM not per
> node.
Depends on configuration. With JVM1, 2, 3 as described I agree that
some kind of configuration would be required in order that they can
communicate.
If we added JVM4 that was running an endpoint registry on an HTTP
port, for example, we could still get away with just having the domain
URL in JVM1, 2, 3. JVM 1,2, 3 would use JVM4 to identify what
endpoints in the other JVMs are available.
>
> ...ant
>
Good exercise. The thing that's missing then is getting the distribute
registry running. Am seeing if I can get anywhere with what Raymond
has committed. Have you tried it? Am not sure multicast will work on
the net work where I am (although it may work just on my PC).
Simon