MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface:...

32
MTAT.03.229 Enterprise System Integration Lecture 6 Service-Oriented Architecture – Basic Concepts Marlon Dumas marlon . dumas ät ut . ee

Transcript of MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface:...

Page 1: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

MTAT.03.229 Enterprise System Integration

Lecture 6 Service-Oriented Architecture – Basic Concepts

Marlon Dumas

marlon . dumas ät ut . ee

Page 2: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

2

Where are we?

•  We have seen technology and architectural styles for building individual Web services –  SOAP + WS-* –  REST

•  So we know how to implement Web services, but which services should we implement?

•  Now we’ll look at how to think about systems consisting of services Service-Oriented Architecture

Page 3: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

3

Service-Oriented Architecture (SOA)

•  SOA is a paradigm for organizing and utilizing distributed resources and capabilities that may be under the control of different ownership domains.

» OASIS SOA Reference Model

•  SOA does not imply “technology”, but it can help to structure how technology is deployed and organised.

Page 4: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

4

A more concrete definition

•  SOA is a software system composed of a collection of software services.

•  A software asset that is deployed at an endpoint and is continuously maintained by a provider for use by one or multiple clients.

•  Software services have contracts that establish their purpose and how they should be used.

Page 5: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

5

SOA Principles

•  Abstraction Services adhere to contracts/interfaces and hide their inner workings

•  Loose-coupling / autonomy SOAs should minimize dependencies between services and make these dependencies explicit

•  Reusability Services are created with the intent of promoting reuse

•  Composability Services can be assembled to form composite services.

Page 6: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

6

Message

Achieving Abstraction & Loose Coupling

Client interface

Service interface

Service Description

•  Client is aware of service, but service does not know about client. •  Service interface is all the client needs to know about service •  Interaction is purely through messaging infrastructure.

–  No “implicit” interactions –  once a message is sent, the client has no control over it.

Conforms to

Underlying client logic

Underlying service logic Implementations loosely coupled

Page 7: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

7

Achieving Reuse and Composability

•  Design services that are business-oriented in scope and interface; avoid “technical” interfaces –  Align services with key business entities and business

processes •  Avoid “millions” of very simple service invocations

–  Try to aggregate into larger operations –  Avoid fine-grained patterns of interaction

•  Make the context of services explicit –  Provide context information in the message itself (document-

centric messages).

Page 8: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

8

Software Services vs Web Services

•  Software services may, but need not be accessible via the Web (i.e., not just “Web Services”).

•  Software services may, but need not use an XML interface –  E.g. software services may be implemented as message-driven

beans or session bean

•  That said, web services (REST or SOAP) is currently a popular way to expose software services.

Page 9: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

9

Applications vs Services

•  In the most general definition of Software Service, the clients could be either software or humans.

•  But more typically we distinguish between: –  “Software Applications” that provide an interface to human users –  “Software Services” that provide an interface for other software.

•  Software applications can be seen as software services + “presentation layer”

Page 10: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

10

Elements of an SOA

App-1 App-2 App-N Front-end Applications

Service-1

Service-2

Service-M Service Description Repository

Services …

Middleware

Page 11: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

11

Middleware Two types of “middleware” are typical in SOAs: •  Middleware on a Hub: The middleware has a separate existence and

contains routing and business rules (Enterprise Service Bus) •  Middleware on the Edges: The middleware is entirely on the

“edges” (Application Servers)

© Jim Webber, Thoughtworks

Enterprise Service Bus

Page 12: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

12

Enterprise Service Bus

Enterprise Service Bus

Service Orchestration

Service Routing

Transformation & Mapping Connectivity

Service Consumer

Service Provider

Messaging Registry Lifecycle Management Security Base

capabilities

Mediation capabilities

Page 13: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

13

The Service Repository

•  Provides facilities to discover services and acquire all information to use the services.

•  Technology used for service repository can vary: –  Batch of printed service contracts in a folder –  Proprietary database or LDAP registry –  UDDI repository

•  Service Repository may contain: –  Service interface specifications (including WSDL + doc) –  Service owner (section, contact person, etc). –  Access rights –  Performance and scalability (Service Level Agreement - SLA). –  Transactional properties. –  Billing (for cross-organizational services)

Page 14: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

14

Service Classification

Application front-end

Basic service

Intermediary service

Composite service

Public enterprise

service

Collection of applications that initiate chains of service interactions and ultimately receive their results.

Services that do not rely on other services. May be data-centric or logic-centric, or hybrid.

Technology gateways, adapters and functionality-adding services. Are both client and servers.

Gather multiple service according to a business process or to a data aggregation function.

Provide interfaces for cross-enterprise integration. They are of coarse granularity and have appropriate mechanisms for security, billing, etc.

Page 15: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

15

Data-Centric Services

•  Handle persistent data. •  Abstract:

–  Storage and retrieval of data. –  Locking mechanisms. –  Transaction management.

•  Utilizes a physical data storage facility such as a relational database or file system.

•  Similar to the data access layer of a traditional application. But: –  Traditional data access layer manages all data for the entire

application (horizontal slicing). –  A data centric service only deals with one major business entity

(vertical slicing).

Page 16: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

16

Principles of Data-Centric Design

Customer service

Itinerary service

Customer DB

a) Poor design: ownership of data unclear

Customer service

Customer DB

Interface: CustomerManager

Interface: ItineraryManager

b) Customer DB owned by customer service

•  A data-centric service should strictly encapsulate its data entities. –  Any other service that requires access to this data needs to use

