SOA 2002 IBM Corporation A Service Oriented Architecture
面象服务的体系架构(SOA) © 2002 IBM Corporation
为什么采用面向服务的体系架构? § A Service Oriented Architecture enables flexible connectivity of applications or resources by Representing every application or resource as a service with a standardized interface Enabling them to exchange structured information (messages, documents, ‘business objects’) Mediating the message exchange through an Enterprise Service Bus § This flexibility enables new and existing applications to be easily and quickly combined to address changing business needs. The ability to easily combine/choreograph applications allows IT services to more readily reflect business processes § The SOA infrastructure is also used to facilitate the management of business performance and quality of service 4
SOA的价值: SOA实现可变的IT架构 … Flexible Business Models Transformation Business Process Outsourcing Mergers, Acquisitions & Divestitures Composable Processes Requires Flexible IT Architecture Software Development Integration Infrastructure Management Development Infrastructure Management Service Oriented Architecture (SOA) 5 Composable Services
什么是服务? § A well-defined, invokable unit of business function § Accesses business data or facilitates a change of business data from one valid and consistent state to another. § Defined using explicit interfaces Independent of service implementations Provides contract between service requestors and service providers § Invokable through common communication protocols Provides interoperability and location transparency. 7
服务描述 § Services are described using a standardized interface (metadata) Defines the service, its operations, and input and output parameters Defines how the service is reached and its location § Input and outputs may be simple parameters or XML documents § An existing application can be given a service ‘façade’ The façade (e. g. an EJB) is then described as the service § Web Services Description Language (WSDL) is the standard used to describe the service 8
服务描述: WSDL § WSDL (Web Services Description Language) is an XML document that describes a Service using a number of key elements: A Port Type defines what the service does, and is described by a number of operations. For each operation the data that it receives and sends is described by a Message The Binding defines how the service (as described by the Port Type) is invoked e. g. SOAP/HTTP, SOAP/JMS. The Port specifies the address where the service is located 9
服务调用 § Services interact by exchanging data over an Enterprise Service Bus § The Enterprise Service Bus is a logical architectural construct Provides inter-connectivity services Services interact with each other based on the quality of service requirements of the individual transactions § ESB connects and integrates an enterprise's IT business In different locations, using different transports, across organizations § ESB mediates service requests and responses Performs transformation and routing Enables connection type transparency § ESB enables the use of multiple protocols e. g. SOAP/HTTP can be converted to SOAP/JMS and vice versa 10
企业服务总线(ESB) Central to the Workings of a Service Oriented Architecture Mediation Services Routing Transformation Event Services Publish and Subscribe Transport Services Synchronous/Asynchronous Persistent/Non-persistent Loosely-coupled/Tightly-coupled Standards Based HTTP/HTTPS with option for WS-Reliable. Messaging JMS, JAX-RPC, SOAP WS-Security, WS-Policy, WS-Addressing 11
服务的编排术 § Business processes are a set of activities carried out in a sequence § Services can be choreographed to implement a business process i. e. each step or activity in a business process is implemented by a service § The business process itself becomes a service § Service choreography is described by the Business Process Execution Language (BPEL) A standard proposed to OASIS for process definition § Service Choreography provides: Processes that combine applications and people Transactionality and compensation Manipulation of process data 12
服务的发现 Service Registry § A Service Registry or Directory Publishes service descriptions Finds business, services and service interfaces UDDI is a standard for a registry web service (see UDDI. org) § Service discovery may be at design time or run time Web. Sphere Studio provides Web Services Explorer to publish and search UDDI Service entries contain URL of its WSDL § A UDDI directory may be private to an enterprise § WSDL for services may be stored in local files and directories § ESB mediations may be used to determine service’s location at run time 13
SOA 的服务栈 § SOA uses Web Services specifications to implement its features § Many Web Services specifications are being standardized § IBM and other vendors have implemented these specifications, anticipating the standards § The Web Service function stack is rich and getting richer 14
如何构建SOA的系统 § Develop a service oriented mentality Everything is a service § Understand define services Good service decomposition is the challenge Remember coarse granularity Some service implementations will exist, others will need to be created § Determine service interfaces and interaction patterns What formats will be adopted for data exchange? What qualities of service will bound interactions? Where will mediation be required/appropriate? § Define service orchestrations in terms of supported business processes Composite services will generally reflect business processes? What are the business processes? Business models in Web. Sphere BI Modeler can prove invaluable here 15
OGSA Structure 20 System Management Sevices Grid Services Open Grid Services Architecture (OGSA) OGSI – Open Grid Services Infrastructure Web Services OGSA Enabled OGSA Enabled Security Workflow Database File Systems Directory Messaging OGSA Enabled Servers Storage Network Professional Services Autonomic Capabilities Applications
Grid和Web服务 Grid GT 1 Started far apart in apps & tech Web GT 2 OGS I Have been converging HTTP L, WSD WS-* WSRF L 2, D S W M WSD The definition of WSRF means that Grid and Web communities can move forward on a common base 21
ESB实现服务网格: 例证 Application Servers MQ MQ Message Brokers Integration Server Web Clients Portal Legacy Applications Web Browsers § The ESB within the enterprise will evolve based on QOS requirements required by service interactions § This will be augmented by mediations running in Message Broker and/or the Web Services Gateway. 23
总结 § Service Oriented Architecture provides the flexibility required to operate in an On-Demand Environment 24
- Slides: 24