• No results found

Service Oriented Architecture

N/A
N/A
Protected

Academic year: 2021

Share "Service Oriented Architecture"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Service Oriented

Architecture

Paolo Falcarin

2

From Components to (Web) Services

ƒ Requires a client library ƒ Client / Server ƒ Extendable ƒ Stateless ƒ Fast ƒ Small to medium granularity

ƒ Loose coupling via Š Message exchanges Š Policies ƒ Peer-to-peer ƒ Composable ƒ Context independent ƒ Some overhead ƒ Medium to coarse granularity

(2)

3

Towards a Service-Oriented Architecture

ƒ Function oriented ƒ Build to last ƒ Prolonged development cycles

From

From

To

To

ƒ Coordination oriented ƒ Build to change

ƒ Incrementally built and deployed ƒ Application silos ƒ Tightly coupled ƒ Object oriented ƒ Known implementation ƒ Enterprise solutions ƒ Loosely coupled ƒ Message oriented ƒ Abstraction

SOA (Service Oriented Architecture)

SOA IS

AN ARCHITECTURAL STYLE

WHOSE GOAL IS TO ACHIEVE

LOOSE COUPLING

AMONG INTERACTING

SOFTWARE AGENTS

(3)

5

Large Firms Implementing SOA

Implemented/(ing) SOA No plans

58% of 612 organizations polled by CIO Magazine implemented or plan to implement SOA

CIO Magazine March 2006

6

SOA Growth

Forrester: 70% of global enterprises

have adopted or will adopt SOA

Hayward, S “Position 2005: Service Oriented Architecture Adds Flexibility to Business Processes”

Gartner, Inc. Feb 2005

“SOA will provide the basis for 80% of

new development projects by 2008”

Dr. Chris Harding, “Modeling SOA Implementation”

(4)

7

Service Oriented Architecture

“The SOA models the business as a collection of self-contained services that are available across the enterprise that can be invoked through standard protocols both internally and externally.” (Hohpe)

•Services are

course grained

collections of

functionality rather than small

components.

•Services are

factored out

of their

applications to eliminate duplicated

functionality.

•Services are

run-time

shareable functions.

SOA

=

Web Services

• Service-Oriented Architecture (SOA): An IT architectural style based on the concept of a collection of services that communicate and coordinate with each other in an enterprise-level, distributed computing environment.

• Service: A self-contained, reusable function that is invoked through well-defined interfaces and is independent of the context, state or location of other services or applications.

• Reuse: Services encapsulate business functions that are located and reused at run-time.

Key SOA Concepts

/

(5)

9

• Coarse-Grained: Granularity is the level of detail at which an item is viewed or described. Services tend to be Coarse-Grained where as an API is fine-grained. • Loose Coupling: Service provider and consumer need

no knowledge of how the other is implemented resulting in minimal dependencies. Generally implies

asynchronous messaging.

• SOA Governance: The organization and processes to ensure optimal reuse of services and enforcement of policies (eg. Business design, technical design, application security).

Key SOA Concepts

SOA = Concepts and Principles

not Technology

10

• Web Services: A specific implementation of SOA that uses standard Web protocols to connect services together via XML messages. Most commonly used scenario is synchronous request/response pattern.

• Message Oriented Middleware (MOM): A category of inter-application communication software that relies on asynchronous message passing as opposed to a

request/response metaphor. (e.g. MQ-Series)

• Enterprise Service Bus: Message Oriented Middleware that provides a robust asynchronous transport service for XML messages and standard Web services protocols.

Key SOA Technologies

SOA is not a new concept – but new technologies, like Web services, have made it more practical

(6)

Migrating Information

Systems to SOA

Two Approaches to SOA

ƒ

Top Down – Business-centric

Š Start with high-level picture of Business Processes

Š Decompose processes – look for redundancy, Service candidates

Š Best approach to demonstrate business value

ƒ

Bottom Up – Technology-centric

Š Start by looking at existing IT capabilities Š Look for redundant coarse-grained functions

to expose as Services

Š Prioritize with 80/20 rule – Expose the 20% functionality that is used 80% of the time

(7)

13 User Interface Security Reporting Workflow Business Rules Processing Correspondence Entity Mgmt Core Business Logic

