soa: principles of service design...

1
<definitions> <types> ... </types> <message> <part/> ... </message> <portType> ... </portType> ... </definitions> <Policy> <ExactlyOne> <All> assertions ... </All> <All> assertions ... </All> </ExactlyOne> ... </Policy> areas affected by standardization <schema> <element > <complexType> <sequence> <element .../> <element .../> <element .../> </sequence> </complexType> </element> ... ... </schema> implementation parent business process service consumers vendor technology .NET WS J2EE service composition members service logic service contract Service Level Agreement (SLA) technical Web service contract service contract WSDL WS Policy XML schema task service A entity service A entity service B utility service A utility service B high potential autonomy dependent autonomy dependent autonomy low high typical autonomy level Standardized Service Contract "Services within the same service inventory are in compliance with the same contract design standards." Service Loose Coupling "Service contracts impose low consumer coupling requirements and are themselves decoupled from their surrounding environment." Service Abstraction "Service contracts only contain essential information and information about services is limited to what is published in service contracts." Service Reusability "Services contain and express agnostic logic and can be positioned as reusable enterprise resources." Service Autonomy "Services exercise a high level of control over their underlying runtime execution environment." Service Statelessness "Services minimize resource consumption by deferring the management of state information when necessary." Service Discoverability "Services are supplemented with communicative meta data by which they can be effectively discovered and interpreted." Service Composability "Services are effective composition participants, regardless of the size and complexity of the composition." W Q R S K L G A D Development Project # 20 Development Project # 21 Development Project # 22 service inventory K R S W D Q R A L P G Z B C E F H I J M N O P T U V X Y active + stateful active + stateless state data repository pre- invocation begin participation in activity pause in activity participation continue activity participation pause in activity participation end participation in activity post invocation service owners service consumer program designers design specifications, source code, etc. open access controlled access no access service contract vendor technology the service logic will be implemented (and therefore coupled to) proprietary vendor technology implementation .NET WS J2EE service logic the service contract can be coupled to the service logic the service logic can be coupled to multiple services it may need to compose the service contract and any underlying logic can be coupled to a parent business process parent business process the service logic can be coupled to the service contract if the service contract is coupled to the service logic, it can assume logic-related coupling characteristics the service logic may be coupled to various resources that are part of the overall implementation environment service composition members Process Claims.wsdl Claims.wsdl Validate Reports.wsdl Reports.wsdl Report Header.xsd Reports Detail.xsd Claim Header.xsd Claims Detail.xsd Security Policy.xml Claim Policy.xml Service Functional Technology Quality of Service Programmatic Capability A Capability B Service B Capability A Capability B Service C Capability A Capability B Service D Capability A Service A Service Consumer Program A (2) (3) (4) (5) (7) (1) (6) detailed concise optimized Step 1: Custom design the Web service contract. Step 2: Import the Web service contract into a development environment. Step 3: Build the underlying solution logic in support of the pre-defined Web service contract. Import When a service is implemented as a Web service, the service contract can be comprised of a WSDL definition and multiple XML schema and policy definitions, as well as supplementary documents, such as an SLA. This principle preaches a “contract first” approach to service delivery, whereby contracts are custom-developed (prior to the development of the service logic) according to design standards that apply to all services within a given service inventory. Standardized policies and schemas can be centralized so that one definition represents an “official” set of policy assertions or complex types that can be referenced by multiple WSDL definitions. Chapter 6: Service Contracts (Standardization and Design) Contract design standards can affect and shape many element definitions and the overall structure of WSDL, XML schema, and policy definition documents. A service contract that is derived from its underlying environ- ment can end up forming negative types of coupling upon parts of that environment. Logic-to-contract coupling is considered a positive form of coupling because it represents the independent creation of a contract that is decoupled from the service environment. Service consumer programs are required to couple themselves to a service’s contract. As a result, they inherit whatever forms of negative or positive coupling that reside within the service contract. This principle relates to the Contract Centralization pattern which dictates that the service contract be the sole means of accessing service logic and resources. Chapter 7: Service Coupling (Intra-Service and Consumer Dependencies) When determining what information about a service should be abstracted, it is helpful to categorize service meta data into distinct categories. The application of this principle can affect the abstraction of each of these meta information types differently. This principle advocates the deliberate hiding of service meta data so that a minimal amount of infor- mation about a service is accessible to the outside world. The application of this principle can effectively turn a service into a “black box” where the only information made available about the service is what is published in its contract (which may encompass what is also published in a service registry). Therefore, the content of the service contract itself is a primary focal point for which different abstraction levels exist. Chapter 8: Service Abstraction (Information Hiding and Meta Abstraction Types) A B G K X T As a result of this principle, service consumer program designers may be unaware that a service is composing others. This places a great deal of emphasis on the reliability and the predictability of a service, regardless of what it may be encapsulting (which also raises issues as to what should be published within service SLAs). service with redundant invoice processing capabilities official Invoice entity service underlying service logic Contract Centralization ensures that service consumers only access a service via its published service contract 2 1 Logic Centralization ensures that service consumers only have one access point for any given body of logic service consumer Invoice ProcInv “We will not build new invoice processing logic because we are required to use the existing Invoice service.” “Our project team is required to automate a new business process that involves invoicing functionality that already exists within the Invoice service.” “Our project team is required to automate a PO processing task for which solution logic does not yet exist.” “We will search the existing inventory to confirm that no one service already provides this logic. We will then build a PO service so that it can be reused by others in the future.” Proliferation of positive coupling is desirable so as to allow service implementations to evolve without impacting service consumers. Positioning services as reusable enterprise resources relates to the Logic Centralization design pattern that dictates that each reusable service be the sole access point for the body of logic it represents. When combined, Logic and Contract Centralization result in a highly standardized and normalized service inventory in full support of maximizing reusability potential and loose consumer coupling. Chapter 9: Service Reusability (Commercial and Agnostic Design) Project delivery processes typically need to be changed as a result of the consistent incorporation of this principle so as to ensure that Logic Centralization is always respected and that reuse potential of agnostic services is maximized. The greatest obstacle to realizing this principle is usually associated with overcoming cultural resistance to these changes. Service A Service A Service B Service C Service A Service B Service C Service A Service B Service C The more control a service has over its underlying runtime implementation, the more predictable its runtime behavior will be. Reducing shared access to service resources and increasing physical isolation can raise a service's ability to function autonomously. The autonomy of individual services is especially important to the effectiveness of service compositions. Because a service composing another automatically loses autonomy, the level of autonomy a composition controller can attain is often limited to the collective autonomy levels of its composition members. Chapter 10: Service Autonomy (Processing Boundaries and Control) Chapter 11: Service Statelessness (State Management Deferral and Stateless Design) Chapter 12: Service Discoverability (Interpretability and Communication) Chapter 13: Service Composability (Composition Member Design and Complex Compositions) primary state primary state conditions types of state information types of context data active passive stateful stateless context session context data context rules business Formulas AddBase Get Simulate state database active and stateless move in-memory state data to database Run Lab Project Start state data in memory discovered service service registry service contract The human searches the service registry to locate a service with the desired functionality. The human can then retrieve the corresponding service contract. Based on its level of interpretability, the human can choose or rule out this service. If the service does not have the necessary capabilities, but still provides a suitable functional context, it can be identified as the location to which to add the required functionality (as an extension to the service). 2 Based on the registry record’s level of discoverability and interpretability, the human is able to discover and identify a service potentially capable of fulfilling its requirements. service inventory the human owner of a planned service consumer program 3 1 contains meta information about each service in the service inventory as well as a pointer to each service contract The centralization of service contract documents is itself a contract-related design standard. Depending on the nature of its logic and its role within a composition, a service may need to transition through different states and may need to manage different types and amounts of state data. State data management consumes system resources and can result in a significant resource burden when multiple instances of services are concurrently invoked, especially with agnostic services that are involved in the automation of multiple business processes. Therefore, the temporary delegation and deferral of state management can increase service scalability and support a wider range of reuse and recomposition over time. State data is commonly deferred at runtime allowing a service to remain active and stateless while other processing occurs. There are different levels of statelessness a service design can achieve, depending on the frequency of state deferral and the quantity of state data being deferred. These levels are usually specific to each service capability. Of the four service meta information types functional and quality of service data are most relevant when focusing on a service’s communications quality for discoverability and interpretability purposes. The application of this principle supports a standardized process of service discovery and inerpretation within an organization through the use of a service registry as the central repository of service meta data. Service Functional Technology Quality of Service Programmatic service inventory service registry exists as an extension of infrastructure that supports the discovery and interpretation of services within a contains services with contracts that are ideally discoverable and interpretable independently from the Both service contracts and records within a service registry contain meta information with discoverability and interpretability characteristics. Much of this information relates to and originates from the service profile document that may have been created and maintained since the service was first conceptualized during the service modeling phase (see Chapter 15 and Appendix B). SOA: Principles of Service Design Copyright © 2008 SOA Systems Inc. ISBN: 0132344823, Prentice Hall (purchase this poster at www.soaposters.com) by Thomas Erl www.whatissoa.com www.soaprinciples.com www.soapatterns.com www.soaspecs.com www.soaglossary.com www.soabooks.com www.prenhall.com www.soasystems.com www.soaschool.com www.soamag.com Prentice Hall Service-Oriented Computing Series from Thomas Erl units of solution logic that each address (solve) a small problem to solve the big problem, the units are assembled into a specific configuration that allows them to carry out their solution logic in a coordinated manner Big Problem A Small Problem small problems collectively represent the big problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem Small Problem solves Big Problem A E F G H A B C D C A F B E D G H Service-orientation is a design paradigm with a distinct approach to carrying out a separation of concerns. Services capable of addressing agnostic or cross-cutting concerns can be repurposed to solve multiple problems. This requires an effective means of decomposing solution logic and repeatedly recomposing it to solve new problems. This principle is primarily concerned with a service’s ability to act as an effective composition member so that it can support the realization of new business requirements that can be fulfilled by the assembly of service compositions. The composability potential of a service increases and becomes increasingly important as more services become available within a given service inventory. A key aspect of this principle and service compositions in general is that individual concerns are, in fact, solved by service capabilities because it is the capabilities that are composed within a service composition. Successful service composition design relies on the collective composability potential of each composition member. service inventory for a specific enterprise with high reuse potential commercial products for mass markets and with high reuse potential Service-Oriented Enterprise Step 1 Step 2 Step 3 ... service delivery lifecycle custom applications for specific enterprise users and with little-to-no reuse potential Step 1 Step 2 Step 3 ... custom development project delivery lifecycle Step 1 Step 2 Step 3 ... commercial product delivery lifecycle Commercial Product Vendor Traditional Enterprise Within service-orientation reusability represents a core target design characteristic that is tied to the goal of achieving repeated ROI for agnostic services. This principle combines techniques from tradi- tional commercial product design with traditional enterprise project delivery. Access control procedures can therefore become a requirement that may need to be addressed on an organizational level via the introduction of new or modified processes. designer of potential service consumer program service implementation and design details optimized service contract service A key goal of this principle is to enable a wide range of project team members to effectively carry out the discovery process and not to limit it to those with technical expertise. Service consumer designers may not be aware of the fact that the contract their program is forming a dependency on is negatively coupled. This can lead to various forms of “indirect” or unintentional coupling. Proliferation of negative coupling is undesirable because it leads to a fragile and inflexible service inventory reminiscent of past integration architectures.

