Download presentation
Presentation is loading. Please wait.
Published byStephany Barker Modified over 8 years ago
1
Service Oriented Integration Peter Dolog dolog [at] cs [dot] aau [dot] dk 2.2.05 Intelligent Web and Information Systems October 5, 2010
2
Outline Introduction to Service Orientation Message Oriented Middlewares Service Coordination Protocols 2 Peter Dolog, WE course 2010, Service Oriented Middleware
3
3 Copyright Springer Verlag Berlin Heidelberg 2004
4
Example: Norwegian.com Hotel and Flight 4 Peter Dolog, WE course 2010, Service Oriented Middleware
5
5 client presentation layer resource management layer application logic layer information system 3-tier architecture middleware Copyright Springer Verlag Berlin Heidelberg 2004
6
6 Peter Dolog, WE course 2010, Service Oriented Middleware client resource management layer application logic layer information system N-tier architecture middleware presentation layer Web server Web browser HTML filter Copyright Springer Verlag Berlin Heidelberg 2004
7
Introduction to Web Services at the Design Level 7 Peter Dolog, WE course 2010, Service Oriented Middleware
8
8 request response invoking execution thread invoked execution thread blocking period Copyright Springer Verlag Berlin Heidelberg 2004 Blocking/Synchronous Communication
9
9 Peter Dolog, WE course 2010, Service Oriented Middleware Nonblocking/Asynchronous Communication put invoking execution thread invoked execution thread queue fetch queue thread remains active Copyright Springer Verlag Berlin Heidelberg 2004
10
10 Peter Dolog, WE course 2010, Service Oriented Middleware RPC Abstraction Remote Procedure Call sockets TCP, UDP Internet Protocol (IP) Remote Procedure Call: hides communication details behind a procedure call and helps bridge heterogeneous platforms sockets: operating system level interface to the underlying communication protocols TCP, UDP: User Datagram Protocol (UDP) transports data packets without guarantees Transmission Control Protocol (TCP) verifies correct delivery of data streams Internet Protocol (IP): moves a packet of data from one node to another Copyright Springer Verlag Berlin Heidelberg 2004
11
11 Peter Dolog, WE course 2010, Service Oriented Middleware RPC – with web services this goes over SOAP -> INT course communication module client procedure call client stub bind marshal serialize send client process communication module server procedure server stub unmarshal deserialize receive server process dispatcher (select stub) Copyright Springer Verlag Berlin Heidelberg 2004
12
12 Peter Dolog, WE course 2010, Service Oriented Middleware client 1. BOT 4. procedure call 10. EOT client stub 2.register txn & create context 5.add txn id & context to call 11.request commit 14.confirm termination client process server 9. procedure server stub 6. extract context and txn id 7. register server for txn 13. participate in 2PC server process transaction manager 3. create txn id register txn register client for txn return txn id 8. lookup txn id register server for txn 12. lookup txn id run 2PC notify client of outcome Copyright Springer Verlag Berlin Heidelberg 2004
13
13 Peter Dolog, WE course 2010, Service Oriented Middleware Types of Middleware Object brokers Object monitors Message-oriented middleware Message brokers
14
Message Oriented Middlewares 14 Peter Dolog, WE course 2010, Service Oriented Middleware
15
15 Peter Dolog, WE course 2010, Service Oriented Middleware external application Input queue Input queue Output queue Output queue Reliable queuing system Request Quote Support Quote Copyright Gustavo Alonso, ETH
16
16 Peter Dolog, WE course 2010, Service Oriented Middleware dispatcher inventory manageme nt ERPshipping message-oriented middleware month- end closing new PO Copyright Springer Verlag Berlin Heidelberg 2004
17
17 Peter Dolog, WE course 2010, Service Oriented Middleware message broker core senderreceiver message broker with message brokers, custom message routing logic can be defined at the message broker level or at the queue level in basic MOM it is the sender who specifies the identity of the receivers Copyright Springer Verlag Berlin Heidelberg 2004
18
18 Peter Dolog, WE course 2010, Service Oriented Middleware dispatcher (publisher) inventory manageme nt (subscrib er) ERP (subscrib er) shipping (subscrib er) message broker month- end closing (subscrib er) new PO Copyright Springer Verlag Berlin Heidelberg 2004
19
19 Peter Dolog, WE course 2010, Service Oriented Middleware admi n message broker MB-A message broker MB-B clie nt … admi n clie nt … admi n message broker MB-C clie nt … administrative domain A administrative domain B administrative domain C Copyright Springer Verlag Berlin Heidelberg 2004
20
20 Peter Dolog, WE course 2010, Service Oriented Middleware DBMS applications message broker SmartQuotation adapter e-mail adapter database adapter SmartQuotation SmartForecasting adapter SmartForecasting XYZ adapter XYZ integrating application (contains the composition logic) Copyright Springer Verlag Berlin Heidelberg 2004
21
21 Peter Dolog, WE course 2010, Service Oriented Middleware message broker SmartQuotation adapter SmartQuotation SmartForecasting adapter SmartForecasting RFQ processing 1A6 BC 7 24 3 5 8 at systems startup time (can occur in any order, but all must occur before RFQs are executed) A: subscription to message quote B: subscription to message quoteRequest C: subscription to message newQuote at run time: processing of a request for quote. 1: publication of a quoteRequest message 2: delivery of message quoteRequest 3: synchronous invocation of the getQuote function 4: publication of a quote message 5: delivery of message quote 6: publication of a newQuote message 7: delivery of message newQuote 8: invocation of the createForecastEntry procedure Copyright Springer Verlag Berlin Heidelberg 2004
22
22 Peter Dolog, WE course 2010, Service Oriented Middleware check if offered product check if worth proceeding get quote from quotation system get quote from supplier enter quote in forecasting system send quote to customer ContractExists=true ContractExists=false Offered=true Offered=false GoAhead=true update quotation system variables: QuoteReferenceNumber: int Customer: String Item: String Quantity: int RequestedDeliveryDate: Date DeliveryAddress: String GoAhead: Bool ContractExists: Bool Offered: Bool else Copyright Springer Verlag Berlin Heidelberg 2004
23
23 Peter Dolog, WE course 2010, Service Oriented Middleware workflow engine resource broker completed work items inbound queue resource 1 resource 2 resource n 1 2 4 5 3 workflow definitions outbound queues workflow designer Copyright Springer Verlag Berlin Heidelberg 2004
24
24 Peter Dolog, WE course 2010, Service Oriented Middleware Copyright Gustavo Alonso, ETH
25
Examples from wikipedia For an open source example which is in production on MSN.com and Microsoft.com, see Distributed Publish/Subscribe Event SystemDistributed Publish/Subscribe Event System Java Message Oriented Middleware (MOM) FUSE Message BrokerFUSE Message Broker open source message broker APE (AJAX Push Engine) JORAM IBM WebSphere MQ Solace Systems Flow-based programming XmlBlasterXmlBlaster Open Source MOM System 25 Peter Dolog, WE course 2010, Service Oriented Middleware
26
Service Coordination Protocols 26 Peter Dolog, WE course 2010, Service Oriented Middleware
27
27 Peter Dolog, WE course 2010, Service Oriented Middleware 1: requestQuote 2: orderGoods 4: makePayment customer (client) supplier (Web service) The internal business logic of clients and Web services must support the conversation, and maintain the state across different operation invocations belonging to the same conversation. The interaction between clients and services is often formed by a set of operation invocations (i.e., it is a conversation). A service provider may support some conversations while disallowing others. Copyright Springer Verlag Berlin Heidelberg 2004 3:confirmOrder
28
28 Peter Dolog, WE course 2010, Service Oriented Middleware supplier customer 1:requestQuote 2:orderGoods 5:makePayment warehouse 3:checkShipAvailable 7:getShipmentDetail 8:confirmShipment 9:confirmShipment 6:orderShipment 4:confirmOrder Copyright Springer Verlag Berlin Heidelberg 2004 Various Roles and Conversation Participants
29
29 Peter Dolog, WE course 2010, Service Oriented Middleware quote requested goods ordered requestQuote cancelOrder order canceled order completed orderGoods makePayments Copyright Springer Verlag Berlin Heidelberg 2004 Valid States and Messages orderGoods, from Customer, to Supplier
30
30 Peter Dolog, WE course 2010, Service Oriented Middleware requestQuote orderGoods confirmOrder getShipmentDetail confirmShipment supplier customer warehouse checkShipAvailable makePayment orderShipment confirmShipment Copyright Springer Verlag Berlin Heidelberg 2004 Interaction Modeling
31
31 Peter Dolog, WE course 2010, Service Oriented Middleware requestQuote (to supplier) checkShipAvailable (to warehouse) confirmOrder (to customer) orderGoods (to supplier) cancelOrder (to customer) makePayment (to supplier) orderShipment (to warehouse) getShipmentDetails (to customer) confirmShipment (to warehouse) confirmShipment (to supplier) supplierwarehousecustomer warehouse confirms warehouse cancels Copyright Springer Verlag Berlin Heidelberg 2004 Activity Graphs
32
32 Peter Dolog, WE course 2010, Service Oriented Middleware requestQuote (to supplier) confirmOrder (to customer) orderGoods (to supplier) cancelOrder (to customer) makePayment (to supplier) getShipmentDetails (to customer) confirmShipment (to warehouse) supplierwarehousecustomer warehouse confirms warehouse cancels Copyright Springer Verlag Berlin Heidelberg 2004 Views Based on Roles
33
33 Peter Dolog, WE course 2010, Service Oriented Middleware manufacturinghealth care…telecomfinance support for protocols such as transactionality, reliability, security,… Web services executing vertical protocols. The main focus of standards such as RosettaNet, xCBL, and part of ebXML is to describe protocols at this level. other Web services middleware (e.g., SOAP routers) service provider middleware for horizontal protocols provides properties and guarantees to the execution vertical protocols. Standards such as WS-Coordination, WS-Transaction, and part of ebXML fit here. SOAP messages Copyright Springer Verlag Berlin Heidelberg 2004 Horizontal vs. Vertical Protocols
34
34 Peter Dolog, WE course 2010, Service Oriented Middleware service provider service requestor P1P1 P 2, P 3 P 4, P 5 service requestor Copyright Springer Verlag Berlin Heidelberg 2004 Generic Conversation
35
35 Peter Dolog, WE course 2010, Service Oriented Middleware P1P1 P 2, P 3 P 4, P 5 conversation controller object for P 1 object for P 2 object for P 3 object for P 4 object for P 5 P1P1 P2P2 P3P3 P4P4 P5P5 service requestor service provider clients invoke operations at the same address the controller dispatches messages to the appropriate implementation object Copyright Springer Verlag Berlin Heidelberg 2004 Generic Controller
36
36 Peter Dolog, WE course 2010, Service Oriented Middleware service provider HTTP server SOAP router (with conversation controller) SOAP messages on HTTP transport EJB EJB container conversation ID/object mapping Copyright Springer Verlag Berlin Heidelberg 2004 Conversation Ids in the Message Headers
37
37 Peter Dolog, WE course 2010, Service Oriented Middleware service requestor B B conversation routing, compliance verification horizontal protocol implementation H H H B: conversation compliant with a business protocol H: conversation compliant with an horizontal protocol object (Web service implementation) horizontal protocol implementation service provider Copyright Springer Verlag Berlin Heidelberg 2004 Horizontal and Vertical Protocol Coordination
38
38 Peter Dolog, WE course 2010, Service Oriented Middleware object (W1) horizontal protocol handler (A) object (W2) horizontal protocol handler (B) A’s port reference B’s port reference A’s port reference A’s role B’s role conversation controller conversation controller protocol messages Copyright Springer Verlag Berlin Heidelberg 2004 Example
39
39 Peter Dolog, WE course 2010, Service Oriented Middleware Web service coordinator Web service coordinator (a) central coordination (b) distributed coordination Copyright Springer Verlag Berlin Heidelberg 2004
40
40 Peter Dolog, WE course 2010, Service Oriented Middleware CreateCoordinationContext -... - coordination type - current context CreateCoordinationContextResponse -... - coordination context - identifier - coordination type - registration service -... ActivationCoordinatorPortType coordinator ActivationRequestorPortType Web service Copyright Springer Verlag Berlin Heidelberg 2004 WS-Coordination – Activation
41
41 Peter Dolog, WE course 2010, Service Oriented Middleware register -... - protocol identifier - participant protocol service registerResponse -... - coordinator protocol service RegistrationCoordinatorPortType coordinator RegistrationRequestorPortType Web service Copyright Springer Verlag Berlin Heidelberg 2004 Participant Registration
42
42 Peter Dolog, WE course 2010, Service Oriented Middleware protocol-specific messages from participant to coordinator protocol-specific messages from coordinator to participant XCoordinatorPortType coordinator XParticipantPortType Web service Copyright Springer Verlag Berlin Heidelberg 2004 Protocol Specific Message Exchange
43
43 Peter Dolog, WE course 2010, Service Oriented Middleware Protocol Specific Messages/ WS Transaction – BA
44
44 Peter Dolog, WE course 2010, Service Oriented Middleware Web service A activation participant registration participant protocol participant coordinator C activation coordinator registration coordinator protocol coordinator Web service B activation participant registration participant protocol participant 1. create CC 2. X1 3. register 4. protocol coordinator 5. operational message 6. register 7. protocol coordinator 8. protocol-specific message 9. protocol-specific message Web service implementation Copyright Springer Verlag Berlin Heidelberg 2004
45
45 Peter Dolog, WE course 2010, Service Oriented Middleware Web service Acoordinator C a Web service Bcoordinator C b 1. create CC 2. X1 3. register 4. protocol coordinator 5. operational message 6. create CC 7. X2 8. register 9. register 10. protocol coordinator 11. protocol coordinator 12. protocol message 13. protocol message 14. protocol message 15. protocol message Copyright Springer Verlag Berlin Heidelberg 2004
46
46 Peter Dolog, WE course 2010, Service Oriented Middleware coordinator n XCoordinatorPortType XParticipantPortType coordinator n + 1 XCoordinatorPortType XParticipantPortType Web service n + 1 XParticipantPortType Copyright Springer Verlag Berlin Heidelberg 2004
47
47 Peter Dolog, WE course 2010, Service Oriented Middleware atomic transaction coordinator CompletionCoordinatorPortType CompletionWithAckCoordinatorPortType PhaseZeroCoordinatorPortType 2PCCoordinatorPortType OutcomeNptificationCoordinatorPortType CompletionParticipantPortType CompletionWithAckParticipantrPortType PhaseZeroParticipantrPortType 2PCParticipantPortType OutcomeNptificationParticipantPortType ActivationCoordinatorPortType RegistrationCoordinatorPortType RegistrationParticipantPortType WS-Coordination interfaces needed for chaining WS-Transaction interfaces WS-Transaction interfaces needed for chaining Copyright Springer Verlag Berlin Heidelberg 2004
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.