From a survey on

Industrial Insurance

Apps

Only about 30%

Unique Business Logic

Bottom-Up:

Identify Redundant Functions

14 User Interface Security Reporting Workflow Business Rules Processing Correspondence Entity Mgmt Core Business Logic

70% Redundant

Functions Common

to Most Business

Applications

(8)

15 User Interface Security Reporting Workflow Business Rules Processing Correspondence Entity Mgmt Core Business Logic User Interface Security Reporting Workflow Business Rules Processing Correspondence Entity Mgmt Core Business Logic User Interface Security Reporting Workflow Business Rules Processing Correspondence Entity Mgmt Core Business Logic

Multiplied times many apps…

Lots of redundant functionality

to build and maintain

Bottom-Up: Identify Redundant Functions

WHAT CAN WE DO?

User Interface User Interface User Interface Reporting Business Rules Processing Core Business Logic Security Correspondence Core Business Logic Workflow Entity Mgmt Core Business Logic Web

Facing DeliveryInfo BusinessRules Corresp. Workflow Security EntityMgmt Security Workflow Correspondence Entity Mgmt Reporting Workflow Business Rules Processing Entity Mgmt Security Reporting Business Rules Processing Correspondence SHARED SERVICES

INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE

Tight Coupling?

X

(9)

17

Message Bus

(asynchronous)

Core Business Logic

Core Business

Logic Core Business Logic Web

Facing DeliveryInfo BusinessRules Corresp. Workflow Security EntityMgmt

SHARED SERVICES

INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE

INTERFACE INTERFACE

INTERFACE

Build Functions as Services

18 Core Business

Logic

Core Business

Logic Core Business Logic Web

Facing DeliveryInfo BusinessRules Corresp. Workflow Security EntityMgmt

Message Bus

(asynchronous) SHARED SERVICES

XML

INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE

INTERFACE INTERFACE

INTERFACE

Build Functions as Services

LOOSE COUPLING

XML XML XML XML XML XML

(10)

19

BUSINESS APPLICATION SERVICES

•Not shared across multiple processes •Very specific business logic

•Uses services from lower levels

INFRASTRUCTURE FRAMEWORK SERVICES

•Generalized, shareable technology •Programmable, no native business logic •Some relevance to developers

BUSINESS FRAMEWORK SERVICES

•Shared across multiple business processes •Broad business logic

•Highly relevant to developers

INFRASTRUCTURE FOUNDATION SERVICES

•Highly standardized technology •Broadly shareable, no business logic •Not very relevant to developers

Example: Accounts Receivable Example: Business Process Mgmt Example: Security Example: Enterprise Service BUS

Service Classifications

High Low

Relevance to Developers

BUSINESS APPLICATION SERVICES (Common Apps)

INFRASTRUCTURE FRAMEWORK SERVICES BUSINESS FRAMEWORK SERVICES

INFRASTRUCTURE FOUNDATION SERVICES •Accts. Receivable

•Accts. Payable •Inspections •Permits & Licensing

•Claims Mgmt •Pension Mgmt •Provider Bill Processing •Customer Relationships

•Finance & Budget •Purchasing & Assets •Safety Mgmt •HR

•In-Correspondence •Out-Correspondence •Info Delivery

•Work Flow/BPM (app) •Business Rules (app) •Entity Mgmt (app)

•Personalization (portal) •Content Mgmt (portal) •Payment Processing

•Web Facing (portal) •Portal Servers •App Servers (.NET)

•Work Flow/BPM (engine) •Business Rules (engine) •Shared Security •Entity Mgmt (engine) •Active Metadata •Message Routing •Service Bus •XML Cache •Data Exchange •Directory services •Networks •Load balancing •Storage •Computing Platforms •Databases

Services Examples

(11)

21

Increasing levels of encapsulation

Code reuse Language Objects Platforms Components Frameworks Applications Abstraction Time 22

SOA fosters Agility

ƒ

Agility is the ease with which an

organisation can change

Š

Highly agile organisations react quickly to

changes in the market, thus getting

ahead of the competition

ƒ

Software evolution

Š

If the system cannot evolve, the business