Upload: doanlien

Post on 02-Apr-2018

245 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: SOA: Principles of Service Design Posterserviceorientation.com/static/pdf/SOA_Principles_Poster.pdf · SOA: Principles of Service Design Poster

<de�nitions> <types> ... </types>

<message> <part/> ... </message>

<portType> ... </portType> ...</de�nitions>

<Policy> <ExactlyOne> <All> assertions ... </All> <All> assertions ... </All> </ExactlyOne> ...</Policy>

areasa�ected

by standardization

<schema> <element > <complexType> <sequence> <element .../> <element .../> <element .../> </sequence> </complexType> </element> ... ...</schema>

implementation

parentbusinessprocess

serviceconsumers

vendortechnology

.NET WSJ2EE

servicecomposition

members

service logic

service contract

Service LevelAgreement

(SLA)technical Web service contract

service contract

WSDL WS Policy

XMLschema

task service A

entity service A

entity service B

utility service A

utility service B

highpotential

autonomy

dependentautonomy

dependentautonomy

low

high

typicalautonomy

level

Standardized Service Contract

"Services within the same service inventory are incompliance with the same contract design standards."

Service Loose Coupling

"Service contracts impose low consumer couplingrequirements and are themselves decoupled

from their surrounding environment."

Service Abstraction

