Introduction to Service-Orientation Xiaoying Bai Department of Computer Science and Technology Tsinghua University March 2007
SOA definition and its business and technology values
Service-orientation vs. object-orientation
Service-oriented architecture vs. distributed object architecture
What is SOA?
Just like object a generation ago, services is now the killer buzzword. However, SOA is a often misunderstood topic in IT today.
“ 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.”
What are Services?
Services may mean different things to different people:
Loosely coupled software components that interact with one another dynamically via standard Internet technologies (Gartner).
A software application identified by a URI, whose interfaces and binding are capable of being defined, described, and discovered by XML artifacts and supports direct interactions with other software applications using XML-based messages via Internet-based protocols (W3C).
What are Services?
A piece of business logic accessible via the Internet using open standards (Microsoft).
Encapsulated, loosely coupled , contracted software functions, offered via standard protocols over the Web (DestiCorp).
Services are self-contained , reusable software modules that are independent of applications and the computing platforms on which they run. Services have with well-defined interfaces and allow a 1:1 mapping between business tasks and the exact IT components needed to execute the task. (IBM)
What is SOA?
SOA definition is still evolving.
A set of components which can be invoked, and whose interface description can be published and discovered (W3C).
Service-oriented architecture is a client/server design approach in which an application consists of software services and software service consumers (also known as clients or service requesters). SOA differs from the more general client/server model in its definitive emphasis on loose coupling between software components , and in its use of separately standing interfaces (Gartner).
What is SOA?
Service-Oriented Architecture is a business-driven IT architecture approach that supports integrating your business as linked, repeatable business tasks, or services. SOA helps today’s business innovate by ensuring that IT systems can adapt quickly, easily and economically to support rapidly changing business needs. SOA helps customers increase the flexibility of their business processes, strengthen their underlying IT infrastructure and reuse their existing IT investments by creating connections among disparate applications and information sources. (IBM)
A New Way of Thinking
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.
Service broker Component Library Services Business Process The SOA Story Registration Organization X Organization Z Organization Y Found Auto-searchable Application 1 Application 2 Registration Registration
Why Service-Orientation? Distributed Data Distributed Computation Distributed users … ..
Heterogeneous network protocols
Heterogeneous hardware platforms
Heterogeneous operating systems
Heterogeneous application formats
There must be consensus On Interoperability !
Why Service-Orientation? Changing Market Dynamics Collaborative, integrated value nets Dynamic, adaptive, learning Unpredictable fluctuations Shortening product lifecycle Proactive risk management Increased focus on privacy and security Fixed Costs Proprietary systems Labor-intensive Users adapt to technology Variable costs Open, integrated systems Self-healing, self-managing systems Technology adapts to users Business Technology Business process decision-making Rigid organizational structure Slow and steady economic growth Long-term product lifecycle Passive operational risk management Static On Demand
Innovative products and services from the key differentiator to gain competitive edge.
Ability to leverage technology to adopt newer business models, thus enabling more channels to earn revenue.
Cost reduction through reduced Total Cost of Ownership adds to the bottom-line.
With cut-throat competition, every missed business opportunity positions an enterprise below its competitors. The ability of an enterprise to quickly respond to various business stimuli will be key to survival.
Faster time to market increases customer satisfaction and also customer loyalty. This results in increased business and higher revenues.
Ability to provide on demand service, in real-time 24/7.
Seamless collaboration with partners and customers helps to improve service quality and time to market.
SOA Business Values to IT Management
Make interoperability an innate characteristic of IT applications.
Offer an easy way to speed time-to-market
Respond quickly to changing business conditions
Eliminate rework and maximize the value of existing assets.
Dependency on external technology and platform vendors is a risk to an organization on which it has little control. However, adopting open standards mitigates this risk.
Reduction in maintenance cost
Increased reuse of investment in IT leads in to increased productivity resulting in increased ROI.
Loose coupling increased application agility and reduces time to market for a new application.
Seamless scalability at minimal cost to cater to seasonal increase in load.
Software architecture design principles
Separation of concerns
Anticipation of changes
Design with reuse
Related Concepts SOA Object Oriented CBSD Web Application Distributed Computing BPM Enterprise Integration CBSD: Component-Based Software Development BPM: Business Process Management
SOA Evolution Program Paradigm Distributed Computing 1950 1960 1970 1980 1990 2000 Assembler COBOL SIMULA Pascal Modular2 Smalltalk PROLOG Ada C++ Java C# VT3270 VT100 Client/Server RPC Stored Procedure TCP/IP CORBA EAI WWW MQ EJB NFS WSDL SOAP SOA
Based on open standards
Foster inherent reusability
Foster intrinsic interoperability
Promotes dynamic discovery
Promotes architectural composability
Promotes loose coupling throughout the enterprise
Supports incremental implementation
SOA Potential Benefits
Improved Integration, intrinsic interoperability
Streamlined architectures and solutions
Leveraging the legacy investment
Establishing standardized XML data representation
Focused investment on communications infrastructure
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.
SOA Standards Organizations Basic Profile, Basic Security Profile UDDI, ebXML, SAML, XACML, WS-BPEL, WS-Security XML, XML Schema, XQuery, XML Encryption, XML Signature, XPath, XSLT, WSDL, SOAP, WS-CDL, WS-Addressing, Web Services Architecture SOA deliverables To foster standardized interoperability using Web services standards. To promote online trade and commerce via specialized Web services standards. To further the evolution of the Web, by providing fundamental standards that improve online business and information sharing. SOA goal 200 600 400 Approximate membership 2002 1993 as SGML Open, 1994 as OASIS 1994 Established WS-I OASIS W3C
Service Orientation vs. Object Orientation
Several principles of service-orientation are related to and derived from object-orientation principles.
abstraction -- decomposition
Encapsulation -- Reusability
Interface first -- Loose coupling
Composition -- Autonomy
Statelessness -- Discoverability
Some object-orientation principles, such as inheritance, do not fit into the service-orientation world.
Some service-orientation principles, such as loose coupling and autonomy, are not directly promoted by object-orientation.
Conceptual Differences 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). Service-Orientation Object-Orientation
The Paradigm Shift Object-Oriented Concept & Architecture Service-Oriented Concept & Architecture Simula Smalltalk Objective C C++ Java Programming Language XML UDDI ebXML WSDL SOAP OWL Standard Specification UML Modeling BPEL WSFL XLANG Modeling OOAD OO Framework OODB OO Process model Technology & Methodology MDA SO Framework Ontology / Service DB SO lifecycle process Technology & Methodology
Service Oriented Architecture vs. Distributed Object Architecture
SOA is a radical departure from client-server architecture. Current SOAs still employ some of the technologies originally used to build client-server applications. Though more sophisticated, SOAs introduce complexity that sharply contrasts the simplicity of a two-tier client-server architecture.
Distributed Internet architecture has much in common with SOA, including a significant amount of its technology. However, SOA has distinct characteristics relating to both technology and its underlying design principles.
Distributed System Architecture Client Presentation Client Presentation Application Processing Two Tier with Thin Client Two Tier with Fat Client Client Presentation Three Tier Server Data Management Application Processing Server Data Management Server Application Processing Server Data Management
Multi-Tier System Architecture
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
Browser + “Dynamic content generation”
Enabling techniques: CGI, Java Servlet/JSP, MS ASP
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.
Java TM 2 Platform, Enterprise Edition
Distributed Component Object Model
Common Object Request Broker Architecture
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.
CORBA Services Support queries on objects Query Supports the finding of CORBA objects based on properties describing the services offered by the object Trading Supports the association of name-value pairs with CORBA objects Property Provides a locking service for CORBA objects in order to ensure serialized access Concurrency Control Coordinates atomic access to CORBA objects Transactions Coordinates the transformation of CORBA objects to and from external media Externalization Provides arbitrary typed n-ray relationships between CORBA objects Relationships Decouple the communication between distributed objects Events Define how CORBA objects can have friendly symbolic names Naming Define how CORBA objects are created, removed, moved and copied Object Life Cycle Description Services
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
Pure HTML Java Applet Browser Java Application Desktop J2EE Client Other Device Client Side Presentation Server Side Presentation JSP Java Servlet Web Server JSP J2EE platform Server Side Business Logic EJB EJB EJB Container EJB J2EE platform Enterprise Information System J2EE Application Architecture
J2EE Middleware Architecture
JAAS – Java Authorization and Authentication Service
JTA – Java Transaction API
JNDI – Java Naming and Directory Service
JDBC – Java DataBase Connectivity
JMS – Java Message Service
JAXP – Java API for XML Parsing
Advantages of Distributed Object Architecture
It allows the system designer to delay decisions on where and how services should be provided
It is a very open system architecture that allows new resources to be added to it as required
The system is flexible and scaleable
It is possible to reconfigure the system dynamically with objects migrating across the network as required
Weakness of Distributed Object Architecture
Both ends of each distributed computing link had to agree on the details of the API. A code change to a COM object, for example, required corresponding changes to the code accessing that object.
Microsoft controlled DCOM
Implementing a CORBA architecture typically necessitated the decision to work with a single vendor's implementation of the specification.
SOA -- Evolution vs. Revolution
SOA is developed upon the weaknesses of distribute object computing technique.
Reliance upon universally accepted standards provides broad interoperability among different vendors’ solutions
Separates the participants in distributed computing interactions so that modifying the interface of one participant in the exchange does not break the other.
SOA enables dynamic collaboration among loosely coupled, reusable software components through standard Internet protocols.
SOA is driven by both business and technology needs for open collaboration, cost saving and flexibility to dynamic changes.
SOA is developed from other software techniques including distributed object computing, component-based software engineering, and enterprise application integration.
M. P. Singh and M. N. Huhns, “Service-Oriented Computing”, John Wiley & Sons, 2005.
Thomas Erl, “Service-Oriented Architecture: Concepts, Technology, and Design”, Prentice Hall, 2005.
Eric Newcomer and Greg Lomow, “Understanding SOA with Web Services”, Addison Wesley, 2005.
D. Krafzig, K. Banke and D. Slama, “Enterprise SOA: Service-Oriented Architecture Best Practice”, Prentice Hall, 2005.
Wei-Tek Tsai, “What is SOA? Why should you care?”, Tsinghua University Short Course on Service-Oriented Computing and Architecture, 2006.
Jen-Yao Chung, “Service-Oriented Architecture and Web Services”, keynote speaking, SOSE 2005.
Jason Bloomberg, “Principles of SOA”, Feb. 2003.
“ A Practical Guide to SOA for IT Management”, Systinet Corp. 2005.
Shireesh Jayashetty, Pradeep Kumar M, “Adopting Service Oriented Architecture increases the flexibility of your enterprise”, Infosys, 2006.
Ian Summerville, “Software Engineering” (6 th Edition), Addison-Wesley, 2000.