Date post: | 18-Dec-2015 |
Category: |
Documents |
View: | 217 times |
Download: | 4 times |
CERN – European Organization for Nuclear Research
IT Department – Administrative Information Services
Service Oriented ArchitectureService Oriented Architecturedefinition and main conceptsdefinition and main concepts
Derek Mathieson
IT Department
CERN
Some content from Peter Campbell, ANZ Banking Group Australia
CERNIT-AIS
Problem StatementProblem Statement
Promote reuse– Open architecture
Systems Integration– Link-up Enterprise Information Systems
Interface with other companies– B2B transactions and processes
Increase Agility– Acquisition and/or merger– Changing Business models
CERNIT-AIS
SOA – A definition from the W3CSOA – A definition from the W3C
Typical characteristics of a SOA: Logical view
– defined by what a service does Platform neutral
– often XML based Description orientation
– service description is machine-processable. Message orientation
– defined in terms of the messages exchanged between requester and provider
Granularity– Coarse-grained
Network orientation– not an absolute requirement.
CERNIT-AIS
SOA Conceptual ArchitectureSOA Conceptual Architecture
Binding Choices: Static binding
– Not loosely coupled as the consumer will fail if the service is offline
Dynamic binding– Can allow runtime failover and load balancing– Service discovery at runtime can have serious performance issues– Less commonly used
ServiceConsumer
ServiceBroker(UDDI)
ServiceProvider
ServiceContract(WSDL)
Client Service
Bind & invoke
Register(UDDI Publish save_xxx)
Find(UDDI Inquiry find_xxx)
SOAP
XML
CERNIT-AIS
What are Web Services?What are Web Services?
XML XML
Application 1 Application 2
Applications communicating over the internet usingan agreed message format – encoded as XML
CERNIT-AIS
Packaging – SoapPackaging – Soap
HTTP Post
SOAP Envelope
SOAP Body
SOAP Header
CERNIT-AIS
Packaging – SoapPackaging – Soap
<s:Envelope xmlns:s="URN"><s:Header>
<s:Transaction xmlns:m="URN"> <m:TransactionID> 17389 </m:TransactionID
></s:Transaction>
</s:Header> <s:Body>
<n:purchaseOrder xmlns:n=“URN”><n:item>socks</n:item><n:quantity>1</n:quantity><n:unitPrice>3.95</n:unitPrice>
</n:purchaseOrder></s:Body>
</s:Envelope>
CERNIT-AIS
Description – WSDLDescription – WSDL
Web Services Description Language“Web Services Description Language
(WSDL) provides a model and an XML format for describing Web services.” w3c.org
CERNIT-AIS
Description – WSDLDescription – WSDL
Messages
Types
Operations
Encoding
Endpoint
CERNIT-AIS
TypesTypes<types> <schema targetNamespace="stockquote.xsd" xmlns="XMLSchema"> <element name="TradePriceRequest"> <complexType>
<all> <element name="tickerSymbol" type="string"/>
</all> </complexType> </element> <element name="TradePrice"> <complexType> <all><element name="price" type="float"/>
</all> </complexType> </element> </schema></types>
CERNIT-AIS
MessagesMessages
<message name="GetLastTradePriceInput">
<part name="body" element="xsd1:TradePriceRequest"/>
</message>
<message name="GetLastTradePriceOutput">
<part name="body" element="xsd1:TradePrice"/>
</message>
CERNIT-AIS
OperationsOperations
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceInput"/>
<output message="tns:GetLastTradePriceOutput"/>
</operation>
CERNIT-AIS
EncodingEncoding
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetLastTradePrice"> <soap:operation soapAction="http://example.com/GetLastTradePrice"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation></binding>
CERNIT-AIS
EndpointEndpoint
<service name="StockQuoteService"> <documentation>Stock service</documentation> <port name="StockQuotePort" binding="tns:StockQuoteSoapBinding"> <soap:address location="http://example.com/stockquote"/> </port></service>
CERNIT-AIS
Discovery – UDDIDiscovery – UDDI
Universal Description, Discovery and Integration
A UDDI Server acts as a registry for Web Services and makes them searchable.
CERNIT-AIS
Discovery – UDDIDiscovery – UDDI
UDDI RegistryInquiry
Publish
CERNIT-AIS
Discovery – UDDIDiscovery – UDDI
UDDI RegistryInquiry
Publish
CERNIT-AIS
SOA and Web servicesSOA and Web services Web services
– delivers key standards for implementing SOA XML
– Ideal candidate for loosely coupled inter-application data sharing The WS-* Standards Family
– EAI & B2B
Services architectureService contractMessage basedService directoryProtocol independentCoarse grained
Process orchestration(WS-BPEL)
SOA“The architecture”
RPC interactionsBinary XML
Web services specsWSDLSOAP & XMLUDDI HTTPDoc literal binding
Web services“The plumbing”
Author: Peter Campbell, ANZ Banking Group Australia
CERNIT-AIS
Web Services FrameworkWeb Services Framework
The Web Services Framework consists of the following technologies:
Wire stack
Descriptionstack
Discoverystack
Technologies that allow a service requestor to discover a service provider
e.g. UDDI. Production usage for static binding. Evolving to cover dynamic binding & discovery
Technologies that allow a common understanding between service requestor and service provider
Technologies that determine how a message is sent from the service requestor to the service provider
e.g. WSDL. Production usage. Evolving to cover security and other additional functions
e.g. SOAP. Production usage. Evolving to cover advanced messaging functions
CERNIT-AIS
Service
Service Interface
Service implementationService implementation
A service is a component built for reuse by other components in different execution contexts.
Services might need to be able to distinguish messages from individual consumers and also be able to correlate those messages into meaningful conversations.
Implementation details are hidden from the consumer
Provides service identification, definition of parameters, and passing results back to the consumer
CERNIT-AIS
Services and business processesServices and business processes
Services can be linked to form business processes using process orchestration
Business Process Orchestration
BusinessServices
TechnicalServices
Get customer
details
“Open account for customer”
Getaccount
type
Add account tocustomer
Locatecustomer
record
Checkcustomer
status
Presentation – user interface
Create Customer-Accountrecord
Lookupaccount
typetable
Retrieveaccountdetails
Business Process
Coarse Grained
FineGrained
Service Orchestration(Process Orchestration)
CERNIT-AIS
Service ReuseService Reuse
A service can be reused across multiple channels
AccountEnquiry
(staff assisted)
AccountEnquiry
(self service)
Business services
DeliveryChannels
CustomerService
AccountEnquiry
(self service)
ATM
Presentation layer
Branch
InternetInternet
Get AccountBalance
CERNIT-AIS
Integration roadmap to SOAIntegration roadmap to SOA
1. Point to point systems
3. Service Oriented Architecture & Enterprise Service Bus
Enterprise Service Bus
Routing
Services
Custom applications
Packageapplications
BusinessProcess
Orchestration
Adapter
Shared
System
TransformationAdapter
Legacy
System
Service(Process)
orchestration
HTTP
Internet
Business RulesEngine
App A(J2EE)
Legacy
ApplicationLegacy
Application
App B(.Net)
App D
(J2EE)
Warehouse
Finance
Sales App C
(.Net)
Partner
2. Message-based middleware with integration broker
Service Bus / MOM
App AApp B
Legacy
System
Shared
System
Adapter
Adapter
App C
App D
Sales
PartnerWarehouse
Finance
CERNIT-AIS
Integration – point to point systemsIntegration – point to point systems
Advantages– Connectivity, some integration
Issues:– Tightly coupled– Hard to change– Lack of common interface standards– Security issues– Limited integration and sharing of data– Single points of failure can bring down whole system– Not asynchronous – poor performance and scalability– Silo-based systems aligned with specific business units– Fine-grained services often not reused across the enterprise– Different integration formats
App A
Legacy
ApplicationLegacy
Application
App B
App D
Warehouse
Finance
Sales
App C
Partner
CERNIT-AIS
Message Oriented MiddlewareMessage Oriented Middleware
Advantages–Common application interface (API)–Provides some abstraction between consumer and provider–Asynchronous–Transformation–Content-based routing–Reuse services & transactions
Issues:–Proprietary service definition–Messages dependent on middleware–External (B2B) connectivity difficult–Some consumer-channel-message coupling–Limited service repository and manual registry
MOM
App AApp B
Legacy
System
Shared
System
Adapter
Adapter
App C
App D
Sales
PartnerWarehouse
Finance
CERNIT-AIS
Service Oriented Architecture & Enterprise Service BusService Oriented Architecture & Enterprise Service Bus
Enterprise Service Bus
Routing
Services
Custom applications
Packageapplications
BusinessProcess
Orchestration
Adapter
Shared
System
TransformationAdapter
Legacy
System
Service(Process)
orchestrationInternet
Business Rules Engine
Advantages– Service bus implementation– Service definition– Common application interface (API)– Provides some abstraction between
consumer and provider– Asynchronous– Transformation– Content-based routing– Reuse services & transactions
– Integration broker– Standard service description (via WSDL)– External (B2B) connectivity simplified via
Web services– Security and identity management provided
by WS-Security standards– Support for Event Driven Architecture
HTTP
CERNIT-AIS
Enterprise Service Bus (ESB) helps manage large number of services by providing horizontal value-adds such as:– Security– Transactions– Reliability– Service Virtualization
• Load Balancing• Message Distribution (Fan out and in)
What is ESB?What is ESB?
CERNIT-AIS
How does ESB Work?How does ESB Work? ESB works by using the extension mechanisms
built into SOAP:1. Message syntax and semantics can be extended with
headers2. Messages can be intercepted and worked on by
intermediaries Headers are not just syntax as in Mail Headers
– Semantics of who may/must process headers allows standardization of extensions. E.g., WS-Security
CERNIT-AIS
Event Driven Architecture (EDA)– Event triggered messages– Sender & Receiver have no knowledge
of each other– Queued messaging
• Store-and-Forward• Events published to a topic may be sent to
zero, one or many interested recipients.
Event Driven Architecture Event Driven Architecture (EDA)(EDA)
A
Subscriber
X
Y
Publisher
Publisher
msg1
msg2msg2
msg1
Subscribe to: msg1 & msg2
Broker
CERNIT-AIS
SOAP Interaction PatternsSOAP Interaction Patterns
ServerClient
1. Request-response (client to server and back)
Request
Response
ClientServer
2. Notification-response (server to client and back)
Notification
Response
ServerClient
3. One way(from client to server)
One way
ClientServer
3. Notification(from server to client)
Notification
SOAP supports the following four interaction patterns:
SOAP is able to support both remote procedure call (RPC) and document-style interactions, in either a synchronous or asynchronous fashion
CERNIT-AIS
ConclusionsConclusions
SOA– Is not a NEW idea
• But the pieces are now in place
– Facilitates• Modular design / architecture
Many implementations– Commercial & Open Source
CERNIT-AIS
CERNIT-AIS
Thank YouThank You
For More InformationFor More Information
Browse to:http://www.w3.org/TR/ws-arch
or Email:[email protected]