Professional Documents
Culture Documents
Jim Webber
SOA Practice Lead
ThoughtWorks
ThoughtWorks Overview
2
Roadmap
• Historical Perspective
• What is a Web Service?
• Evolution of Web Services
• Message-Orientation: The MEST Architectural Style
• Architecture
• Protocol
• Implementation
• Enterprise Issues
• Scalability
• Dependability
• Consistency
• Moving to SOA
• Summary
• Q&A
3
What is a Web Service?
• A service is piece of
application logic exposing
message-oriented
interface.
• Any scale from inter-process
to Internet
• A Web Service is a system
which exposes a message Application
oriented-interface whose
messages are in SOAP
format. SOAP message
• SOAP is the critical processor
differentiator.
• It is what differentiates a
Web Service from other SOAP Messages
kinds of services (e.g. OS
services).
• SOAP is the lowest point in
the WS stack. Network
4
In the Beginning...
6
The RESTifarian Jihad
• Seeing that the Web was good and that RPC was bad, the
RESTifarians waged war on the Web Services community.
• REST-ful services have a uniform API and exchange
messages using that API.
• The API is HTTP-like and allows messages to be sent
(POST) and responses to be solicited (GET)
• Along with PUT and DELETE etc.
• Unfortunately RESTful semantics aren’t always mappable
onto protocols other than HTTP.
• What’s SMTP GET?
• Imposing an API – even a uniform API – is too constraining.
• But the notion of exchanging messages is correct.
7
Web Service Architecture
8
Message-Orientation
Purchase order
system Purchase order
application
SOAP Messages
Example: ServiceA sends ServiceB a MessageX.
ServiceB responds with a MessageY or a
MessageZ depending on the content of the
10
Architectural Tenets
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030827SOAPDB/manifest
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030902SOAPDB/manifest
12
SOA and Web Services Aims
• Integration
• Reuse
• Agility
• Lower cost of development/ownership for applications
13
High Level Architecture
Administrative
domain
Service
Service
Administrative
Service
Administrative
domain
domain
Service
Service
Service
<wsdl>
<types /> Not validated
<definitions>
...
</definitions>
<interface>
…
</interface>
</wsdl>
WSDL contract
14
High Level Architecture Tasks
15
Architecture: Key WS-* Specs
• SOAP
• The lowest part of the Web Services stack.
• Consider messages in terms of:
• Content for functional requirements;
• Content for non-functional requirements.
• SOAP provides a transfer mechanism that combines both:
• SOAP body for transferring information pertinent to the functional
requirements;
• SOAP headers for transferring out-of-band information to address non-
functional requirements.
• WS-Addressing
• Remember - SOAP is the lowest layer in the WS stack!
• It is the transfer mechanism for Web Services
• Everything else is transport.
• WS-Addressing allows SOAP messages to be routed round a
system irrespective of the underlying transport.
16
SOAP + WS-Addressing
17
Protocol
18
Deriving Contracts
Protocol
• Note: contracts rather than interfaces
• Interface is an overloaded term that implies
type information
• No type information in Web Services, only
schematised messages
Contract
...
</wsdl:interfaces>
<wsdl:binding>
19
Contract and Policy
20
WSDL is not Object IDL
TransactionManagement)
(WS-ReliableMessaging)
SecureConversation)
Reliable messaging
• Metadata
Quality of service
(WS-AT/BA, WS-
Transactions
• WSDL, WS-Policy, WS-MetadataExchange
Security
(WSDL, Policy)
• Security
Metadata
Messaging
Addressing, notification, enumeration, etc.
• WS-AT/BA or WS-TransactionManagement
(WS-Addressing, WS-MessageDelivery, WS-Eventing, WS-
Notification, WS-Enumeration)
Transfer
SOAP
22
Implementation
Devices
resources
• The internal architecture Humans
• The layering of
service logic
messaging, logic, and
state is similar to the
classic N-tiered
architecture.
message processing
SOAP, WSDL, and
<env:Envelope>
processing
...
</env:header>
layer is interesting <env:Body>
...
though... </env:Body>
</env:Envelope>
SOAP messages
sport
23
Message Processing Layer
logic
• Allows the service logic to be incoming SOAP message
W SD L
header
header
SOAP Envelope
SOAP Envelope
<interface> <interface>
etc
</wsdl> </wsdl>
body
body
<interface> <interface>
… …
25
A Message-Oriented API
/* Inbound messages */
26
Service Logic
28
Enterprise Issues
29
Security
30
Secure Message Transfer
resources resources
message processing logical point -to-point SOAP message transfer message processing
31
Reliable Messaging
32
Reliable Messaging
33
Scalability
Data Tier
34
Dependability
35
State Sucks
Server Farm
Unknown Conversation
36
State is the DBA’s Problem!
Data Tier
Server Farm
37
Consistency
39
Tomorrow
40
The Future
41
Summary
• Messages are the source of truth, use them to decouple your service
from its consumers
42
Questions?