the service interface of the corresponding data-centric service.

Page 17: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

17

Principles of Data-Centric Design

•  One of the most important tasks of an SOA architect is to identify relevant business entities that should be represented by data-centric services. –  This task is related to “business domain modelling”. –  Can use methods based on ER models or OO design, but cross-service

relationships are not allowed (as no cross-service navigation exists as in distributed object technology).

–  This means that complex data types used by services must be sufficiently self contained or must contain unique identifiers that enable them to relate to other complex data values.

•  Basically want loose coupling between services.

Page 18: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

18

Logic-Centric Services

•  Encapsulate algorithms for complex calculations or business rules.

•  Stateless and functional in nature. •  Examples:

–  Service for creating captcha challenges and verifying responses –  Service for computing an insurance premium based on a client

profile –  Service for text-to-voice conversion or image processing

•  Data-centric and logic-centric services are two ends of the spectrum: many services encapsulate both data and logic

Page 19: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

19

Intermediary Services

•  Stateless services that bridge technological inconsistencies or gaps in an architecture.

•  Can be classified into: –  Technology Gateway, e.g. a service that wraps part of a CICS

mainframe application and exposes it as a web service. –  Adapter: Provides a new interface to an existing service that has

a similar but with a slightly different interface –  Functionality-Adding Service: Used on top of existing services

when new functionality is required but the original service can’t be changed.

Page 20: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

20

Composite Services

•  Data-Centric Composite Services –  Entity search service: retrieves data from business registry, stock

exchange, tax office, etc. to provide a consolidated financial view of an organisation

–  Geo-referencing service: retrieves names/addresses of businesses in a given domain and plots them on a map

•  Process-Centric Composite Services –  Encapsulate and control business processes, e.g. an invoicing

service –  Engage in long-lived (e.g. months)

•  Complex interaction patterns •  Typically rely on asynchronous interaction

Page 21: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

21

Public Enterprise Services

•  Services that an enterprise offers to partners and customers.

•  The relationship between the customers and providers is loose, so these services have specific requirements: –  Interfaces at the enterprise level have the granularity of business

documents with a standalone meaning and include the complete context necessary to be unambiguous.

–  Communication is often asynchronous. –  Crossing the organization’s borders implies the need for higher

security levels (authentication, encryption, access control). –  Billing for cross-enterprise services implies need for non-

repudiation. –  Requires Service Level Agreements.

Page 22: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

22

SmartEDA: Integrated Land Development Application System in Queensland Government

https://www.smarteda.qld.gov.au/

Page 23: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

23

Danske Bank: Customer Package Process

Juni 2003 August 2003 December 2003 October 2003 Marts 2007

Introduction of Customer packages. Word template to collect info

© Steen Brahe, Danske Bank

Page 24: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

24

Danske Bank: Customer Package Process

Juni 2003 August 2003 December 2003 October 2003 Marts 2007

Backoffice group created Handles the creation process

© Steen Brahe, 2007

Page 25: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

25

Danske Bank: Customer Package Process

Juni 2003 August 2003 December 2003 October 2003 Marts 2007

Case Transfer System Automatic validation and transfering

© Steen Brahe, 2007

Page 26: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

26

Danske Bank: Customer Package Process

Juni 2003 August 2003 December 2003 October 2003 Marts 2007

Workflow enabled creation process v. 1 Automatic process control, 0% automated activities

© Steen Brahe, 2007

Page 27: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

27

Danske Bank: Customer Package Process

Juni 2003 August 2003 December 2003 October 2003 Marts 2007

Workflow v. 6 80% automated activities

© Steen Brahe, 2007

Page 28: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

28

Danske Bank SOA

App1: COBOL App2: PL1 App3: Java App4: C#

Service Bus / Container

WSDL A1 WSDL A2 WSDL A3 WSDL A4

Executable Business Process

A1

A3

A2 A4

© Steen Brahe, 2007

Page 29: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

29

SOA at a telco (taken from Zimmermann et al.)

Page 30: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

30

Lifecycle and Roles in an SOA

Service Implementation

Service Analysis

Service Design

Testing & Deployment

Operation & Monitoring

Opportunity & Issue

Identification

Business Analyst

Developer

Tester

Administrator

Solution Architect

Page 31: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

31

Roadmap

•  17 October – Top-down Service Analysis –  Identifying services and interactions by top-down

decomposition –  Please read the “loan application scenario” in

advance •  24 October (no lecture) •  31 October – Process-driven Service Analysis

–  Identifying services “bottom-up” starting from process models

Page 32: MTAT.03.229 Enterprise System Integration Lecture 6Customer DB Interface: CustomerManager Interface: ItineraryManager b) Customer DB owned by customer service • A data-centric service

32

References and acknowledgments •  Danske Bank case study material is taken from a talk by

Steen Brahe: –  http://brahe.org/MamboPHD/

•  The classification of services is taken from: –  Dirk Krafzig, Karl Banke and Dick Slama: “Enterprise SOA:Service-

Oriented Architecture Best Practices”, Prentice Hall, 2004.

•  Readings: •  A. Hess, B. Humm, M. Voss, G. Engels:

Structuring Software Cities - A Multidimensional Approach. In Proceedings of EDOC’2007, pp. 122-129.

•  O. Zimmermann, V. Doubrovski, J. Grundler, K. Hogg: Service-oriented architecture and business process choreography in an order management scenario: rationale, concepts, lessons learned. OOPSLA Companion 2005, pp. 301-312