• No results found

Service Oriented Architectures

N/A
N/A
Protected

Academic year: 2021

Share "Service Oriented Architectures"

Copied!
43
0
0

Loading.... (view fulltext now)

Full text

(1)

Service Oriented Architectures

Gustavo Alonso

Computer Science Department

Swiss Federal Institute of Technology (ETHZ) [email protected]

http://www.iks.inf.ethz.ch/

8

(2)

The context for SOA

(3)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 3

A bit of history

Enterprise computing has evolved along many directions in the last decade:

 Data centers

 Islands of information

 Scale up vs. scale out

 Networking and distribution

 Internet and WWW

 Middleware

 RPC vs messaging

 Programming languages

This is an evolutionary process with many changes and many aspects to it but with common themes:

 Making enterprise IT more cost efficient and manageable

 Making systems faster, more robust, more flexible

We are in the middle of the evolution …

(4)

An e-commerce platform

ASP SSL FARM A

SQL Product Server

ASP File Server

Cache Server

Basket/Ad/Surplus

Receipt/Fulfillment

ASP SSL FARM B

SQL Product Server ASP File Server

5 2 2 5 2

Diagram courtesy of Robert Barnes, Microsoft

(5)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 5

Enterprise architecture at Credit Suisse

Multiple backends, multiple frontends, flexible composition

Graphic courtesy of Claus Hagen, Stephen Murer and Hanspeter Uebelbacher of Credit Suisse

(6)

Integration Infrastructure - Credit Suisse

CS EventBus Infrastructure (Message based)

CS Service Infrastructure (CORBA, Web Service based)

Server

Server Core Banking

Systems (Host) Core Banking Systems (Host)

Bought Applications

Bought Applications

International IT Platforms International IT Platforms Other

Business Units Other Business Units

Data Warehouses Data Warehouses

Business Partners Business

Partners App

Logic

App Logic

App Logic

App Logic

App Logic

App Logic

App Logic

App Logic

Client

Client Client Client Client Client Client Client

Bulk integration infrastructure (File Transfer)

(7)

Switching to services

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 7

Service Architecture adoption at Credit Suisse (graph courtesy of Stephan Murer)

(8)

Many trends but one direction

Dominant trends:

 Loose coupling

 Messaging (instead of RPC)

 Software encapsulation at a larger scale (service)

 Need for governance

 Reliance on more complex infrastructures

These elements are emphasized in different ways as technology evolves.

(9)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 9

An integration backbone

(10)

Imposing some order

For many years, enterprise computing was very confusing:

 Many products

 Many platforms

 Incompatibilities

 Many different approaches

 Field was not yet mature

Service orientation is the first attempt at bringing some order

 Borrowing concepts from software engineering

 Making services the unit of discourse

 Understanding architectures

 Understanding the key concepts

(11)

INTEGRATION TIER ACCESS TIER

CLIENT TIER

APP TIER

wrapper

wrapper

wrapper

db db db

business

object business

object business

object

api api

api

client web java

client applet

client

WWW servers, J2EE, CGI JAVA Servlets API

databases, multi-tier systems backends, mainframes system federations, filters

object monitors, MOM

TP-Monitors, stored procedures programs, scripts, beans WWW and WAP browsers specialized clients (Java, .NET)

Eclipse RCP, SMS ...

HTML, SOAP, XML

MOM, HTML, IIOP, RMI-IIOP, SOAP, XML

MOM, IIOP, RMI-IIOP, XML

ODBC, JDBC, RPC, MOM, IIOP, RMI-IIOP

(12)

SOA metamodel

(13)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 13

What is SOA

SOA = Services Oriented Architecture

 Services = another name for large scale components wrapped behind a standard interface (Web services although not only)

 Architecture = SOA is intended as a way to build applications and follows on previous ideas such as software bus, IT backbone, or enterprise bus

The part that it is not in the name

 Loosely-coupled = the services are independent of each other, heterogeneous, distributed

 Message based = interaction is through message exchanges rather than through direct calls (unlike Web services,

CORBA, RPC, etc.)

(14)

The novelty behind SOA

