It's 8:30am and there's a room full of geeks wanting to get deep down and dirty into the Web Service protocols. Omri is the Product Unit Manager for the Advanced Web Services group, so he's the man responsible for the WSE team. He demonstrated the secure, reliable and transacted demo that Bill Gates gave with IBM on 17 September. The slides for this session are available.
Positioning Indigo's Protocols
The wire protocols that Indigo uses are key to interoperability story. Omri is positioning Indigo as the Internet's L7 protocol, comparing Web Services as the top of an Internet stack above XML on top of HTTP on top of TCP on top of IP and onwards. Microsoft see Indigo as supporting applications between mobile devices, P2P, B2B and EAI style applications.
The Secure, Reliable and Transacted Demo
The demo between Microsoft and IBM showed a commitment to interoperability, as well as a commitment to making sure the protocols involved in web services were royalty free. The demo was a Supply Chain Management application involving a supplier managing inventory and ordering parts from an auto manufacturer. It demonstrated security, reliability and transactions in an interoperable way.
MindReef SoapScope - a better SoapTrace packet sniffer
Omri showed the messages flying on the wire using MindReef SoapScope, the same tool that Scott Hanselman used in his Learning To Love WSDL presentation at TechEd 2003 (the funniest presentation I've listened to). Werner also recommends it. It looks like this is a better approach than MSSoapTrace, which is so buggy that it makes development a horror. Are Microsoft going to fill this hole?
Web Service Design Principles
General-purpose, composable protocol framework. Web services allow a building block approach, rather than a monolithic stack like DCOM. The use of SOAP headers allows the various specifications to be improved and versioned in isolation, without having to redo everything. Omri mentioned that making the specifications composable was a challenge. He pointed out that WS-Attachement which was based on the idea of using MIME attachments, based on email, was a mistake that couldn't be combined with other SOAP specifications, like security that relied on SOAP headers. It became clear that to add security to attachments they would have to reinvent many of the same ideas used to secure SOAP messages: a better model would be to put the attachment within the SOAP envelope so that WS-Security using SOAP headers would provide security. Omri mentioned that they had learnt from their mistake and were proposing MTOM (message transmission optimization mechanism) as a SOAP-based attachment specification. As Martin Gudgin says, DIME is dead.
Architecture is meta-data driven, policy based. WSDL provides some meta-data about a server such as the basic information about messages and ports. However, this is not enough to describe what the service needs. This is where policy comes in. Policy provides another way of expressing the extra metadata that a service needs ( Basically schema is not enough to describe what the service requires). You can say things like I am a service that requires strong 128 key encryption. Also, I support HTTP but I am inside a trust domain with you so I can go faster by UDP or TCP. Deployment information and info about a service that can't be captured in WSDL is in policy.
Protocols are factored from both transports and applications semantics. Basically web services place information from the transport into the soap message, so rather than using HTTP request response model based on HTTP headers, the information is placed inside the SOAP message to provide abstraction from the transport.
Architecture allows intermediaries. Having intermediaries is useful for routing and other reasons.
Uniform data model for protocols/content. The same infoset is used for both the header and the body. It allows for header and body-based content-based routing.
Broad industry partnership. Nothing was going to get off the ground without interop. Interop was necessary for a transformational change. Omri says that Microsoft knows interop is essential if Web Services are going to be a revolutionary technology.
WS-Addressing
Addressing is a core part of the architecture, the work horse of the stack. It provides a mechanism to encapsulate identity information in an XML end point reference. There is a basic <Address> element that is the network address of the resource. There's also the <ReferenceProperties> element that can be used for extra information.
The idea is to allow people to host more than one service at a particular network address. So if there is a service facade it can host multiple services, without having to do ugly bizarre things with the URLs. The addressing mechanisms are transport neutral and the internal resource organisation is opaque.
The header has to have a to and action. It can also have a From, ReplyTo, FaultTo, MessageId (a unique id) and RelatesTo (that provides a way to correlate the message).
Attachments: WS-Policy, WS-PolicyAssertions, WS-PolicyAttachments
Policy provides a framework for making statements about resources. The policy can say that the service requires (such as transports and security). Policy can also be used at runtime to make sure that the messages meet these requirements.
WS-PolicyAssertions provide some basic requirements that can be expressed such as TextEncoding, Language, SpecVersion (Uri asserting compliance with a namespace spec) and MessagePredicate (XPath statements about the message).. WS-PolicyAttachments solves to the problem of how to attach policy to an endpoint (e.g. matching an address with a policy).
WS-MetadataExchange
This addresses how to get metadata from another endpoint. There isn't yet a specification to cover this although the demo used a simple get to retrieve policy, WSDL and schema. It was implemented in the bits using a simple GET mechanism. Kevin Hammond mentions some more details of how Indigo is doing it in the current bits.
WS-Trust
This defines how to broker existing trust relationships. It defines how to exchange security tokens using a security token service. The specification details a RequestSecurityToken message that is sent to a trust service, that replies with with a RequestSecurityTokenResponse. This is currently supported in WSE and Hervey Wilson, the lead developer has posted a code sample that demonstrates it. WS-Trust is one of the building blocks of WS-SecureConversation.
WS-SecureConversation
WS-SecureConversation defines a mechanism to allow clients to make multiple calls to a web service, without incurring the overhead of asymmetric encryption. It involves using a SecurityContext token based on symmetric encryption. Think of it as a security 'session' object. The token can be received using WS-Trust to request one from a security token service, or from having one party create one, or through negotiation.
WS-SecurityPolicy
This specification allows for policy statements about security tokens. It can be used to specify the types of tokens, the confidentiality or encryption requirements, the algorithms to use and the which parts of the message require signing or encryption.
WS-ReliableMessaging: better QoS, less code
Reliable messaging allows developers not to worry about an inconsistent network. It provides ExactlyOnce and in order messaging that saves developers from having to write code to worry about lost, duplicated or delayed messages or endpoint failure. Sent messages are stored in a persistent local store and are only removed when an ACK is received from the server, otherwise they are retransmitted. Early and Adopter have more discussion. Rebecca Dias has a Starbucks metaphor for the specification-challenged.
Transactions
Transactions are described by two specifications, WS-AtomicTransactions and WS-BusinessActivity, based on the WS-Coordination.
WS-Coordination. The common parts of the two-following specifications. It deals with how to set up a context for the transaction, based on WS-Addressing.
WS-AtomicTransactions. This is the standard two-phase commit (prepare, rollback or commit) using web services. It uses locks to prevent others accessing resources. It works best inside an organisation where you can trust the locks to be used correctly. Don Box calls this the 'anti-availability protocol'
WS-BusinessActivity. This is a more flexible approach that doesn't use rollbacks or locks. Instead transactions can be reversed using compensating actions. In this way the system continously moves forward, there is no need to roll something back (if money was credited into one account, but something else in the transaction failed, post a credit to correct it rather than using a transaction to lock and roll back the initial credit). It also removes the need for complete agreement between all resources before committing. Omri's example was a transaction that books a flight, hotel and car for the PDC. If the car isn't available, he still wants to make the trip and use a bus or a taxi, but there's no need to cancel the booking. This approach is best for loosely coupled (think external web services) situations, but isn't in the PDC Indigo bits (they think it's important, they just couldn't do it in time).