2010 06-18 service oriented architecture (soa) v4

33
Service Oriented Architecture (SOA) Gabriel Orce June 2010 © Accenture 2010. All Rights Reserved.

description

 

Transcript of 2010 06-18 service oriented architecture (soa) v4

Page 1: 2010 06-18 service oriented architecture (soa) v4

Service Oriented Architecture (SOA)

Gabriel Orce June 2010

© Accenture 2010. All Rights Reserved.

Page 2: 2010 06-18 service oriented architecture (soa) v4

Centra Tools

Text Chat

Yes / No

Applause

Laugh

Centra Volume Control

Raise Hand

Network Connectivity Bar

Audio/Connectivity Tips

• Run the Audio Wizard• Choose Tools/Audio Wizard from the

menu at top of screen

• Close all network based applications

• Outlook, MSN/AOL, other websites, Office Communicator, etc

• Connect via an Accenture LAN or high speed internet connection

• If using a wireless connection, ensure your signal is as strong as possible

• Monitor the Network Connectivity Bar

• Contact Learning Product Support if issues continue

Page 3: 2010 06-18 service oriented architecture (soa) v4

Asking Questions

1. Ask live questions during the designated Q&A sessions:

Press Raise Hand icon to get faculty’s attention

Once called upon, there are two options to speak:- Click the Talk button or- Press the Ctrl key

When done speaking, unselect the Talk button or release the Ctrl Key.

2. Post questions at any time in the chat room.

Two Options:

Page 4: 2010 06-18 service oriented architecture (soa) v4

Agenda

•Introduction

•SOA architectural principles

•Web enabled technologies for SOA

•SOA and Java

•Case study

•Q & A

© Accenture 2010. All Rights Reserved. 4

Page 5: 2010 06-18 service oriented architecture (soa) v4

Introduction

To better understand what Service Oriented Architecture is, we must first understand what Service is, and what we mean by Architecture.

© Accenture 2010. All Rights Reserved. 5

Page 6: 2010 06-18 service oriented architecture (soa) v4

From a SOA perspective, a service is an abstracted, logical view of a well-defined business functionality, which could be consumed by clients in different applications or business processes.

Services can be new software modules or can wrap around existing legacy software to give them “service interfaces”.

Examples of typical services:GetOrderStatus (input: order number, order type. Returned: the status of the order).SearchByAuthor (input: Name of author, type of product. Returned: Titles of the products written by this author).

Services

© Accenture 2010. All Rights Reserved. 6

Page 7: 2010 06-18 service oriented architecture (soa) v4

Architecture

Software Architecture is the logical design of interconnected software components that work towards the objective of an existing or potential system given the required resources.

© Accenture 2010. All Rights Reserved. 7

Page 8: 2010 06-18 service oriented architecture (soa) v4

Service Oriented Architecture (SOA)

Service Oriented Architecture is a logical way of designing a software system consisting of a collection of loosely coupled services (components) that communicate with each other via standard message exchanging protocols and through standard interfaces. These service components may provide services either to end-user applications or other services distributed in a network.

© Accenture 2010. All Rights Reserved. 8

Page 9: 2010 06-18 service oriented architecture (soa) v4

Related Concepts

Service Oriented Integration (SOI): It is the act of adapting applications and protocols to a SOA environment. SOI addresses the integration of an IT legacy systems as reusable services for a SOA environment from an IT organization. As such, the problems of integrating legacy and inflexible heterogeneous systems are addressed by enabling IT organizations to offer the functionality locked in existing applications as reusable services.

Service Oriented Computing (SOC): It refers to the paradigm that represents computation in SOA.

© Accenture 2010. All Rights Reserved. 9

Page 10: 2010 06-18 service oriented architecture (soa) v4

Agenda

•Introduction

•SOA architectural principles

•Web enabled technologies for SOA

•SOA and Java

•Case study

•Q & A

© Accenture 2010. All Rights Reserved. 10

Page 11: 2010 06-18 service oriented architecture (soa) v4

Key Characteristics for Services in SOA

•Loose coupling — Services should be connected to clients and other services using standard, decoupled message-based methods. XML document exchanging is most common.

•Interface-based design — Services implement separately defined interfaces. The benefit of this is that multiple services can implement a common interface and a service can implement multiple interfaces.

•Discoverable — Services need to be found at both design time and run time, not only by unique identity but also by interface identity and by service kind.

© Accenture 2010. All Rights Reserved. 11

Page 12: 2010 06-18 service oriented architecture (soa) v4

Key Characteristics for Services in SOA

•Coarse-grained — Operations on services are frequently implemented to encompass more functionality and operate on larger data sets, compared with component-interface design.

•Single instance — Unlike component-based development, which instantiates components as needed, each service is a single, always running instance that a number of clients communicate with.

© Accenture 2010. All Rights Reserved. 12

