Logical Names



Logical Names

The capability to send messages to a logical name is the best feature that WS-Routing offers. By sending messages to a logical name, you can let the WS-Routing-enabled infrastructure deal with the physical layout of the network. Of course, logical names let you do more than that; they allow you to conceptualize Web services in an entirely different way.

DEFINITION: LOGICAL NAME

A logical name is a URI that doesn't necessarily represent the exact location to which to send a message. Instead, a logical name can have a very different location than the one implied by its logical name—or even multiple physical locations!

You can imagine sending messages to a logical name, and then the WS-Routing infrastructure delivering the message to a very specific physical location. Figure illustrates this. This figure assumes that the WSE run-time is choosing which physical location to send the message to, based on a database of referral statements to which the WSE has access. If there is no referral cache, then this physical location is exactly the same as the logical name would suggest.

1. A WS-Routing Design

graphics/12fig01.gif

Of course, the next message could be delivered to an entirely different place. This is possible because the WS-Routing infrastructure of the WSE could receive a message, such as a referral (as defined in WS-Referral), that indicates the availability of a new service port that can receive the message. Figure shows this referral being sent to this WS-Routing layer.

2. A Referral Message

graphics/12fig02.gif

Now, the next time a message is sent to this same logical location, the WS-Routing layer of the WSE can deliver the message to a new physical location. In Figure, notice that there is now a referral cache that the WSE runtime will query for the location to which it should send the message.

3. Use of a New Route

graphics/12fig03.gif

It's important to understand that this routing-aware layer could be software running inside of the same process as the message sender, or it could be an entirely different server that is serving as an intermediary. In fact, it is common for a routing layer to exist both on the message-sending machine and on any intermediate servers. When you use the WSE, this layer exists within both a message-sending client and the intermediaries built with the WSE.