"Service contracts only contain essentialinformation and information about services is

limited to what is published in service contracts."

Service Reusability

"Services contain and express agnostic logic andcan be positioned as reusable enterprise resources."

Service Autonomy

"Services exercise a high level of control overtheir underlying runtime execution environment."

Service Statelessness

"Services minimize resource consumption by deferringthe management of state information when necessary."

Service Discoverability

"Services are supplemented with communicative meta databy which they can be effectively discovered and interpreted."

Service Composability

"Services are effective composition participants, regardlessof the size and complexity of the composition."

W

Q R S

K L

G

A D

DevelopmentProject # 20

DevelopmentProject # 21

DevelopmentProject # 22

service inventory

K R S

W

D Q R

A

L P

G

Z B C E

F H I J

M N O

P T

U V X Y

active+

stateful

active+

stateless

state datarepository

pre-invocation

beginparticipation

in activity

pause inactivity

participation

continueactivity

participation

pause inactivity

participation

endparticipation

in activitypost

invocation

service owners

service consumerprogram designers

design speci�cations, source code, etc.

openaccess

controlledaccess

no access

service contract

vendortechnology

the service logic will be

implemented (andtherefore coupled

to) proprietaryvendor

technology

implementation

.NET WSJ2EE

service logic

the service contract can be coupled