cannot react to changes

ƒ

Software evolution entails

costs and risks

Evol.

(12)

23

Agility

ƒ

Unprecedented levels of change

Š often unanticipated

ƒ

Virtual organizations

Š

Interacting applications belong to multiple

administrative domains

Š

Internal applications increasingly exchange

functions with the external of the enterprise

Š

Many potential providers can be found for

each required function

Š

Web based interactions become pervasive

Yet another middleware?

ƒ

Execution is distributed . . .

ƒ

. . . but also costs and risks are distributed

ƒ

Organization ability to evolve business

Š depends on the marketplace ability anticipate trends and needs and provide the right services at the right time

Š does not depend on ability of a software vendor to change a piece of software

ƒ

Services are realized by software

Š need for development / maintenance Š this is a vendor concern

(13)

25

Striving for agility

Agility Decentralization of components Dynamicity of bindings Monolithic Distributed Cross domain Modular 26

Striving for agility

Agility Decentralization of components Dynamicity of bindings Monolithic Distributed Cross domain Compile time Deploy time Run time On demand Modular

(14)

27

What SOA brings in

ƒ

Open infrastructures where “pieces of

functionality” are published as services

Š come with a contract for clients specifying QoS

ƒ

Services appear dynamically

Š they must be discovered

ƒ

They run in their own domains

ƒ

New services built by composing services,

which may live in external domains

Š late binding

Š execution time discovery

What SOA brings in

ƒ

Not just web services

ƒ

Not all Web services fit into an SOA

Š e.g., fine-grained RPC-type services

ƒ

Not all SOAs use Web services technology

Š e.g., message-oriented middleware technology

ƒ

Services may must be

ƒ

Derived from

business requirements

Š Typically expressed as business processes

ƒ

Sufficiently

coarse-grained

to

(15)

29

Many new challenges for software

engineering

ƒ

Service engineering

Š e.g. contract based specification

ƒ

Publishing, searching and negotiation

Š e.g. syntactic vs.semantic discovery, policy-driven resource allocation

ƒ

Composition

Š e.g. balancing dynamicity and safety

ƒ

Validation

Š e.g. limitations of traditional testing

ƒ

Trust

Š e.g. the role of run-time self checking

(16)

31

SOA as “On Demand” Computing

ƒ

Use software

as you need

ƒ

Much

lower setup time

, forget about

Š Installation Š Implementation Š Training

Š Maintenance

ƒ

Scalable and effective usage

of resources

Š Provision

Š Billed on true usage

Š Parallelism (CPU, Storage, Bandwidth…)

New Paradigms in SOA

ƒ

An application

is NOT a single system

running on a single device and bounded by a

single organization

ƒ

Object <=> XML Document

ƒ

Messages

and

Services

Š As opposed « distributed objects »

Š Exchanges becomes peer-to-peer

ƒ

Asynchronous

communications

ƒ

Concurrency

becomes the norm

(17)

33

SOA

34

Message Based Interaction

ƒ

All interaction between

components is through

messages

(18)

35

“Bus”

ƒ

Conceptual artifact

Š To get you away from the point to point mentality Š A strategy for integrating

applications together at runtime using MOM.

(like the bus/ backplane in a PC)

Broker

ƒ

A dispatcher of messages

Š Many varieties and variations

(19)

37

Queues

ƒ

Queues are key to

making this work

38

SOA vs. Web services

What is it?

Interface standard

Architectural Style

Web service

SOA

(20)

39

SOA vs. Web services

Early use

New development

Composite Apps

Legacy Wrapping

EAI

Web services

SOA

SOA vs. Web services

Predominant/ default interaction

Request/Reply

Synchronous

Publish/Subscribe

Asynchronous

Web service

SOA

(21)

41

SOA and Web service co-existing

Service Registry Service Provider Service Consumer WSDL SOAP WSDL SOAP 42

Loose Coupling: Intermediaries

ƒ Decoupling is achieved by introducing an ‘intermediate form’

ƒ Full application decoupling requires intermediate forms for Technology, Destination, Syntax,

(22)

43

What Makes a Good Intermediary ?

ƒ

It doesn’t change as rapidly as its

clients.

ƒ

