Lecture 1 SOA suweilzueyou com SOA Web Service
Lecture 1 SOA 苏伟 suweilzu@eyou. com
SOA & Web Service 教育部-IBM��� 合改革� 目 Outline § What is SOA? § SOA Design Principles § SOA Technologies and Standards § SOA Method and Architecture Lan Zhou University
What is SOA?
SOA & Web Service 教育部-IBM��� 合改革� 目 Software Architecture § The software architecture of a program or computing system is the structure or structures of the system, which comprise software elements, the externally visible properties of those elements, and the relationships among them. Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 What is SOA? § Service-Oriented Architecture (SOA) is a set of principles and methodologies for designing and developing software in the form of interoperable services. § These services are well-defined business functionalities that are built as software components that can be reused for different purposes. § SOA design principles are used during the phases of systems development and integration. § http: //en. wikipedia. org/wiki/Serviceoriented_architecture Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Defining SOA § SOA is a form of technology architecture that adheres to the principles of service-orientation. When realized through the Web services technology platform, SOA establishes the potential to support and promote these principles throughout the business process and automation domains of an enterprise. ---By Thomas Erl Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA is: § An architectural style whose goal is to achieve “loose coupling” among interacting and contracted services via communication protocol. § An Internet-native distributed computing model § Its features are: – loosely coupled, – protocol independent, – standards-based, Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA is not a new idea n RPC (Remote Procedure Call) to invoke a procedure anywhere as if on the same machine • RMI (Remote Method Invocation), • CORBA (Common Object Request Broker Architecture) • DCOM (Distributed-Component Object Model) Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA – The next architectural evolution Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Why SOA? – business point of view(1) § Business motivation: – Businesses innovate at an ever increasing pace – Success requires broad intra and interoperability for enterprises. • across a heterogeneous set of platforms, applications and programming languages, etc. – Future e-business • Interoperability via Internet – However, • High complexity for distributed applications leads to high IT complexity and costs • Quick response to market needs ‘just-in-time’ integration for effective B 2 B e-Commerce and global e-Marketplace Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Why SOA? – business point of view(2) § Benefits of SOA: – Deploying loosely coupled service – Integrating value chains for large-scale e-business collaborations – Creating highly dynamic and distributed applications that span business boundaries – Reducing costs by reusing existing legacy services – Increasing revenue by assembly of existing services into larger and value-added services – And many more • A good article on business value of SOA – http: //www. dmreview. com/article_sub. cfm? article. I D=8262 Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Flexible business demands flexible IT Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Why SOA? – technical point of view § Software reuse & integration: mission impossible – Reuse is a waste of time, as the future is unforeseeable – Integration is too hard, as the past is not understandable § Various OO implementation of RPC to invoke a procedure anywhere, such as RMI, CORBA, DCOM § However, the old, well-known problems of RPC remain: – Single-vendor, non-interoperable solutions (even CORBA) – Both CORBA and DCOM use binary protocols (not readable and difficult through firewall) – For tightly coupled systems only (even they say they are not) Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service § A repeatable task, for example: • Open an account • Perform a credit check • A query Lan Zhou University
SOA Design Principles
SOA & Web Service 教育部-IBM��� 合改革� 目 Characteristics of service-oriented architectures § The SOA approach to architecture is intended to promote versatility through encapsulation and loose coupling, by exposing functions as services § Only one (logical) instance of each service implementation exists at runtime or deployment time – Each service is deployed in only one place and is invoked remotely by service consumers Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Characteristics of service-oriented architectures § Any function can be a service but need not be. The criteria for whether a function needs to be a service is based on its reuse potential – Business process services • create. Stock. Order, reconcile. Account, renew. Policy – Business transaction services • check. Order. Availability, create. Billing. Record – Business function services • calculate. Dollar. Value. From. Yen, get. Stock. Price – Technical function services • audit. Event, check. User. Password, check. User. Authorisation Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles § Services are loosely coupled – A service is defined solely by an implementationindependent interface – Services should be able to change their implementation without impacting service consumers § Services are location transparent – Services should not expose any of the deployment details at their interface – Location transparency is achieved by the use of services brokers, service registries, or other intermediaries to connect the service consumer to the service provider Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles § Services are interoperable – Service interoperability highlights the need for standardized interfaces and the adoption of open standards § Services are composable – Services can be aggregated to implement services at a higher-level of granularity Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 What is loose coupling? § SOA is an architectural style with characteristics such as loose coupling, reuse, and simple and composite implementations § Loosely coupled services, even if they use incompatible system technologies, can be joined together dynamically to create composite services or disassembled just as easily into their functional components § Service requesters depend on the interface and not on the service provider’s implementation § Various aspects of service interactions such as time (availability), protocol, message format, language, platform, or location are specified in the service interface separate from the service implementation Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Reuse § Concept – A service interface should be designed with reuse in mind – Anticipate reuse scenarios Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Reuse § Consequences – Well factored service interfaces: • Anticipate usage scenarios and consequently facilitate reuse – Poorly factored service interfaces: • Hinder reuse and encourage functional duplication, which can result in architectural decay (loss of architectural integrity over time) Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Encapsulation § Concept – Services should not physically expose any implementation details or deployment details at their interface design § Consequences – Well encapsulated services: • Benefit adaptability by decoupling the service implementation characteristics and service deployment characteristics from the client implementation • In circumstances where an implementation specific or a deployment specific characteristic needs to be changed, then the client remains unaffected –– Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Encapsulation § Consequences – Poorly encapsulated services: • Hinder adaptability as a consequence of coupling the client with the service implementation characteristics or service deployment characteristics • In circumstances where an implementation specific or a deployment specific characteristic needs to be changed, then both the client implementation and the service implementation need to be changed Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Statelessness § Concept – Service implementations should not hold conversational state across multiple requests. • Communicate complete information at each request. – Each operation should be functionally isolated (separate, independent). Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Statelessness--Consequences § Stateless/connectionless services: – Benefit adaptability owing to the independence that exists between successive service requests of a client and the service instance that fulfils each request. • This is an enabler for improved runtime qualities (for example, service request throughput or concurrent service requests) using pooling and sharing of service instances (client-service independence). § Stateful services: – Hinder adaptability as a consequence of tight dependency (coupling) between a clients successive service requests • There is then a need for a specific service instance to fulfil a particular request (client-service affinity). • Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Operational parameter granularity § Concept – Service operation parameters should be coarse grained and allied to the operation semantics. • This translates to as coarse grained as possible while maintaining semantic integrity within the context of the service operation Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Operational parameter granularity-- Consequences § Coarse-gained parameter lists: – Benefit consumability and comprehension with concise and semantic signatures § Fine-grained parameter lists: – Burden consumability and comprehension with clumsy, verbose signatures, resulting in badly formatted, difficult to read code Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Semantic operations § Concept – Services, operations, and operation parameters should be named using language that conveys the meaning of the operations to the consumer, and should represent action of the operation § Consequences – Well named services: • Benefit comprehension of service consumers and service maintainers by implying the service semantics or behavior, and service interaction patterns – Poorly named services: • Burden comprehension and degrade semantic integrity Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service design principles: Efficient resource utilization § Concept – Service implementations should be optimistic, brief, and courteous with resource usage. § Consequences – Optimistic (loosely coupled) resource usage: • Facilitate higher system performance qualities; concurrency, scalability and availability, through courteous use of resources. – Pessimistic (tightly coupled) resource usage: • Hinder higher system performance qualities through resource monopolization and obstruction; locking and blocking. Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Service granularity Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 How do you apply these principles? You can work towards this goal in a number of ways: § Declarative techniques – Provide separation of concerns between the application logic and the configuration of middleware § Code generation – WSDL code generation can hide the complexities of SOAP, HTTP and JMS from the developer § Tooling – Can help reduce complexity for the developer § Model-driven development – Exploiting both tooling and code generation capabilities to simplify development Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Loose coupling is enabled by an ESB § An ESB (enterprise service bus) is an intermediaryoriented approach Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Point-to-point service interactions Lan Zhou University
SOA Technologies and Standards
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA Standards Stack Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA with Web Services - standards stack Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA: An EAI Perspective realized through ESB Lan Zhou University
SOA Method and Architecture
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA Architecture Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA life cycle § The SOA life cycle extends the infrastructure and management in support of SOA Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 SOA life cycle governance Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 References § IBM SOA Overview, Getting Started with SOA, IBM Courseware § ftp: //ftp. software. ibm. com/software/solution s/pdfs/013195654 X_Carter_11. pdf § http: //en. wikipedia. org/wiki/Serviceoriented_architecture Lan Zhou University
SOA & Web Service 教育部-IBM��� 合改革� 目 Thank you! Lan Zhou University
- Slides: 45