to the service logic

the service logic can becoupled to

multiple servicesit may need to

compose

the service contractand any underlying

logic can be coupled to a parent

business process

parentbusinessprocess

the service logic can be coupled to the service

contract

if the service contractis coupled to the service logic,

it can assume logic-relatedcoupling characteristics

the service logic may becoupled to various resources

that are part of the overallimplementation environment

servicecomposition

members

ProcessClaims.wsdl

Claims.wsdl ValidateReports.wsdl

Reports.wsdl

ReportHeader.xsd

ReportsDetail.xsd

ClaimHeader.xsd

ClaimsDetail.xsd

SecurityPolicy.xml

ClaimPolicy.xml

Service

Functional Technology

Quality of

ServiceProgrammatic

Capability ACapability B

Service B

Capability ACapability B

Service C

Capability ACapability B

Service D

Capability A

Service A

ServiceConsumerProgram

A

(2)

(3) (4) (5) (7)

(1)

(6)

detailed concise optimized

Step 1:

Custom designthe Web servicecontract.

Step 2:

Import the Webservice contract intoa developmentenvironment.

Step 3:

Build the underlying solution logic in support of thepre-de�ned Web service contract.

Import

When a service is implemented as a Web service, the servicecontract can be comprised of a WSDL definition and multiple XML schema and policy definitions, as well as supplementary documents, such as an SLA.

This principle preaches a “contract first” approach to servicedelivery, whereby contracts are custom-developed (prior to the development of the service logic) according to design standards that apply to all services within a given service inventory.

Standardized policies and schemas can be centralized sothat one definition represents an “official” set of policy assertions or complex types that can be referenced by multiple WSDL definitions.

Chapter 6: Service Contracts(Standardization and Design)

Contract design standards can affect and shape many element definitions and the overall structure of WSDL, XML schema, and policy definition documents.

A service contract that is derived from its underlying environ-ment can end up forming negative types of coupling upon

parts of that environment.

Logic-to-contract coupling is considered a positive form of coupling because it represents the independent creation of a contract that is decoupled from the service environment.

Service consumerprograms are requiredto couple themselves toa service’s contract. As aresult, they inherit whatever forms of negative or positive coupling that reside within the service contract.

This principle relates to the Contract Centralization pattern which dictates that the service contract be the sole means of accessing service logic and resources.

Chapter 7: Service Coupling(Intra-Service and Consumer Dependencies)

When determining what information about a service should be abstracted, it is helpful to categorize servicemeta data into distinct categories.

The application of this principle can affect the abstraction of each of these meta informationtypes differently.

This principle advocates the deliberate hiding of

service meta data so that a minimal amount of infor-

