Service-Oriented Software Engineering

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Siebel Web Services Siebel Web Services March, From
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering.
Overview of Web Services
Chapter 19 – Service-oriented Architecture
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering 1.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
An architecture for webb applications, J2EE
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
The Architecture of Transaction Processing Systems
® IBM Software Group © IBM Corporation IBM Information Server Service Oriented Architecture WebSphere Information Services Director (WISD)
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering 2.
SOA, BPM, BPEL, jBPM.
©Ian Sommerville 2006MSc module: Advanced Software Engineering Slide 1 Service-centric Software Engineering.
Chapter 4: Core Web Technologies
HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel Copyright Springer Verlag Berlin Heidelberg 2004.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
第十四章 J2EE 入门 Introduction What is J2EE ?
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 09. Review Introduction to architectural styles Distributed architectures – Client Server Architecture – Multi-tier.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
XML and Web Services (II/2546)
Kemal Baykal Rasim Ismayilov
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
INFSO-RI Enabling Grids for E-sciencE Web Services Mike Mineter National e-Science Centre, Edinburgh.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
EGEE is a project funded by the European Union under contract IST Introduction to Web Services 3 – 4 June
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 9 Web Services.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
A service Oriented Architecture & Web Service Technology.
Service Oriented Architecture (SOA) Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
Java Web Services Orca Knowledge Center – Web Service key concepts.
Microsoft .NET Platform
J2EE Platform Overview (Application Architecture)
Sabri Kızanlık Ural Emekçi
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
WEB SERVICES.
Unit – 5 JAVA Web Services
Service Oriented Architecture
Distribution and components
Distributed web based systems
Introduction to J2EE Architecture
Overview of Web Services
Implementing a service-oriented architecture using SOAP
Introduction to Web Services and SOA
Inventory of Distributed Computing Concepts and Web services
Service-centric Software Engineering
Service-centric Software Engineering 1
Distributed System Using Java 2 Enterprise Edition (J2EE)
Inventory of Distributed Computing Concepts
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Service Oriented Architecture (SOA)
WEB SERVICES DAVIDE ZERBINO.
Distributed Systems through Web Services
Introduction to Web Services
WEB SERVICES From Chapter 19, Distributed Systems
Introduction to Service-Orientation
Introduction to Web Services and SOA
Chapter 5 Architectural Design.
Presentation transcript:

Service-Oriented Software Engineering Web Services: Concepts, Architecture and Applications G. Alonso, F. Casati, H. Kuno, V. Machiraju. Springer, 2004. (Chapters 4 and 6) Software Engineering, 8th Edition I. Sommerville. Addison-Wesley, 2006. (Chapter 31)

Objectives Introduce SOA concepts. Introduce a service-oriented software engineering process. Overview some technologies underlying web services based on SOA. Examine some steps for migrating legacy applications into web services.

Outline What is SOA? Service-oriented software engineering SOA under the hood Legacy migration issues

Service-oriented architectures A means of developing distributed systems where the components are stand-alone services. Services may execute on different computers from different service providers. Standard protocols have been developed to support service communication and information exchange. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Services or components? A service can be defined as: A loosely-coupled, reusable software component that encapsulates discrete functionality which may be distributed and programmatically accessed. A web service is a service that is accessed using standard Internet and XML-based protocols. A critical distinction between a service and a component as defined in component-based software engineering is that services are independent. Services do not have a ‘requires’ interface. Services rely on message-based communication with messages expressed in XML. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Benefits of SOA Services can be provided locally or outsourced to external providers. Services are language-independent. Investment in legacy systems can be preserved. Inter-organizational computing is facilitated through simplified information exchange. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

SOA and Web Services Service-oriented architecture is an architectural style Derived from the client-server architectural style. Clients (service consumers or requesters) and servers (service providers) connected by a service “bus”. Services defined using formal interfaces (contracts). Service bus supports point-to-point and messaging styles of communication. Support for system qualities, e.g., security and transaction management. Web services Services provided in a SOA deployed over the web. Open source software for SOA, IONA Technologies A-Trenaman-SOA.pdf

Key standards SOAP (Simple Object Access Protocol) A message exchange standard that supports service communication. WSDL (Web Service Definition Language) This standard allows a service interface and its bindings to be defined. UDDI (Universal Description Discovery and Integration) Defines the components of a service specification that may be used to discover the existence of a service. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service-oriented architecture UDDI SOAP WSDL © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 6

SOAP messages SOAP is based on message exchanges SOAP Envelope SOAP is based on message exchanges Messages are seen as envelops where the application encloses the data to be sent A message has two main parts: header: which can be divided into blocks body: which can be divided into blocks SOAP does not say what to do with the header and the body, it only states that the header is optional and the body is mandatory Use of header and body, however, is implicit. The body is for application level data. The header is for infrastructure level data SOAP header Header Block SOAP Body Body Block © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 6

SOAP example, header and body <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Header> <t:Transaction xmlns:t="some-URI" SOAP-ENV:mustUnderstand="1"> 5 </t:Transaction> </SOAP-ENV:Header> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DEF</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> From the: Simple Object Access Protocol (SOAP) 1.1. © W3C Note 08 May 2000 © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 6