Page 13: 2010 06-18 service oriented architecture (soa) v4

Service

Client

Service

Provider

Service

Broker

find

bind

publ

ish

Service Types in SOA

Service provider — The software entity that implements a service specification.Service requester — The software entity that calls a service provider. Note that a Service requester can be an end-user application or another service. Service broker — The software entity responsible for linking a requester to a service provider. A service broker hosts a registry of service descriptions.

Service providers publish services to a service broker. Service requesters find required services using a service broker and bind to them.

© Accenture 2010. All Rights Reserved. 13

Page 14: 2010 06-18 service oriented architecture (soa) v4

Composition and Orchestration

Service orchestration represents the mechanism for composing services into larger ones to perform a specific business process. This includes the business logic and execution order of the interactions between the services and end clients.

The same services can be reused via recomposition (e.g., use a subset of them, but orchestrate them differently)

© Accenture 2010. All Rights Reserved. 14

Page 15: 2010 06-18 service oriented architecture (soa) v4

Relocation Process

Airline booking web service

Retrieve employee name Given employee ID

Book flight on date

Book employee in hotel on arrival date

Hotel booking web service

Company employee information web

service

Employee Name

Employee ID

Book

Book

Confirmation

Confirmation

Composition and Orchestration

© Accenture 2010. All Rights Reserved. 15

Page 16: 2010 06-18 service oriented architecture (soa) v4

Agenda

•Introduction

•SOA architectural principles

•Web enabled technologies for SOA

•SOA and Java

•Case study

•Q & A

© Accenture 2010. All Rights Reserved. 16

Page 17: 2010 06-18 service oriented architecture (soa) v4

Technologies used in SOA

Web services: are software systems designed to support interoperable machine-to-machine interaction over a network. This interoperability is gained through a set of XML-based open standards, such as WSDL, SOAP, and UDDI. These standards provide a common approach for defining, publishing, and using web services. (1)XML: is a text-based markup language specification from the WWW Consortium (W3C). In SOA it is widely used for representing arbitrary data structures and messaging protocols. WSDL (Web Services Description Language): is a XML-based language that provides a simple way for service providers to describe the format of requests and response messages. In general, WSDL provides an abstract language for defining the published operations of a service with their respective parameters and data types. The language also addresses the definition of the location and binding details of the service.

© Accenture 2010. All Rights Reserved. 17

Page 18: 2010 06-18 service oriented architecture (soa) v4

Technologies used in SOA

 UDDI (Universal Description, Discovery, and Integration): This specification provides a common set of SOAP APIs that enable the implementation of a service broker. It helps facilitate the creation, description, discovery, and integration of Web-based services.

SOAP (Simple Object Access Protocol): is a lightweight messaging XML-based protocol for the exchange of information in a distributed environment. It is completely vendor neutral. SOAP defines a protocol between requester and provider objects, such that the requesting objects can perform a remote method invocation on the providing objects. SOAP is also basically independent of the transport protocol (http, smtp, jms, etc.). SOAP’s main criticism is usually on the overhead of the XML processing it implies.

REST (Representational State Transfer): is a web architectural style, which bases itself on the full exploitation of the http protocol. It attempts to reuse the http methods making an equivalence between your semantic operation and the http methods (get, post, put, delete); it is not based upon "message" concepts as is SOAP. 18

Page 19: 2010 06-18 service oriented architecture (soa) v4

19

definitions

types

message

portType

binding

service

operationsinput

messagesoutput

messages

port

WSDL 1.1 Format

definitions Root element of the WSDL document. Defines the name of the web service and declares multiple namespaces used throughout the remainder of the document .

types Describes all the data types used between the client and server (not required if the service uses only XML Schema built-in simple types).

message Describes a single one-way message, whether a message request or message response.

portType Abstract set of operations supported by one or more endpoints (commonly known as an interface); operations are defined by an exchange of messages.

binding Concrete protocol and data format specification for a particular portType.

service The service element defines the address for invoking the specified service. Most commonly, this includes a URL for invoking the SOAP service (the “port”).

© Accenture 2010. All Rights Reserved.

Page 20: 2010 06-18 service oriented architecture (soa) v4

20

Envelope

Header (optional)

Body

SOAP 1.2 Format

Envelope Mandatory. Top element of the XML document representing a SOAP message.

Header Optional. Contains information that might influence payload processing and that would be subject to processing by intermediate SOAP nodes. For example: Authentication information.

Body Mandatory. Contains the payload of the message. The Body is a container for mandatory information intended for the ultimate recipient of the message.

© Accenture 2010. All Rights Reserved.

Page 21: 2010 06-18 service oriented architecture (soa) v4

ESB Manage

ment

Service Orchestr

ation

Adapter

LegacyDatabase

s

Adapter

.NETApplication

Adapter

J2EEApplica

tion

