On Fri, Mar 5, 2010 at 11:40 AM, Raymond Feng <[email protected]> wrote: > Hi, > > When an SCA service is published to a binding protocol, it's assigned with > an address (represented as a URI) so that the service can be accessed from > the client side using that address. For example, a web service binding can > be made available at http://myhost:9080/myService. > > We use the endpoint registry to propagate endpoint descriptions from the > node that hosts the endpoint to other nodes in the SCA domain. The > protocol-specific physical endpoint address needs to be carried with the > endpoint description via the registry. The other tricky thing is to make > sure the endpoint address is accessible from a different machine. This leads > to a few cases: > > 1) The service binding URI is http://localhost:9080/myService. Should the > localhost be left as-is or replaced with the host ip or name? > 2) Should we use IP addess or host name? > 3) What do we do if the host machine is multiple homed? > > For some of the bindings, we have ServletHost or RMIHost to represent the > protocol stacks. The "regsiterService" can return a URI to represent a > physical endpoint address that can be used outside of the hosting machine. > > Now we allow the binding.sca to be mapped to any of the bindings. It > requires the mapped binding to propagate the physical URI to the client side > too. > > Two questions to be answered: > > 1) How does a binding generate the physical endpoint address based on the > binding URI and other information? > 2) The binding provider should be responsible for setting the binding with > the "deployed" URI (do we need to have a separate property in the Binding > java model?) into the endpoint so that it can be propagated into the > endpoint registry? > >
Yep its a problem alright, i've been thing about too. The only way I can see it working well is if Tuscany has a proper fixed base url per protocol and have _everything_ that uses that protocol use that base url, that means anything that listens for things remote requests eg the endpoint registry. Ideally as much as possible we'd want to try to choose the value programatically so users don't need to manually configure it, but that can get hard especially with multiple network interfaces, virtual hosts, and public/private host names. Pragmatically we're mainly interested in the host name/ip addresses, so likely often times we might just need to manually specify that/those when starting a Tuscany runtime. ...ant
