1.24k likes | 1.39k Views
www.sensoria-ist.eu. Choreography, Orchestration, and Contracts Languages and Techniques for Service Composition. Gianluigi Zavattaro http://cs.unibo.it/~zavattar. Department of Computer Science University of Bologna.
E N D
www.sensoria-ist.eu Choreography, Orchestration, and ContractsLanguages and Techniques for Service Composition Gianluigi Zavattarohttp://cs.unibo.it/~zavattar Department of Computer ScienceUniversity of Bologna Based on joint work with: Mario Bravetti, Claudio Guidi, Ivan Lanese, Fabrizio Montesi
Plan of the Talk Plan of the Talk • An “open” world of services • Service composition • Orchestration (bottom-up) • Choreography (top-down) • Contract-based service discovery • Output persistence • Strong Compliance • Message Queues • Conclusion and future work
Plan of the Talk Plan of the Talk • An “open” world of services • Service composition • Orchestration (bottom-up) • Choreography (top-down) • Contract-based service discovery • Output persistence • Strong Compliance • Message Queues • Conclusion and future work
An “open” world of services • Service Oriented Computing is used to design systems working in a heterogeneous and open environment where services: • may appear and disappear • may not be realiable/trustworthy • can be located worldwide • are subject to communication via network that can cause delays, failures,…
Let us organize problems… • Not only the issue of inter-operability (computing across different platforms): • Loose coupling: computing across enterprise boundaries (when you use a service you must account for possible deviations from the expected behavior) • Open endedness: new services can enter, and old ones leave, while computation proceeds (you should dynamically re-build your system at run-time)
An Example: Web Services • WSDL (interface definition language) • UDDI (service discovery) • SOAP (service invocation protocol) -1- -2- PUBLISH SERVICE FIND SERVICE -3- SOAP
Plan of the Talk Plan of the Talk • An “open” world of services • Service composition • Orchestration (bottom-up) • Choreography (top-down) • Contract-based service discovery • Output persistency • Strong Compliance • Message Queues • Conclusion and future work
Buying an electronic ticket Web search engines Public advertisements Friends or colleagues …
Buying an electronic ticket ticketing service 1 ticketing service 2 ticketing service n
Buying an electronic ticket ticketing service 1 request ticketing service 2 ticketing service n
Buying an electronic ticket ticketing service 1 ticketing service 2 no ticket ticketing service n
Buying an electronic ticket ticketing service 1 request ticketing service 2 ticketing service n
Buying an electronic ticket ticketing service 1 ticketing service 2 no ticket ticketing service n
Buying an electronic ticket ticketing service 1 ticketing service 2 request ticketing service n
Buying an electronic ticket ticketing service 1 ticketing service 2 ticket ticketing service n
Buying an electronic ticket[using an orchestrator] request orchestrator
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 orchestrator ticketing service n
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 request request orchestrator request ticketing service n
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 orchestrator ticketing service n
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 ticket orchestrator ticketing service n
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 cancel orchestrator cancel ticketing service n
Buying an electronic ticket[using an orchestrator] ticketing service 1 ticketing service 2 ticket orchestrator ticketing service n
Orchestration • The orchestrator provides a new “meta”-service • Central point of coordination: it invokes several “sub”-services • The client of the “meta”-service interacts only with the orchestrator
Orchestration Languages • Languages used to program orchestrators • XLANG: proposed by Microsoft in 2001 • WSFL: proposed by IBM in 2001 • WS-BPEL (formerly BPEL4WS): proposed in 2002 by a consortium including IBM, Microsoft, SAP, BEA,…
XLANG: based on -calculus Start; Receive(req1,req2); ( ( Invoke(req1)@srv1; Reply(req1) ) | ( Invoke(req2)@srv2; Reply(req2) ) ); End
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WSFL: based on Petri-nets Receive(req1,req2) Invoke(req1)@srv1 Invoke(req2)@srv2 Reply(req1) Reply(req2)
WS-BPEL: join XLANG and WSFL Start; Receive(req1,req2); ( ( Invoke(req1)@srv1;Send(intLink); Reply(req1) ) | ( Invoke(req2)@srv2; Recv(intLink); Reply(req2) ) ); End
WS-BPEL • Join the WSFL and XLANG approaches • Combine Petri-nets and -calculus • Add mechanisms for event, fault, termination and compensation handling • Timed events • Long-running transactions
Plan of the Talk Plan of the Talk • An “open” world of services • Service composition • Orchestration (bottom-up) • Choreography (top-down) • Contract-based service discovery • Output persistence • Strong Compliance • Message Queues • Conclusion and future work
Choreography Languages • Specification language (not executable) • No central point of coordination • The composed services interact reciprocally • WS-CDL: proposed by W3C in 2004 • BPEL4Chor: recently proposed by researchers involved in WS-BPEL
Web Service Choreography Description Language • Describe the interaction among the combined services from a top abstract view Choreography (e.g. WS-CDL) Top abstract view of whole system: each action is a communication involving two of its participants Orchestration (e.g. WS-BPEL) One Party detailed view of the system that orchestrates a part of it by sending (to other parties) & receiving messages
Similar to Specification of Chryptographic Protocols • Protocol for the request to a trusted entity of the creation of a session key: Alice Trent: Alice, Bob Trent Alice: {KAB}KA , {KAB}KB Alice Bob: {KAB}KB
WS-CDL • Global view of service interactions Seller Buyer Bank
WS-CDL • Global view of service interactions Seller Request Buyer Bank
WS-CDL • Global view of service interactions Seller Request Offer Buyer PayDescr Bank