SOAP and HTTP SOAP Envelope SOAP header Transactional context SOAP Body Input parameter 1 Input parameter 2 Name of Procedure HTTP POST Return parameter HTTP Acknowledgement SERVICE REQUESTER SERVICE PROVIDER RPC call HTTP engine SOAP engine Procedure SOAP and HTTP © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 6

Emerging web services platform

Outline What is SOA? Service-oriented software engineering SOA under the hood Legacy migration issues

Service-oriented software engineering Existing approaches to software engineering have to evolve to reflect the service-oriented approach to software development. Service engineering. The development of dependable, reusable services. Software development for reuse. Software development with services. The development of dependable software where services are the fundamental components Software development with reuse. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service engineering The process of developing services for reuse in service-oriented applications. The service has to be designed as a reusable abstraction that can be used in different systems. Involves Service candidate identification Service design Service implementation © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

The service engineering process Service design Service candidate identification implementation and deployment requirements Service interface specification V alidated and deployed service © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service candidate identification Three fundamental types of service Utility services that implement general functionality used by different business processes. Business services that are associated with a specific business function e.g., in a university, student registration. Coordination services that support composite processes such as ordering. Examples: © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service identification Is the service associated with a single logical entity used in different business processes? Is the task one that is carried out by different people in the organization? Is the service independent? Does the service have to maintain state? Is a database required? Could the service be used by clients outside the organization? Are different users of the service likely to have different non-functional requirements? © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service interface design Involves thinking about the operations associated with the service and the messages exchanged. The number of messages exchanged to complete a service request should normally be minimized. Service state information may have to be included in messages. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Interface design stages Logical interface design Starts with the service requirements and defines the operation names and parameters associated with the service. Exceptions should also be defined. Message design Design the structure and organization of the input and output messages. Notations such as the UML are a more abstract representation than XML. WSDL description The logical specification is converted to a WSDL description. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Web service description language The service interface is defined in a service description expressed in WSDL. The WSDL specification defines: What operations the service supports and the format of the messages that are sent and received by the service. How the service is accessed - that is, the binding maps the abstract interface onto a concrete set of protocols. Where the service is located. This is usually expressed as a URI (Universal Resource Identifier). © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Structure of a WSDL specification Intro Abstract interface Concrete implementation WSDL service definition XM L namespace declarations Type declarations Interface declarations Message declarations Binding declarations Endpoint declarations © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

A WSDL description fragment © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

A WSDL description fragment 2 © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Service implementation and deployment Programming services using a standard programming language or a workflow language. Services then have to be tested by creating input messages and checking that the output messages produced are as expected. Deployment involves publicizing the service using UDDI and installing it on a web server. Current servers provide support for service installation. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

A UDDI description Details of the business providing the service. An informal description of the functionality provided by the service. Information where to find the service’s WSDL specification. Subscription information that allows users to register for service updates. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Software development with services (Service composition) Existing services are composed and configured to create new composite services and applications. The basis for service composition is often a workflow. Workflows are logical sequences of activities that, together, model a coherent business process. For example, provide a travel reservation services which allows flights, car hire and hotel bookings to be coordinated. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Vacation package workflow © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Construction by composition © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Hotel booking workflow © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Standards for web service composition Service orchestration WS-BPEL is an XML-based language for workflow specification. WS-BPEL is an “orchestration” language. Service orchestration defines the sequence and conditions in which one Web service invokes other Web services. Can be used to create a composite service out of other services. Service choreography WS-CDL is an XML-based language for describing service “choreography”. Choreography defines the allowable message exchanges between services. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Orchestration vs. choreography Orchestration A Single Director In Control. Choreography Defines Interaction. G. Ray (U. Pittsburgh.), Lecture: http://www.sis.pitt.edu/~gray/INFSCI2935/ppts/BPELIntro.ppt

Orchestration and choreography example Orchestration within services Choreography between services © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Example: Purchase order G. Ramackers (Oracle Corp.), WS-CDL. http://www.nesc.ac.uk/action/esi/download.cfm?index=1124

Choreography perspective G. Ramackers (Oracle Corp.), WS-CDL. http://www.nesc.ac.uk/action/esi/download.cfm?index=1124

Orchestration perspective G. Ramackers (Oracle Corp.), WS-CDL. http://www.nesc.ac.uk/action/esi/download.cfm?index=1124

Orchestration and choreography G. Ramackers (Oracle Corp.), WS-CDL. http://www.nesc.ac.uk/action/esi/download.cfm?index=1124

Outline What is SOA? Service-oriented software engineering SOA under the hood Legacy migration issues

SOA under the hood Technologies supporting SOA emerged from component and middleware technologies. Middleware handled communications between components. Components did not need to know if they were communicating with local or remote components. Middleware supported synchronous and asynchronous communications. Middleware supported transactions and persistence.

Historical view of middleware research W. Emmerich, et al. The Impact of Research on the Development of Middleware Technology. ACM Transactions on Software Engineering and Methodology, Vol. 17, No. 4, August 2008.

