Presentation is loading. Please wait.

Presentation is loading. Please wait.

Service-Oriented Software Engineering

Similar presentations


Presentation on theme: "Service-Oriented Software Engineering"— Presentation transcript:

1 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)

2 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.

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

4 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, Software Engineering, 8th Edition, Chapter 31

5 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, Software Engineering, 8th Edition, Chapter 31

6 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, Software Engineering, 8th Edition, Chapter 31

7 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

8 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, Software Engineering, 8th Edition, Chapter 31

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

10 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

11 SOAP example, header and body
<SOAP-ENV:Envelope xmlns:SOAP-ENV=" SOAP-ENV:encodingStyle=" <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

12 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

13 Emerging web services platform

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

15 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, Software Engineering, 8th Edition, Chapter 31

16 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, Software Engineering, 8th Edition, Chapter 31

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

18 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, Software Engineering, 8th Edition, Chapter 31

19 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, Software Engineering, 8th Edition, Chapter 31

20 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, Software Engineering, 8th Edition, Chapter 31

21 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, Software Engineering, 8th Edition, Chapter 31

22 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, Software Engineering, 8th Edition, Chapter 31

23 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, Software Engineering, 8th Edition, Chapter 31

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

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

26 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, Software Engineering, 8th Edition, Chapter 31

27 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, Software Engineering, 8th Edition, Chapter 31

28 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, Software Engineering, 8th Edition, Chapter 31

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

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

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

32 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, Software Engineering, 8th Edition, Chapter 31

33 Orchestration vs. choreography
Orchestration A Single Director In Control. Choreography Defines Interaction. G. Ray (U. Pittsburgh.), Lecture:

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

35 Example: Purchase order
G. Ramackers (Oracle Corp.), WS-CDL.

36 Choreography perspective
G. Ramackers (Oracle Corp.), WS-CDL.

37 Orchestration perspective
G. Ramackers (Oracle Corp.), WS-CDL.

38 Orchestration and choreography
G. Ramackers (Oracle Corp.), WS-CDL.

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

40 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.

41 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.

42 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

43 Application server architecture
other protocols client other servers ( , 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

44 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

45 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

46 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) 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

47 J2EE support for presentation layer
client servers for other connections (e.g., WAP) 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

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

49 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, Software Engineering, 8th Edition, Chapter 31

50 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

51 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

52 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

53 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

54 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

55 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

56 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.

57 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.


Download ppt "Service-Oriented Software Engineering"

Similar presentations


Ads by Google