mation about a service is accessible to the

outside world.

The application of this principle can effectively turn a service into a “black box” where the only information made available about the service is what is published in its contract (which may encompass what is also published in a service registry).

Therefore, the content ofthe service contract itself is a primary focal point forwhich different abstractionlevels exist.

Chapter 8: Service Abstraction(Information Hiding and Meta Abstraction Types)

A B

G K

X T

As a result of this principle, service consumer program designers may be unaware that a service is composing others.

This places a great deal ofemphasis on the reliability and the predictability of aservice, regardless of what it may be encapsulting(which also raises issues asto what should be published within service SLAs).

service withredundant

invoiceprocessingcapabilities

o�cial Invoiceentity service

underlyingservice logic

Contract Centralizationensures that service

consumers only accessa service via its

published service contract

2

1

Logic Centralization ensures that service

consumers only have one access point for any given body of logic

serviceconsumerInvoice

ProcInv

“We will not build newinvoice processing

logic because we arerequired to use the

existing Invoiceservice.”

“Our project team isrequired to automate

a new businessprocess that involves

invoicing functionalitythat already exists

within theInvoice service.”

“Our project team isrequired to automate

a PO processingtask for whichsolution logic

does not yet exist.”

“We will search theexisting inventory tocon�rm that no one

service already providesthis logic. We will then

build a PO service so thatit can be reused by

others in the future.”

Proliferation of positivecoupling is desirable so

as to allow serviceimplementationsto evolve withoutimpacting service

consumers.

Positioning services as reusable enterprise resources relates to the Logic Centralization design pattern that dictates that each reusable service be the sole access point for the body of logic it represents.

When combined,Logic and Contract

Centralization result in a highly standardized and normalized service

inventory in full support of maximizing reusability

potential and loose consumer coupling.

Chapter 9: Service Reusability(Commercial and Agnostic Design)

Project delivery processes typically needto be changed as a result of theconsistent incorporation of this principle so as to ensure that Logic Centralization is always respected and that reuse potential of agnostic services is maximized.

The greatest obstacle torealizing this principle is usuallyassociated with overcoming culturalresistance to these changes.

Service AService A Service B Service C

Service A Service B Service C Service A Service B Service C

The more control a service has over its underlying runtime implementation, the more predictable its runtime behavior will be. Reducing shared access to service resources and increasing physical isolation can raise a service's ability to function autonomously.

The autonomy of individual services is especially importantto the effectiveness of service compositions. Because a service composing another automatically loses autonomy, the level of autonomy a composition controller can attain is often limited to the collective autonomy levels of its composition members.

Chapter 10: Service Autonomy(Processing Boundaries and Control)

Chapter 11: Service Statelessness (State Management Deferral and Stateless Design)

Chapter 12: Service Discoverability(Interpretability and Communication)

Chapter 13: Service Composability(Composition Member Design and Complex Compositions)

active

passive

stateful

stateless

context

session

contextdata

primarystate

primarystate conditions

types of stateinformation

types ofcontext data

contextrules

active

passive

stateful

stateless

context

session

contextdata

contextrules

business

Formulas

AddBaseGetSimulate

statedatabase

active and stateless

move in-memory state data

to databaseRun

Lab Project

Start

state datain memory

discoveredservice

serviceregistry

servicecontract

The human searches the service registryto locate a servicewith the desiredfunctionality.

The human can then retrieve the corresponding service contract. Based on its level of interpretability, the human can choose or rule out thisservice. If the service does not have the necessary capabilities, but still provides a suitable functional context, it can be identi�ed as the location to which to add the required functionality (as anextension to the service).

2 Based on the registry record’s level of discoverability and interpretability, the human is able to discover and identify a service potentially capable of ful�lling its requirements.

serviceinventory

the humanowner of

a planned service consumer

program

3

1contains meta information about each service in the

service inventory as well as a pointer to each service

contract

The centralization of service contract documents is itself

a contract-related design standard.

Depending on the nature of its logic and its role within a composition, a service may need to transition through different states and may need to manage different typesand amounts of state data.

State data management consumes system resources andcan result in a significant resource burden when multipleinstances of services areconcurrently invoked, especially with agnostic services that are involved in the automation of multiple business processes.