Adapter

LegacyApplica

tion

Enterprise Service Bus - ESB

ESB is an open standards, message-based, distributed, integration solution that provides routing, invocation, and mediation services to facilitate the interactions of disparate distributed information technology resources (applications, services, information, platforms) in a reliable manner. (Brenda Michelson, Elemental Links) (2)

© Accenture 2010. All Rights Reserved. 21

Page 22: 2010 06-18 service oriented architecture (soa) v4

Enterprise Service Bus - ESB

Characteristics:• Uses XML as the standard communication language• Usually does not depend on an OS or a programming language• Supports web services standards• Includes support for orchestration • Includes intelligent content-based routing• Supports messaging (e.g., web services messaging standards or JMS)• Includes standard adapters

  ESB can assist in giving a SOA solution (but using ESB does not imply a SOA solution)

© Accenture 2010. All Rights Reserved. 22

Page 23: 2010 06-18 service oriented architecture (soa) v4

Agenda

•Introduction

•SOA architectural principles

•Web enabled technologies for SOA

•SOA and Java

•Case study

•Q & A

© Accenture 2010. All Rights Reserved. 23

Page 24: 2010 06-18 service oriented architecture (soa) v4

SOA and Java

Web Services can be implemented with Java. Some Web Services Frameworks that can be used to facilitate this are: 

• XFire/CXF• Apache Axis• Spring-WS

First let us view the invocation process to understand how web services work.

© Accenture 2010. All Rights Reserved. 24

Page 25: 2010 06-18 service oriented architecture (soa) v4

Java Object

Create Respons

eSOAP

Receive Request

SOAP

Client Server

Create Request

SOAP

Receive Respons

eSOAP

Java code start

s proce

ss

Service Invocation Process

© Accenture 2010. All Rights Reserved. 25

Page 26: 2010 06-18 service oriented architecture (soa) v4

Service Invocation Process

Example: Server-side Service Invocation (after client creates SOAP message with request and sends it to server)

1.SOAP message is received from transport (e.g., http). 2.Invoking handlers preprocess the message. E.g., determine target service (since service may have more than one)3.Dispatch – given the WSDL operation, determine which Java class/method to invoke4.Deserialization – SOAP message content is deserialized into the Java classes.5.Java classes do the data processing. 6.Serialize object into an appropriate XML.7.Wrap this XML into a SOAP message.8.Respond - place response SOAP on transport.

© Accenture 2010. All Rights Reserved. 26

Page 27: 2010 06-18 service oriented architecture (soa) v4

Web Service Code Generation

Java or WSDL code can be generated automatically depending on the approach. Two basic approaches:

1.Bottom-up: Write the code and generate the WSDL from it (e.g., with Axis2, use the Java2WSDL tool).

2.Top-Down: Create WSDL and generate the code based on it (e.g. with Axis2, use the WSDL2Java tool).

© Accenture 2010. All Rights Reserved. 27

Page 28: 2010 06-18 service oriented architecture (soa) v4

Java examples

Let’s go over some practical examples on:

1.Accessing existing Web Services using a Web Service Testing Tool (SoapUI)

2.Creating a Web service

© Accenture 2010. All Rights Reserved. 28

Page 29: 2010 06-18 service oriented architecture (soa) v4

Agenda

•Introduction

•SOA architectural principles

•Web enabled technologies for SOA

•SOA and Java

•Case study

•Q & A

© Accenture 2010. All Rights Reserved. 29

Page 30: 2010 06-18 service oriented architecture (soa) v4

Example SOA Case Study

Case study of a SOA implementation

© Accenture 2010. All Rights Reserved. 30

Page 31: 2010 06-18 service oriented architecture (soa) v4

© Accenture 2010. All Rights Reserved.

Questions & Comments

Two options to ask a question or add your comments to the discussion:

Use Raise Hand and then hold down the TALK icon or press the CTRL key; release when done

Post your question in the Chat Room

Page 32: 2010 06-18 service oriented architecture (soa) v4

References

1. Service Oriented Architecture (SOA) and Web Services: The Road to Enterprise Application Integration(EAI) - http://java.sun.com/developer/technicalArticles/WebServices/soa/

2. Service Oriented Integration With Apache ServiceMix - http://servicemix.apache.org/articles.data/SOIWithSMX.pdf

3. SOA Using Java Web Services – Mark D. Hansen – 2007 Prentice Hall

4. Service Oriented Architecture with Java – Binildas CA, Malhar Barai, Vincenzo Caselli – 2008 Packt Publishing

5. Services-based enterprise integration patterns made easy, Part 4: Enterprise service bus - http://www.ibm.com/developerworks/webservices/library/ws-intpatterns4/

© Accenture 2010. All Rights Reserved. 32

Page 33: 2010 06-18 service oriented architecture (soa) v4

Thank you for participating!