Application servers “Middleware” for web services. Some enabling technologies: Remote invocation – synchronous communication between objects on different hosts. Example standard: RMI (Remote Method Invocation) Distributed transactions – enables transactions involving two or more hosts. Example standard: JTA (Java Transaction API) Message-oriented middleware (MOM) – supports asynchronous messaging between distributed objects, usually through a message queue. Example standard: JMS (Java Message Service) Web service technologies WS-RPC – remote invocation of services WS-Coordination and WS-Transaction – distributed transactions over SOAP Enterprise service bus (ESB) – allows components and services to be integrated in a vendor-independent way. Example frameworks for application servers: Microsoft .Net Java Enterprise Edition © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

Application server architecture other protocols client other servers (email, SOAP,..) Web server browser HTTP firewall presentation layer wide area network (Internet) application logic layer Application server architecture connection to resource mgmt layer CHAPTER 2 FIGURE 2 -section 1.2 application server resource management layer © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

Java Enterprise Edition Servlets JavaServer Pages (JSP) Java API for XML Processing (JAXP) JavaMail support for communication and presentation Java Authentication and Authorization Service (JAAS) Enterprise Java Beans (EJB) Java transaction API (JTA) support for the application integration Java Message Service (JMS) Java Naming and Directory Interface (JNDI) Java DataBase Connectivity (JDBC) Java 2 Connector Architecture (J2CA) support for access to resource managers © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

J2EE application server architecture presentation layer application logic layer EJB EJB EJB (load balancing, pooling, caching, transaction, persistence,…) services EJB container (management and security) administration JNDI JMS JDBC J2CA resource adapter J2CA resource adapter other adapters application server DBMS applications enterprise system 1 enterprise system 2 enterprise system n © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

Application server support for presentation layer Application servers extend traditional middleware services by also providing presentation layer services. Support for multiple types of clients Web browsers (HTTP) Devices (WAP) Email services clients (SMTP) Java applications (RMI) Web services clients (SOAP) Support for personalization Web portals © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

J2EE support for presentation layer client servers for other connections (e.g., WAP) E-mail server Web server multidevice content delivery (load balancing, pooling, caching,…) services Servlets JSPs XML support Web services support (management and security) administration personalization logic presentation layer J2EE support for presentation layer application logic layer connection to resource mgmt layer application server resource management layer © Gustavo Alonso, ETH Zurich, 2004 Web services: Concepts, Architectures and Applications - Chapter 4

Outline What is SOA? Service-oriented software engineering SOA under the hood Legacy migration issues

Legacy system services An important application of services is to provide access to functionality embedded in legacy systems. Legacy systems offer extensive functionality and this can reduce the cost of service implementation. External applications can access this functionality through the service interfaces. © Ian Sommerville, 2006 Software Engineering, 8th Edition, Chapter 31

Steps to recovering Web Services Identify reusable blocks. Evaluate for reusability. Extract from the legacy code. Wrap with a WSDL interface. H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Identifying reusable code blocks Process Arguments Slicing Technique y = f (x) Result = Processing Rule (Arguments); Processing_Rule = Allocation (Path_Expression); Path_Expression = [<Conditions>]n; Program Procedure Condition Condition Path Expression n Assign Or Compute Result H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Evaluating the reusability of a software building block Reusability Metric SYSTEM PROGRAM Reusability of potential procedures or classes should be > 50% . MODULE ENTRY Few Dependencies No I/O EXIT H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Salvaging components from legacy code Business Rule Legacy Code Input Parameters Relocatable Self-controlled Internal Data Output Code statements traversed to implement rule Data Used by Source effected Results H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Wrapping salvaged components Service Request WSDL Interfaces Generate from Inputs Generate from Outputs Generated Wrapper Routines Input Parameters Output Parameters Procedural Code (section, Procedure or Function H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Areas for continuing research in legacy application migration Techniques are required to identify code based on the results produced. Metrics are required to evaluate the reusability of the code identified. Tools are needed to extract chains of interconnected code blocks. Tools are needed to automatically wrap the extracted code and adapt it as a web service. H. Sneed. Migrating to Web Services: A Research Framework. SOA Maintenance Workshop, Conf. on Maintenance and Reengineering, 2007

Summary SOA is an architectural style used to deliver services over the web. Key standards: SOAP, WSDL, UDDI. Service-oriented software engineering has two facets: Service engineering – developing services. Service composition – developing with services. Application servers are roughly analogous to “middleware” for web services. Web service technologies are the latest by-product of continuing middleware research. Continued research is also needed to support migration of legacy applications to web services.

Further reading I. Sommerville. Software Engineering, 8th Edition. Addison-Wesley, 2006. Introductory text for software engineering. Contains chapter on software engineering for SOA. G. Alonso, F. Casati, H. Kuno, V. Machiraju. Web Services: Concepts, Architecture and Applications. Springer, 2004. Technical introduction to web services and SOA without much hype. Reviews middleware technologies and introduces web services as the next progression. T. Erl. SOA: Principles of Service Design. Prentice Hall, 2007. The latest in a series of SOA books by the same author. Goes beyond the technology to discuss how to systematically design services.