It is non proprietary.

ƒ

It is evolvable.

ƒ

It is simple to use.

Examples of Intermediaries

ƒ

Integration Brokers

ƒ

Message Queues

ƒ

Enterprise Service Bus (ESB)

(23)

45

WS-Notification

ƒ

Brings enterprise quality publish and

subscribe messaging to Web services

ƒLoosely coupled, asynchronous messaging in a Web services context

ƒ

WS Notification exploits WS Resource

framework and other Web services

technologies

ƒ

Direct and Brokered notification

ƒ

Topics and Topic Spaces

ƒ

More on subscribe

ƒ

Use of WS-Notification in WS-RF

46

WS-Notification Family of Documents

ƒ

WS-Notification is a family of documents:

Š

Publish-Subscribe for Web services

– Whitepaper describing roles, concepts, terms, etc.

Š

Base Notification

– Basic interfaces: Producer, Consumer, Subscription

Š

Topics

– Topics and TopicSpaces model in XML – Topic Expression Dialects

Š

Brokered Notification

(24)

47

Consumer

Producer

Subscriber

WS-Notification: Base Notification

subscribe

subscribe

S

notify

EPR

ƒ

Defines the Basis for the family

ƒ

Direct notification: Three primary

roles

ƒ

Subscriber deals directly with the

producer of the Notifications

Šindicates interest in a particular “Topic” by issuing a “subscribe” request

ƒ

An EPR to the subscription is

returned

ƒ

Producer is responsible for

detecting situation and

creating the notification

ƒ

Subscriptions that match

receive the notification

ƒSimilar roles as in direct, adding ‘Broker’Role

ŠBroker (intermediary) permits decoupling Publisher and Subscriber

ƒSubscriber indicates interest in a particular “Topic” by issuing a “subscribe” request ƒ“Subscriptions” are WS-Resources

ŠVarious subscriptions are possible

ƒNew role: Publisher

Šneed NOT be a Web Service

ƒPublisher detects situation:

ŠPublishes the Notification to a broker

ƒBroker responsible for disseminating notifications

Š examines current subscriptions for match

ƒBrokers may provide “value add”

Š“Transform” or “interpret” topics

Broker Subscriber

WS-Notification: Brokered Notification

Publisher subscribe subscribe S S S notify notify notify notify

(25)

49

4. Introduction to the WS - * specifications

ƒ Web Service Addressing ƒ Web Service Policy

ƒ Web Service Transactions Š WS – Coordination

Š WS – AtomicTransaction Š WS - BusinessActivity

ƒ

Web Service Reliable Messaging

Š WS – ReliableMessaging Š WS – ReliableMessaging Policy ƒ Web Service Security

50

4. Introduction to the WS - * specifications

ƒ

Web Service Addressing

Š provides transport-neutral mechanisms to address Web Services and messages.

ƒ

Web Service Policy Framework

Š defines a base set of constructs that can be used and extended by other Web Services specifications to describe a broad range of service requirements and capabilities.

ƒ

WS – Coordination

Š Describes an extensible framework for providing protocols that coordinate the actions of distributed applications

(26)

51

4. Introduction to the WS - * specifications

ƒ Web Service Reliable Messaging

Š Describes a protocol that allows messages to be delivered reliably between distributed applications in the presence of software component, system or network failures. The protocol is described in a transport-independent manner. ƒ Web Service Security

Š Provides comprehensive solutions to secure Web Service communication. In general these issues are addressed:

– Authentication – Authorization – Secure Messaging – Secure data access – Denial of service

(27)

53

SOA and BPM

ƒ

SOA is about constructing software

components that can be reused in

context unknown at design time

Š

Composition versus Extension (OO)

ƒ

BPM is about being able to precisely

model and possibly change the

context in which enterprise

components are used

ƒ

But how the two meet?

54

BPM in SOA

ƒ

Two approaches

Š

Event Oriented

–BPML, BPEL

–Pi-Calculus (Also Event Calculus)

Š

Activity Oriented

–WfMC

–Petri nets

(28)

55

Web service/BPEL Orchestration

ƒ

You can get a

similar effect

with Web

services

orchestration.

A very simple example

ƒ

A buyer orders some goods from a