Therefore, the temporarydelegation and deferralof state managementcan increase servicescalability and supporta wider range of reuseand recomposition overtime.

State data is commonly deferred at runtime allowing

a service to remain active and stateless while other

processing occurs.

There are different levels ofstatelessness a service designcan achieve, depending on thefrequency of state deferral and the quantity of state databeing deferred. These levels are usually specific to eachservice capability.

Of the four service meta information types functionaland quality of service data are most relevant when focusing on a service’s communications quality for discoverability andinterpretability purposes.

The application of this principle supports astandardized process ofservice discovery and inerpretation within an organizationthrough the use of a service registry as the central repository of service meta data.

Service

Functional Technology

Quality of

ServiceProgrammatic

service inventory

serviceregistry

exists as an extension of

infrastructure that supports the

discovery and interpretation of services within a

contains services with contractsthat are ideally

discoverable and interpretable

independently from the

Both service contracts and recordswithin a service registry contain metainformation with discoverability and interpretability characteristics.

Much of this informationrelates to and originatesfrom the service profile document that may have been created andmaintained since the service was first conceptualized duringthe service modeling phase (see Chapter 15and Appendix B).

SOA: Principles of Service Design

Copyright © 2008 SOA Systems Inc.ISBN: 0132344823, Prentice Hall(purchase this poster at www.soaposters.com)

by Thomas Erlwww.whatissoa.comwww.soaprinciples.comwww.soapatterns.comwww.soaspecs.comwww.soaglossary.com

www.soabooks.comwww.prenhall.comwww.soasystems.comwww.soaschool.comwww.soamag.com

Prentice HallService-OrientedComputing Seriesfrom Thomas Erl

units of solution logicthat each address (solve)

a small problem

to solve the big problem,the units are assembled

into a speci�c con�guration that allows them to carry

out their solution logic in a coordinated

manner

Big Problem A

SmallProblem small problems

collectivelyrepresent the big problem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

SmallProblem

solves Big Problem A

E F G HA B C D

C

A F

B E D G H

Service-orientation is a design paradigm with a distinctapproach to carrying out a separation of concerns.

Services capableof addressingagnostic or cross-cuttingconcernscan berepurposedto solvemultipleproblems.

This requires an effectivemeans of decomposingsolution logic andrepeatedlyrecomposing itto solve newproblems.

This principle is primarily concernedwith a service’s abilityto act as an effective composition member so that it cansupport the realization of new business requirements thatcan be fulfilled by the assembly of service compositions.

The composabilitypotential of aservice increasesand becomesincreasinglyimportant as more servicesbecome availablewithin a givenservice inventory.

A key aspect of this principle and service compositions in general is that individual concerns are, in fact, solved by service capabilities because it is the capabilities that are

composed within a service composition.

Successful service composition design

relies on the collective composability potential

of each composition member.

service inventory fora speci�c enterprise with

high reuse potential

commercial products for massmarkets and with

high reuse potential

Service-OrientedEnterprise

Step 1Step 2Step 3

...

servicedeliverylifecycle

custom applications for speci�centerprise users and with little-to-no reuse potential

Step 1Step 2Step 3

...

customdevelopment

projectdeliverylifecycle

Step 1Step 2Step 3

...

commercialproductdeliverylifecycle

CommercialProductVendor

TraditionalEnterprise

Within service-orientationreusability representsa core target designcharacteristic thatis tied to the goalof achieving repeated ROI foragnostic services.

This principle combinestechniques from tradi-tional commercialproduct design withtraditional enterpriseproject delivery.

Access controlprocedures cantherefore become a requirement that may need to be addressed on anorganizational level via theintroductionof new ormodifiedprocesses.

designer of potentialservice consumer program

service implementationand design details

optimizedservice contract

service

A key goal of thisprinciple is to enable

a wide range of projectteam members to effectively carry out the discovery process

and not to limit it to those with technical expertise.

Service consumerdesigners may not

be aware of the factthat the contract theirprogram is forming a

dependency on isnegatively coupled.

This can lead to variousforms of “indirect” or

unintentional coupling.

Proliferation of negativecoupling is undesirable

because it leads to afragile and inflexible

service inventoryreminiscent of

past integrationarchitectures.