1 / 56

面向 服务概述

面向 服务概述. 冯志勇 天津大学计算机学院 2008 年 10 月. 提纲. SOA 的定义及其商业和技术价值 面向服务 vs. 面向对象 面向服务的架构 vs. 分布式对象架构. 什么是 SOA. 正像上个世纪的对象似的 , 服务是一个很酷的时髦词,但是,今天 SOA 是一个经常被人错误地理解的话题 .

roz
Download Presentation

面向 服务概述

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 面向服务概述 冯志勇 天津大学计算机学院 2008年10月

  2. 提纲 • SOA的定义及其商业和技术价值 • 面向服务 vs. 面向对象 • 面向服务的架构 vs. 分布式对象架构

  3. 什么是SOA • 正像上个世纪的对象似的, 服务是一个很酷的时髦词,但是,今天SOA是一个经常被人错误地理解的话题. “My architect thinks it’s service-oriented, my developers insist it’s object-oriented, and my analysts wish it would be more business-oriented. All I can tell you is that it isn’t what it was before we started building Web services.”

  4. 什么是SOA • 对不同的人,服务的含义不同: • 松耦合的软件构件,它们相互通过标准的Internet技术动态的交互 (Gartner). • 一个有URI识别的软件应用,它的接口和绑定能够通过XML制品被定义、描述和发现,并且支持采用基于满足Internet-based protocolsXML消息机制与其它应用交互A (W3C).

  5. 什么是SOA • 通过Internet使用开发标准的一段商业逻辑 (Microsoft). • 通过Web上标准协议提供的,封装好的、松耦合的、契约化的软件功能 (DestiCorp). • 服务独立于应用程序和运行计算平台的是自包含的、可重用得软件模块,它有定义良好的接口,并允许业务任务和需要执行任务的具体IT构件1:1 影射。

  6. 什么是SOA • SOA的定义仍在发展变化. • 一组能够被调用的构件,并且其接口描述能够被发布和发现 (W3C). • SOA是一种client/server 设计方法,其中的应用程序由软件服务和软件服务消费者组成 (also known as clients or service requesters). SOA 不同于一般的client/server 模式,其定义强调软件构件中的松耦合,并且采用分离的接口 (Gartner).

  7. 什么是SOA • SOA是一个业务驱动的IT架构方法,它可以把业务集成为连接的可重复的商业任务或服务. SOA使得 IT系统能够快速、容易和经济的适应业务需求的迅速改变,从而有助于今天的业务创新. SOA协助客户增强他们业务过程的灵活性,强化了其底层基础结构,通过在不同的应用和信息资源之间建立连接重用其原有的IT 投资。 (IBM) • A New Way of Thinking

  8. A CD Player Example • Take a CD for instance. If you want to play it, you put your CD into a CD player and the player plays it for you. The CD player offers a CD playing service. Which is nice because you can replace one CD player with another. You can play the same CD on a portable player or on your expensive stereo. They both offer the same CD playing service, but the quality of service is different.

  9. Application 1 Application 2 Found Auto-searchable Registration Registration Registration Organization Z Organization Y Organization X The SOA Story Business Process Service broker Services Component Library

  10. 为什么要面向服务? Distributed Data Distributed Computation Distributed users …..

  11. There must be consensus On 互操作性! 为什么要面向服务? • 互操作问题 • 异构的网络协议 • 异构的硬件平台 • 异构的操作系统 • 异构的应用程序格式……

  12. 为什么要面向服务? Static On Demand Changing Market Dynamics Business Technology Business process decision-making Rigid organizational structure Slow and steady economic growth Long-term product lifecycle Passive operational risk management Fixed Costs Proprietary systems Labor-intensive Users adapt to technology Collaborative, integrated value nets Dynamic, adaptive, learning Unpredictable fluctuations Shortening product lifecycle Proactive risk management Increased focus on privacy and security Variable costs Open, integrated systems Self-healing, self-managing systems Technology adapts to users

  13. 为什么要面向服务?

  14. 业务驱动 • 新机遇 • 产品创新和服务从关键的特色赢得竞争优势. • 传统技术适应新商业模型的能力,从而使更多的渠道来获得收入。 • 节约成本 • 通过削减整体花费降低成本。 • 敏捷业务 • 由于恶性竞争,每一个错过的商业机会的企业职位低于其竞争对手。 有能力的企业能够快速应对各种业务的刺激将是关键的生存。 • 更快的上市时间,提高客户满意度,还客户的忠诚度。这样的结果是增加了商业和更高的收入。 • 能够提供按需服务,实时24 / 7 。 • 无缝协作的合作伙伴和客户有助于提高服务质量和上市时间。

  15. SOA 商业价值 to IT 管理 • 使得互操作成为IT应用的固有特征. • 提供了一个 time-to-market 快速方法 • 快速响应业务条件变化 • 降低了重复性工作,最大化已存在系统的价值

  16. 技术驱动 • 开放Openness • 对一个组织而言,依赖于它几乎无法控制外部技术和平台供应商是危险的。然而,采用开放的标准减轻这一风险。 • 节约成本Cost Saving • 减少维护费用 • 增加重用IT投资,以提高生产力,从而提高投资回报率(ROI). • 敏捷Agility • 松耦合增加应用的灵活性,并降低新的应用程序产品上市时间。 • 无缝的可扩展性以最低成本,以满足季节性增加负荷。

  17. 技术驱动 • 软件体系结构设计原则 • 抽象 • 关注点分离 • 预期变化 • 设计重用

  18. 相关概念 Enterprise Integration Object Oriented BPM SOA Distributed Computing CBSD Web Application CBSD: Component-Based Software Development BPM: Business Process Management

  19. SOA 发展 Client/Server SOA WSDL CORBA NFS VT3270 MQ RPC EJB VT100 EAI SOAP TCP/IP WWW Stored Procedure Modular2 COBOL Smalltalk Pascal Java PROLOG Ada C# Distributed Computing Program Paradigm SIMULA Assembler C++ 1950 1960 1970 1980 1990 2000

  20. SOA 特点 • 基于开放标准 • 鼓励固有的内在重用 • 鼓励强调互操作性的 • 可扩展性 • 根本上自主 • 促进动态发现 • 促进架构的组合性 • 促进整个企业松散耦合 • 支持逐步实施

  21. SOA Potential Benefits • Improved Integration, intrinsic interoperability • Inherent reuse • Streamlined architectures and solutions • Leveraging the legacy investment • Establishing standardized XML data representation • Focused investment on communications infrastructure • Best-of-breed alternatives • Organizational agility

  22. SOA Principles • The business drives the services, and the services drive the technology. • Business agility is a fundamental business requirement. • A successful SOA is always in flux.

  23. SOA Standards Organizations

  24. 面向服务vs. 面向对象

  25. 概念关系 • 几个面向服务的原则源自面向对象的原则 • abstraction -- decomposition • Encapsulation -- Reusability • Interface first -- Loose coupling • Composition -- Autonomy • Statelessness -- Discoverability • 一些面向对象的原则,如继承权,不符合面向服务的世界。 • 一些面向服务的原则,如松耦合和自主,不直接来自面向对象。

  26. Conceptual Differences Service-Orientation Object-Orientation Loose coupling between units of processing logic. Based on predefined class dependencies, resulting in more tightly bound objects. Coarse-grained interfaces (service description) Message-based communication Fine-grained interfaces (APIs), Communication based on RPC or local API calls. Large unit of processing logic (service), May vary significantly in scope. Unit of logic (object) tend to be smaller and More specific in scope. Promotes the creation of activity-agnostic units of processing logic (services) that are driven into action by intelligent units of communication (message). Encourages the binding of processing logic with data, resulting in highly intelligent units (object). Prefers that units of processing logic (services) be designed to remain as stateless as possible. Promotes binding of data and logic, resulting In the creation of more stateful units (objects).

  27. Technology & Methodology Programming Language Modeling OOAD OO Framework OODB OO Process model Simula Smalltalk Objective C C++ Java UML Standard Specification Technology & Methodology Modeling XML UDDI ebXML WSDL SOAP OWL BPEL WSFL XLANG MDA SO Framework Ontology / Service DB SO lifecycle process The Paradigm Shift Object-Oriented Concept & Architecture Service-Oriented Concept & Architecture

  28. 面向服务的体系结构与分布式对象架构

  29. 概念联系 • SOA彻底背离客户服务器结构。目前SOA仍采用一些最初用于建立客户机服务器应用程序的技术。引入SOA更为复杂,与简单的两层客户机服务器架构形成鲜明对比 • 分布式互联网架构有许多共同之处与SOA ,其中包括大量的技术。然而, SOA有鲜明的特色有关技术和它的基本设计原则。

  30. Distributed System Architecture Server Server Data Management Application Processing Data Management Server Server Application Processing Data Management Presentation Two Tier with Thin Client Client Presentation Application Processing Two Tier with Fat Client Client Presentation Client Three Tier

  31. Multi-Tier System Architecture • RPC-based • Client and middleware server is tightly coupled • Remote Object based • Remote objects communicates through standard interface languages • Object models: OMG CORBA, SUN Java RMI, MS DCOM • Web based • Browser + “Dynamic content generation” • Enabling techniques: CGI, Java Servlet/JSP, MS ASP

  32. Distributed Object Computing • Coupled with a powerful communications infrastructure, distributed objects divide monolithic client/server applications into self-managing components, or objects, that can interoperate across disparate networks and operating systems. • SUN J2EE • JavaTM 2 Platform, Enterprise Edition • MS DCOM • Distributed Component Object Model • OMG CORBA • Common Object Request Broker Architecture

  33. Middleware • In a distributed computing system, middleware is defined as the software layer that lies between the operating system and the applications on each site of the system. It serves to "glue together" or mediate between separate components. • Objectives • Hiding distribution • Hiding the heterogeneity • Providing uniform, standard, high-level interfaces • Supplying a set of common services • Examples • Transaction processing monitors • Data converters • Communication controllers

  34. Middleware • Design Challenges • Performance • Scalability • Complexity of administration • Mobility and dynamic reconfiguration • Global information network to manage large applications that are heterogeneous, widely distributed and in permanent evolution

  35. CORBA – A bit of history • OMG Standard, “to allow applications to communicate with one another no matter where they are located or who has designed them” • 1991, CORBA 1.1, IDL & API within an ORB • 1994, CORBA interoperability & IIOP (Internet Inter-ORB Protocol) • 2002, CORBA Component Model

  36. CORBA – Objectives • Distributed object computing middleware that shields applications from heterogeneous platform dependencies. • To simplify development of distributed applications by automating/encapsulating • Object location • Connection & memory mgmt. • Parameter (de)marshaling • Event & request demultiplexing • Error handling & fault tolerance • Object/server activation • Concurrency • Security • CORBA defines interfaces, not implementations

  37. CORBA Application Structure • Object Request Broker: enables objects to transparently make and receive requests and responses in a distributed environment. • The core of the reference model, “telephone exchange” • Object Services: a collection of services (interfaces and objects) that support basic functions for using and implementing objects. • e.g. Naming, Trading, and Life Cycle Service • Common Facilities: a collection of services that many applications may share, but which are not as fundamental as the Object Services • e.g. e-mail facility • Application Objects: products of a single vendor on in-house development group that controls their interfaces.

  38. CORBA Application Structure Application Objects Domain Facilities Horizontal CORBA Facilities Object Request Broker Domain Facilities

  39. CORBA Middleware Architecture Object Adapter ORB Core GIOP/IIOP/ESIOPS Interface Repository IDL Compiler Implementation Repository Client Object IDL Skeleton Dynamic Skeleton Dynamic Invocation IDL Stub ORB Interface

  40. 对象请求代理(ORB) • A logical set of services • Locates the remote object, communicates the request, waits for the results and when available communicates the results back to the client • Location transparency • Programming language independent: interface translation and language binding Client Object Object Request Broker (ORB)

  41. 接口描述语言(IDL) • Language neutral, Language mapping • Modularized object interface • Operations and attributes that an object supports • Exceptions raised by an operation • Data types of an operation return value, its parameters, and an object’s attributes Client Object IDL Stub IDL Skeleton Object Request Broker (ORB)

  42. Activate server Implementation Repository 1S In args Client Object 3S Obj. ref. Operation () Process Request Out args + return value 1C 4C Return Control to Client Locate target object IDL Skeleton IDL Stub Return Request Activate Object’s Servant Wait for request to complete Send request to server 4S 2S 3C 2C Two-way Processing ORB CORE

  43. CORBA Interoperability • 动机 • ORB implementation diversity • ORB boundaries: • Partition the environment into different ORBs • Simplified test, management, and maintenance • Decentralized control • e.g. internet ORB, company ORB • ORB vary in scope, distance and lifetime • e.g. archives ORB, game ORB • 单元 • Inter-ORB Bridge: transactions between ORB domains • General Inter-ORB Protocol (GIOP): ORB-ORB interactions over connection-oriented transport protocol • Internet Inter-ORB Protocol (IIOP): ORB-ORB communication across the Internet (TCP/IP)

  44. CORBA Interoperability Client Object Client Object IDL Stub IDL Skeleton IDL Stub IDL Skeleton IIOP ORB 2 ORB 1 Interoperability uses ORB-to-ORB communication

  45. CORBA Services

  46. J2EE • A platform for developing applications • Oct. 1994, Public introduction of Java • Jan. 1996, JDK 1.0 released • Apr. 1997, EJB specification announced • Dec. 1998, Java 2, SDK 1.2 released • Jun. 1999, J2EE announced • Dec. 1999, J2EE platform released • Sep. 2001, J2EE 1.3 released • Nov. 2003, J2EE 1.4 released

  47. J2EE Application Architecture Enterprise Information System Client Side Presentation Server Side Presentation Server Side Business Logic Browser Web Server EJB Container Pure HTML JSP EJB Java Applet JSP EJB Desktop Java Servlet EJB Java Application J2EE platform J2EE platform Other Device J2EE Client

  48. J2EE Middleware Architecture

  49. J2EE Interoperability

  50. J2EE Services • HTTP/HTTPS • JAAS – Java Authorization and Authentication Service • JTA – Java Transaction API • JNDI – Java Naming and Directory Service • RMI-IIOP • JDBC – Java DataBase Connectivity • JMS – Java Message Service • JavaMail • JAXP – Java API for XML Parsing • Java IDL • ……

More Related