Chapter 12: Coordination Frameworks for Web Services - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Chapter 12: Coordination Frameworks for Web Services

Description:

Conversation: a name for the protocol and a list of its interactions and ... DestinationInteraction href='Registration'/ SourceInteractionCondition href ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 20
Provided by: DrMunind5
Learn more at: https://www.csc.ncsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter 12: Coordination Frameworks for Web Services


1
  • Chapter 12Coordination Frameworks for Web
    Services

Service-Oriented Computing Semantics, Processes,
Agents Munindar P. Singh and Michael N. Huhns,
Wiley, 2005
2
Highlights of this Chapter
  • WSCL Web Services Conversation Language
  • WSCI Web Service Choreography Interface
  • WS-Coordination
  • Web service transaction types
  • BTP Business Transaction Protocol

3
Achieving Business Interoperation
  • The parties must
  • Know each others identity and location (presumes
    suitable directories)
  • Agree on the low-level transport protocols and
    encoding formats
  • Agree on the syntax and semantics of documents to
    be exchanged
  • Agree on their expectations about when different
    documents will be sent and received
  • This specification is termed a business protocol
  • An instance of a business protocol is a
    conversation (but sometimes the term is used to
    mean protocol watch out!)

4
Process Abstractions
  • Orchestration A process is a partial order of
    actions under the control of a central conductor
    akin to a workflow Global central
  • Choreography A process is an exchange of
    messages among participants akin to a
    conversation as described by WSCL and WSCI
    Global distributed
  • Collaboration A process is a joint set of
    activities among business partners Local
    distributed
  • Workflow narrower concept than process, which
    emphasizes control and data flows from a central
    perspective original idea behind modern
    orchestration

5
Parts of a WSCL Specification
  • WSCL Web Services Conversation Language
  • Document Type Definitions specify what types of
    XML documents will be exchanged
  • Interaction Types Send, Receive, SendReceive,
    ReceiveSend, Empty
  • ltInteraction interactionType"SendReceive"
    id"Payment"gt
  • ltOutboundXMLDocument id"Invoice"
  • hrefSchema"http//sc.edu/InvoiceRS.xsd"/gt
  • ltInboundXMLDocument id"Payment"
  • hrefSchema"http//ncsu.edu/Payment.xsd"gt
  • lt/InboundXMLDocumentgt
  • lt/Interactiongt
  • Transitions order of the interactions
  • ltTransitiongt
  • ltSourceInteraction href"Quote"/gt
  • ltDestinationInteraction href"Purchase"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Quote"/gt
  • ltDestinationInteraction href"CatalogInquiry"/gt
  • lt/Transitiongt

6
Concepts in WSCL
                                               
                                                  
                                              
7
Well-Formed Conversations
  • All interactions are reachable from the initial
    interaction
  • The final interaction is reachable from all
    interactions
  • If a transition from interaction A to interaction
    B specifies a SourceInteractionCondition, then
    all transitions from A to B do so
  • The final interaction and transitions to the
    final interaction unambiguously clarify for each
    participant when a conversation is finished

8
Example Conversation Definition
9
Example WSCL Specification 1
  • ltConversation name"StoreFrontServiceConversation"
    xmlns"http//www.w3.org/2002/02/wscl10"
    initialInteraction"Start" finalInteraction"End"
    gt
  • ltConversationInteractionsgt
  • ltInteraction interactionType"ReceiveSen
    d" id"Login"gt
  • ltInboundXMLDocument
    hrefSchemahttp//conv1.org/LoginRQ.xsd
  • id"LoginRQ"/gt
  • ltOutboundXMLDocument
    hrefSchemahttp//conv1.org/ValidLoginRS.xsd
  • id"ValidLoginRS"/gt
  • ltOutboundXMLDocument
    id"InvalidLoginRS" hrefSchemahttp//co
    nv1.org/InvalidLoginRS.xsd/gt
  • lt/Interactiongt
  • ltInteraction interactionType"Empty"
    id"Start" /gt
  • ltInteraction interactionType"Empty"
    id"End" /gt
  • lt/ConversationInteractionsgt