The concept of SOA is not new:

 Message oriented middleware

 Message brokers

 Event based architectures

The current context is different

 Emergence of standard interfaces (Web services)

 Emphasis on simplifying development (automatic)

 Use of complex underlying infrastructure (containers, middleware stacks, etc.)

Interest in SOA arises from a number of reasons:

 Basic technology in place

(15)

Web Services and SOA

(16)

Automatic Software Generation

High Level Declarative Programming

Enactment, enforcement

adaptation, Extension,

compilation, resolution,

monitoring Programmer domain

(17)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 17

System Integration

SOA is not an abstract idea, it is a response to

 Very well defined needs in enterprise computing

 Changes in technology (cluster, networking, distribution)

 The Internet

 Business-to-Business integration

 Enterprise Computing coming of age

 Large scale distributed information systems

To understand SOA, the key is to understand the underlying problems, not just the technology involved in solving them

(18)

Automatic Plumbing Generation

The promise of SOA is to facilitate integration by

 Letting the system automatically decide on integration decisions

• protocols to use

• intermediate processing needed

• routing and distribution

• data transformations

 Enforcing standards for defining and operating with services

 Enforcing the use of service interfaces

Related to this, there are many additional opportunities:

 Languages for orchestration and composition

 Reasoning about compositions

(19)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 19

Facilitate integration

In the medium term, service orientation will solve the

problem of connectivity at the syntax level

Model Driven Architectures

Business Processes

Orchestration extensions

protocols

data map

mode

extensions

protocols

data map

mode Programmer domain

System Domain

(20)

WS standards

(21)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 21

Separation of concerns

(22)

The software engineering aspects of SOA

(23)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 23

SOA is HAD

HAD is an old concept in distributed information systems

 H = Heterogeneous

 A = Autonomous

 D = Distributed

HAD is

 The essence of and the reason for SOA

 The problem SOA tries to solve

HAD is where the OO paradigm has failed

 CORBA

 Object Oriented Databases

 Reuse

(24)

No HAD in OO: OO Detours (Steve Cook, ECOOP 06)

Reuse Problem: Objects ignore the environment where they live

 Real objects in different systems are autonomous

 Real objects in different systems are heterogeneous

Distribution Problem: Abstracting away the problem’s essence

 Tight coupling (language, interaction, development, operation)

Database Problem: impedance mismatch

 Still present with XML, messages, and events

Modeling Problem: from OO models to software systems

 Objects are too low level to model real HAD systems

(25)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 25

Services not components

The two sides:

 Integration is based on services

 Programming is based on objects and components

There are similarities in theory, in practice they are very different

 Services are not object oriented

 Services have document based interfaces

 Services have a behavioral contract with their consumers

 Services are reusable by definition

 Services are (should be) loosely coupled

 Services are autonomous

 Services have (very) explicit boundaries

(26)

Objects – Components - Services

Object orientation

Compiler based

Object/method interfaces Behavior explicit in object Program is closed world Programming language

Component systems

Middleware based Component interfaces Behavior in composition Program is open world Middleware + plumbing

Service platforms

Container + middleware Service interfaces

Behavior in code, container and composition

Autonomic, large scale

Component Models - Middleware Service oriented architectures

(27)

Services engineering

(28)

Services: integration not programming

The key issue in enterprise computing today is integration

 Services are the best way to approach integration known so far

(29)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 29

What SOA is about

SOA is about:

 Non-functional properties of complex distributed systems:

performance, reliability, security, …

 Large scale composition

 Document and message based interaction

 Distributed systems architecture

 Run time properties and contracts

 Protocols, data formats

 Reusability

Conventional software engineering cannot address:

SOA and web services bring to the fore the dependencies of existing programming languages on (single CPU) hardware concepts

(30)

Two contemporary examples

XML

 Programming language variables

 Semi-structured Documents

 Procedural interfaces

 Document based interfaces

 Behavioral interfaces

 Variable assignment

 Declarative queries

Asynchronous Data Streams

 Procedural control flow

 Event based control flow

 Language based distribution

 Platform based distribution

 Behavioral interfaces

 Sequential programs

 Highly parallel and concurrent

