To follow up with my own email... (feel free to cut and paste into another message so you don't have to reply to two emails)
OK, this clarifies what you're looking to do for me quite a bit. If you're looking to do an in process dispatch with an existing endpoint that has been created (i.e. an HTTP endpoint) that is a completely different story. It isn't very clear to me how the mechanics of such a thing would work. Could you maybe supply a little more information about how you would see the following working: How would we determine if the endpoint is in the local process space? For instance, if I have a Client talking to an HTTP Server endpoint, how does it know to shortcut and talk to the server directly?
On the client side, when do we make the decision about whether or not the
endpoint is "in process"? During a client creation? Or during each invocation? Can the decision happen mid invocation?
After re-reading your emails, it seems that you want to select this at invocation time, not at client creation time. I don't think we can do this after the chain has been dispatched. If we did so this would mean we change our Bindings pretty extensively to support detection. This would complicate binding creation and seems pretty unnecessary since this is what bindings are for - to control how a service is bound to a protocol. It also could be disastrous as we might have already written part of the message. So it seems to imply that a per invocation approach would require changes to the ClientImpl class. If we selected that we want to use in process dispatch via a URI or flag or some other mechanism then we would need to find a different binding and use that instead. I'm not sure why we wouldn't want to use a Conduit/Destination still. They seem like a perfectly good way to dispatch a message from a client to a service. Why should we invent another one? Also, on the Conduit auto-init issue, if we have logic inside ClientImpl.invoke to detect whether or not we're doing an in-process dispatch, can't we use that same logic to determine whether or not we should auto-create the Conduit? I'm envisioning that a user sets an endpoint address of "endpoint:fooEndpoint". We can detect that this property has been set inside the ClientImpl and not create the Conduit. We can create that Conduit in MessageSenderInterceptor. The same applies if they're using a different remote endpoint as well. Can you detail more about how you see the logic inside ClientImpl chainging? - Dan -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