10
Example WSCL Specification 2
  • ltConversationTransitionsgt
  • ltTransitiongt
  • ltSourceInteraction href"Start"/gt
  • ltDestinationInteraction
    href"Login"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Login"/gt
  • ltDestinationInteraction
    href"Registration"/gt
  • ltSourceInteractionCondition
    href"InvalidLoginRS"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Logout"/gt
  • ltDestinationInteraction
    href"End"/gt
  • lt/Transitiongt
  • lt/ConversationTransitionsgt
  • lt/Conversationgt

11
WSCI Web Service Choreography Interface
  • Choreography refers to a global view of how
    messages are exchanged
  • WSCI describes the flow of messages exchanged by
    a Web service that is interacting with other
    services
  • WSCI is viewed as an enhancement to WSDL
    (inserted within a WSDL description)

12
Example WSCI Add-In to WSDL
  • ltcorrelation name"quotationCorrelation
    property"tnsquotationID/gt
  • ltinterface name"StockQuoteWS"gt
  • ltprocess name"ProvideStockQuote"
    instantiation"message"gt
  • ltsequencegt
  • ltaction name"ReceiveLogin
    role"tnsStockQuoteWS
  • operation"tnsQuoteToUser/L
    ogIn"/gt
  • ltaction name"ReceiveStockQuoteReque
    st" role"tnsStockQuoteWS"
  • operation"tnsQuoteToUser/P
    rovideQuote"gt
  • ltcorrelate correlation"tnsqu
    otationCorrelation"/gt
  • ltcall process"tnsLookupPrice
    "/gt
  • lt/actiongt
  • ltaction name"ReceiveLogout
    role"tnsStockQuoteWS
  • operation"tnsQuoteToUser/L
    ogOut"/gt
  • lt/sequencegt
  • lt/processgt
  • ltprocess name"LookupPrice"
    instantiation"other"gt
  • ltaction name"QueryNYSE"
    role"tnsStockQuoteWS
  • operation"tnsQuoteToUser/Quer
    yNYSE"/gt

13
WSCI Example for Transaction Compensation
  • ltsequencegt
  • ltcontextgt
  • lttransaction name"buyStock" type"atomic"gt
  • ltcompensationgt
  • ltaction name"NotifyUnavailable"
    role"NYSE operation"tnsNYSEtoBroker/NotifyUna
    vailable"/gt
  • lt/compensationgt
  • lt/transactiongt
  • lt/contextgt
  • ltaction name"BuyShare" role "Broker
    operation"tnsBrokerToNYSE/BuyShare"/gt
  • ltwhile name"BuyShares"gt
  • ltconditiongtdefsfundsRemainlt/conditiongt
  • ltaction name"BuyShare" role "Broker
    operation"tnsBrokerToNYSE/BuyShare"gt
  • ltcorrelate correlation"defsbuyingCorrela
    tion"/gt
  • lt/actiongt
  • lt/whilegt
  • lt/sequencegt
  • lt!-- Compensating Behavior for the Above
    Transaction --gt
  • ltexceptiongt
  • ltonTimeout property"tnsexpiryTime"
    type"duration" reference"tnsBuyShares_at_end"gt

14
WS-Coordination
  • WS-Coordination is the specification for a
    service whose job is to coordinate the activities
    of the Web services that are part of a business
    process
  • A coordination service is an aggregation of three
    services
  • Registration for parties to register with the
    coordinator
  • Activation to create an instance of a
    coordination context
  • Coordination protocol to define the specific
    protocol to be followed

15
WS-Coordination Service
16
WS-Coordination Service
17
WS-AtomicTransactionProtocol for an Atomic
Transaction
The travel agency and the airline can perform
2PC, but the museum can perform only a simple,
zero-phase update
18
Business Transaction Protocol (BTP)
19
Chapter 12 Summary
  • SOC needs an ability to specify interactions
    among business partners in a manner that respects
    the partners autonomy and heterogeneity
    conversations are a natural way to do so
  • SOC needs support for transactions
  • The more relaxed varieties are preferable, but
    there is a place for traditional transactions as
    well
  • The transactions are based on a small set of
    primitives
Write a Comment
User Comments (0)
About PowerShow.com