(31)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 31

Services = run time Software Engineering

A Service contract involves the interface, the Service Level agreement and QoS

Contracts are key to be able to develop, debug, optimize and maintain systems

developed as a combination of services

The management of the information about services, and the engineering of

systems based on services leads to the notion of SOA Governance

Service contracts are not the static, compile time pre-

and post-conditions of conventional programming

languages

They are an additional software layer in charge of the dynamic

aspects of using services

(32)

Aspects of SOA Governance

(33)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 33

SOA Governance

(34)

SOA governance

SOA governance introduces different aspects to standard software engineering concepts:

Service definition (the scope, interface, and boundaries of a service)

Service deployment lifecycle (the lifecycle stages)

Service versioning (including compatibility)

Service migration (deprecation and sunsetting)

Service registries (dependencies)

Service message model (canonical data models)

Service monitoring (problem determination)

Service ownership (corporate organization)

(35)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 35

Service definition

The biggest challenge by service definition is to identify service boundaries:

 Services are seen as having well defined, clear boundaries

 In practice, not that easy

 What is a service?

• Functionality vs data

 Data cohesion

• services that use common data are difficult to separate

Boundaries make sense at the business level not at the implementation level:

 A single database can expose many services but it remains a single database

(36)

Coupling

Tighter coupling tends to cost more over time:

 Synchronization

 Coordinated deployment and deployment; updates

 Combinatorial explosion in dependencies

 Services are not independent (boundaries)

 Coupling implies more expensive testing

Looser coupling requires greater investment up front:

 More design work

• Generality

• Message model

 More implementation work

(37)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 37

Life cycle

Services are autonomous entities used by other services

 Individual maintenance is not enough

 Coordination across entities

 Dependency management

Service versioning

 Necessary to maintain compatibility across dependencies (otherwise all connected services need to be upgraded simultaneously)

Service migration

 Eventually all consumer services need to be migrated to the newest version

 Cascading dependencies

(38)

Registries for control and information

The service registry serves as the name and directory server for services and related information

 Versions available

 Services and providers

 Consumer and dependencies (less common)

UDDI specification quite useful for this purpose

 Technical information

 Documentation

(39)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 39

SOA development

(40)

Message model

Services are asynchronous and communicate through messages:

 What if each service defines its own messages

 What about formats and conventions

A message model acts as a standard determining

 The formats and conventions for messages

 May standardize messages as documents

 Published as canonical model

(41)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 41

Monitoring

Processes and service composition involve the invocation of many remote services

 What happens if the service is not there

• Exception, failure, error?

 Services are autonomous

• Queues help

• Eventual manual intervention

 How to fix the problem?

• Alternative services

• Migration

Several tools in the market

(42)

Ownership

Arbitrage is necessary when many consumer services use the same provider service:

 Priorities

 Life cycle

 Versioning and migration

 Load and performance

Centralized and distributed solutions

 Both become complex at large scales

(43)

©Gustavo Alonso, Dept. of Computer Science, ETH Zürich. 43

Conceptual model

References

Related documents

Our PNA software is implemented as a Linux kernel module split into an active logging step and a real-time monitoring step that allows analysis of network frames as they arrive

When a …rm locates an export-platform in a given host country, the sign of surrounding market potential is positive and negative for the spatial lag.. This negative sign re‡ects

The Finance-Auditing Committee recommends that the Board of Directors authorize the General Manager or his designee to execute for and on behalf of the District any actions

In the ongoing quest to best assess and comprehension level, it is important to know which response questions best measure knowledge, which presentation conditions best

This risk would be greater for firms relying on trust and company service providers, money service businesses, consumer credit financial institutions, certain accountants and tax

To carryout the iteration on the ship dimensions and parameters needed to achieve a balance between weight and displacement and/or between required and available hull volume,

 Under the right setting and provision of good market information and business advice (i.e. intervention by donors and various external actors), SMEs in developing countries could

Yet the Paris Agreement accepts in principle the importance of disaster risk reduction processes, despite not connecting climate change to this wider context.. Article