supplier

ƒ

The supplier performs a series of

steps to fulfill the order

Š

Approve the order

Š

Update the order entry system

Š

Update the billing system

Š

(29)

57

Orchestration languages

ƒ

They allow us to implement complex

services which involve:

Š

Long running (from a few hours to a few

months),

Š

And event driven business logic

ƒ

They are not about modeling Business

Processes by themselves

Š

Different orchestration (i.e. different

services) can run within the same business

process

Š

And

vice versa

58

A Business Process can be Viewed as a

Multi-Party Choreography of Peer Services

User Activity

Buyer Supplier SFA Sales

person Start ERP Mapping Routing Quote RFQ RFQ RFQ Order Order Order Invoice Accounts Account SalesTax.com CreditCheck.com Orders Billing Invoice Sales Order Events Activity Information Entity

(30)

59

Services in a SOA are orchestrated (BPEL)

Quote Service Orchestration Definition RFQ Nack Quote Sales Tax <<send>> quote updateDB Transition Message flow RFQ Quote Ok? No sendNack Order <<invoke>> calculateSalesTax <<invoke>> GetQuote Ok? No Entity State Entity <<receive>> RFQ

A Choreography Provides a Model of

the Event Flow Between Activities

Buyer Supplier (Self) Order Entry PO AckPO BTA1 OpA1 PO AckPO Manager OpA2 Sales order Start Wit1 PO PO Billing Failure Success [BusinessFailure] [Success]

(31)

61

Orchestration vs Choreography

ƒ

Orchestration

Š « … is an emerging [concept] that would give programmers a way to formally describe

processes underlying business applications so that they can be exposed and linked to

processes in other applications

»

ƒ

Choreography

Š Is a concept that specifies how these processes are linked together across the enterprise

Š Choreography can be « active » when mapping and routing are necessary

ƒ

They are both a form of Coordination

62

Putting BPM and SOA together

ƒ

The foundation is becoming sound with

strong theoretical support

ƒ

Lot of work to be done on Stateful Services

ƒ

Semantic Web standards add:

Š Shared ontologies in OWL-S Š Semantic Interfaces (WSDL-S)

Š Formal unambiguous semantic for intefaces and data

Š Fundamental for reaching automatic service composition and adaptation

(32)

63

SOA is a New Computing Paradigm

ƒ

Not as a new name for

Š API

Š Component

ƒ

A genuine set of concepts with which we can

construct new kinds of software

Š This is as significant if not more than Object Orientation

ƒ

In particular SOA forces us to think about

enabling the same piece of code to be

leveraged

Š by large numbers of consumers Š in unforeseen context

References

ƒ Existing BPEL Runtimes:

Š ActiveBPEL [http://www.activebpel.org] Š Eclipse BPEL [http://www.eclipse.org/bpel] Š Orchestra – ObjectWeb- JONAS J2EE app server ƒ Workflow Runtime:

Š Windows Workflow Foundation

[http://msdn.microsoft.com/workflow] ƒ WS - * Frameworks: Š WS Apache [http://ws.apache.org] Š WS Apache Pubscribe Š Microsoft WSE [http://msdn.microsoft.com/webservices/webservices/buil ding/wse/default.aspx

References

Related documents

http://help.sap.com/solutionmanager71  Application Help  Solution Manager Infrastructures  Technical Monitoring and

A basic valve symbol is e symbol is compo composed of sed of one or one or more more envelopes with lines inside the envelope to represent flow envelopes with

(a) Measured transmission spectra of a bent line-defect waveguide (pink line) and a perfect surface-wave photonic quasicrystal without any defect (black line), as well as

Secondly, structural invariance of the questionnaire shows that the DFS-2 Italian version is a valid and reliable instrument for measuring the experience of flow not only in sports,

of consumers are willing to pay more for products and services that come from companies committed to positive social

An Online Tool to Evaluate Student Practice Competence.. in

Organizing ideas around a currency crisis model can bring various advantages in understanding sources of financial instability such as: self-fulfilling

Enumeration and cell cycle analysis of natural populations of marine picoplankton by flow cytometry using the nucleic acid stain SYBR Green I. Enumeration of marine viruses