A Reference Architecture For Service Oriented Architecture (SOA)
A Reference Architecture For Service Oriented Architecture (SOA)
[Link]
Source: [Link]
© Drexel University Software Engineering Research Group (SERG)
[Link]
6
IBM & SOA….
Source: [Link]
Service Consumer
Concret
e
Applicat Service
Intermedia
Message
ion
Service
ry
Service
Consumed Provided
Service Service
Interface Interface
<ServiceRequestMessage>
<MessageHeader>
<!-- Miscellaneous Header stuff goes here -->
<BusinessEvent>
<!– Enumeration of supported business events goes here -->
</BusinessEvent>
</MessageHeader>
<MessageBody>
<SubjectArea1>...</SubjectArea1>
<SubjectArea2>...</SubjectArea2>
<SubjectAreaN>...</SubjectAreaN>
</MessageBody>
</ServiceRequestMessage>
The application/business event coupled with the provided subject areas dictates what a service
will do on behalf of the consumer, this model fits in naturally to business processes where the
“current view of the truth” might be dependant on the state of the business process.
Service Styles
Basic Services
Integration Services
Composite Services
Any<%@
method in the components
WebService class that is public and decorated
Class="ClassName_Goes_Here" %> with
“[WebMethod]” becomes part of the service interface
Web Data
Service Domain
Server Access
Implementation Objects
Objects Persisted
Structures
Message Business Event
Queue Message Change Publisher
Serialization Stored
The domain layer is bound to the data
Objects Procedures
access layer by action objects that
manage business event transactions
Databases
Message Domain Business Event
Validation Object Action Factory
Builder Mainframe
Transactions
The domain tier Data access
Local represents the Actions objects are Other…
Objects Services should use business domain (Events) aware of how (Messaging)
type-safe objects that and is unaware to persist
serialize/deserialize of how the business domain
to XML in accordance objects are persisted. objects in a
with the service Business logic goes database.
contract here.
© Drexel University Software Engineering Research Group (SERG)
[Link]
23
Outline
SOA
Represents every application or resources
as a service with a standardized interface
Is based on having services exchange
structured information (as opposed to an
RPC call)
Provides facilities via a container to
coordinate and mediate between the
services so that they can be invoked, used
and changed effectively
Intermedia
Message
ion
Service
ry
Service
Service
Interface
Service Quality of
Messaging Service (QoS)
Models Characteristics
Service Types
Applicat
Partn
Code
ers
RPC
ion
Component Service
Simple services potentially acting on
single enterprise resource (e.g.,
Applicat
Legac
TCP/IP
Code database, code, etc) and are created
Applicatio
ion
3rd Party
by aggregating and/or encapsulating
y
one or more application-specific
ns
component interface(s)
Service Resources
Service Consumers
Business Service
Component services composed of
Messaging
Databas
Legac
Reliable
Transport
and rules.
WS-
e
Data Service
Services
Partne
Messag
Broker
Event-Driven Service
rs
Services that react, publish or
e
Files
implement enterprise business events.
Web
App
Services
Business Process Service
Other
HTTPS
HTTP/
external interactions.
Services Integration
ty
Application
Functional Services
Presentati Purchased
on Basic Service Application
Infrastructu
Component
Quality of Service
Service
s
Utility
Service Repository
Transformation
Proxy Service
Coordination
Applicatio Internal
re
Integration
Messaging / Transactions / EAI
ESB Infrastructure
Controller
Clustering/
Balancing
g s
(Simple
Business Process
Core Infrastructure QoS -
Workflow
Load
Composition
Patterns
ral Service
Composition) s
Metadata
SOA
Patterns
Caching
(ACID
Routing
Workflow
Transaction)
Applicatio
Rules
Service
Inter-, Intra-,
and Extranet
n Legacy
Gateways
(Business
Framewor Legacy
Process, Legacy
k Applicatio
Legacy
Business Applicatio
Componen Data Transformation Policy Enforcement XML Processing n
Applicatio
Transaction) n
ts n
Via Data
Service
Messaging / Transactions / EAI
Enterprise
© DrexelApplication
University Software Engineering Research Group (SERG)
Corporate Messaging
Legend: Data Domain
Architecture
[Link] Domain Domain
Infrastructure Interface 43
Messaging Taxonomy
SOA Transport Models for Messages Supported by the Reference Architecture
Each designed Once a service Each service A service may be A service should
service should type is defined, should provide integrated into also specify its
be classified by a service style a well- multiple required and
its service type should be designed applications provided QoS
selected based interface under different attributes such
on the desired encapsulating contexts, as security,
architectural the desired therefore, the transactions,
characteristics service service design performance,
of the service, behavior should also etc.
its required consider the
resources, and messaging
potential models that will
consumers be supported by
the service
Controller
Basic Proxy Service
Service Service [adds externalized
workflow
[is a special type of] capabilities to]
[is a specialization of]
Workflow
Utility Wrapper Service
Service Service
[adds ACID
transaction
support to]
Coordinati
on
Service
Connection The ESB connection interface should fully support the synchronous and asynchronous web service
stacks as well as message-oriented middleware (MQ Series), HTTP/HTTPS, Microsoft .NET
Serviced Components, Java Remote Method Invocation (RMI), .NET Remoting, CICS host
transactions.
Change Rather than changing code in a service interface, the ESB is configured with metadata to handle
managing the service catalog, interface versioning, routing, quality of service (QoS), orchestration,
security, business rules, and other volatile duties.
Control The control interface provides enterprise management capabilities that are outside the scope of the
individual services managed by the ESB. The control interface integrates with standard
infrastructure management facilities, handles service provisioning to maintain QoS commitments,
and provides reports/logs on the health and operation of the ESB infrastructure.
<<component>> <<component>>
UML
Service
Interface
<<component>> <<component>>
A utility service encapsulates generic functionality intended to be reused within and across different SOA applications. In SOA,
most services are conceptual single-instance components that provide capabilities to one or more applications based on a
published service contract (i.e., the service interface). A utility service is a special case of a service in an SOA as it is intended to be
reused across (and not integrated into) multiple applications. Utility services are physically created by aggregating the desired
public interfaces of one or more application components into the utility service interface.
Guidance
Utility services are conceptually similar to library or framework components in traditional application architectures.
Design
<<component>> <<component>>
UML
Service
Interface
<<component>> <<component>>
<<business logic>>
A basic service encapsulates the functionality implemented in one or more business components by specifying a well-defined
Description
service interface that exposes a desired business capability. Each interface point in a basic service should be defined with a
granularity in terms of performing a useful business unit-of-work (BUOW). A basic service must perform a discrete BUOW. Basic
services can be orchestrated with other service styles to perform business processes. Basic services are usually defined top-down
by performing analysis on a business domain, specification of business use cases, or business process walkthroughs.
Basic services are best designed by properly establishing the service interface. Some best practices for creating the service
interface include: (1) Interfaces that are easy to consume are as simple as possible, but no simpler (2) Be able to accomplish a
Guidance
business unit of work in a single call (3) Be used across many different contexts (not just the first app that it was built for) (4)
Design
Models business processes rather than lower level functionality (5) The service interface should be easy to version such that they
can be easily extended with the addition of new parameters and doesn’t break service consumers when a new interface is defined
(6) The service interface should promote the concept of loose coupling by insulating the service consumer from changes in the
service implementation, not requiring anything other than the schema and contract to know how to invoke them, and no leaking
internal abstractions outside the service boundary.
© Drexel University Software Engineering Research Group (SERG)
[Link]
51
Proxy Service
<<Proxy Service>>
Service
Proxy
UML
<<generated>>
Service
Interface
Existing
Application
Component
A proxy service “service-enables” an existing application component by creating a service proxy component that “facades” the
Description
existing component. Proxy services can generally be automatically generated by an IDE, exposing the public interface (or a subset
of the public interface) of the existing application component as a service. A proxy service is often used to integrate with an
application that provides some desired functionality to an SOA application, but this functionality is implemented as a collection of
API’s and not as a service.
One must be careful when creating proxy services, as they are easy to create, but yet are often inefficient from a design perspective
Guidance
when compared to other service types. Problems generally occur with proxy service designs because the underlying component ‘s
Design
public interface is not optimized for an SOA. Designers should generally consider using a wrapper service when the goal is to
integrate with an existing application that offers an API or an integration component.
Service
Adapter
<<proxy>>
UML
{middleware}
Legacy Application
A wrapper service exposes specific parts of legacy applications through a service interface. This service style essentially creates a
Description
new interface component, called an adapter, that adheres to good design principles of a business service. The adaptor component
uses EAI to interact with a legacy application. The legacy application itself might require modification to support this style as the
desired business logic that is exposed by the adapter component may not be accessible via direct EAI mechanisms. This service
style is a good choice for application integration.
Design the adapter component in a wrapper service style using the same principles that were described in the design guidance for a
Guidance
Business Service. Map the service interface in the adapter to functionality and business rules that exist in the legacy application.
Design
When possible interact with the legacy capability via EAI. In some cases the legacy system itself might require modification to
support the adapter service interface (e.g., the business logic is embedded and not externally accessible)
Business Process
Service
Interface
<<service assembly>>
A controller service represents the execution of a high-level business task (or simple business workflow). Services designed using
Description
the controller style create control logic to implement the business task. This control logic is called a service assembly. From an
SOA perspective its important to manage the granularity of the service designs. Services that are too abstract are prone to high
maintenance problems as their interfaces and behaviors are subject to a high degree of change. Aggregate services, such as a
controller service provide additional flexibility to SOA-designs by creating a service that supports a business task, while at the
same time, allowing the underlying services to be used and evolve independently.
Whenever possible deploy the service assembly in the same container as the subordinate services. This enables the service
Guidance
assembly to interact with the other (subordinate) services via a local interface rather than a network interface such as SOAP. Also,
Design
since web service support is still very limited with respect to supporting context and transactions this guidance also allows the
controller to work with the underlying services in a stateful way (i.e., supports ACID transactions).
Business
Transaction Workflow / Business Process
in}
{beg
UML
[service] [service]
Service
Interface
{co
mm [service]
it}
[service]
A coordination service supports executing a workflow to implement a business unit-of-work (BUOW). The BUOW in a coordination
service should be short-running as this service style supports ACID transactions. Unlike a controller service, the workflow in a
coordination service is externalized, defined using a standard markup (i.e., BEPL), and executed by an infrastructure component
that manages the actual workflow process.
Guidance
The transaction-oriented workflow outlined above is the topic of the WS-Transaction specification. With this specification
Design
workflows are defined using the BEPL markup. Given lack of BEPL support in the tools that we are using in class, applications
requiring the characteristics of a coordination service should use a controller service instead an code the business process into the
service assembly.
Business
Process Workflow / Business Process
in} Context
{beg Service
UML
[service] [service]
Service Coordination
Interface Service
{com [service]
mit}
Compensation
[service] Service
A workflow service implements a business process. The workflow service does not support ACID transactions because the
business process might be long-running (i.e., several days, require human intervention, etc.). Unlike a controller service, the
workflow in a coordination service is externalized, defined using a standard markup (i.e., BEPL), and executed by an infrastructure
component that manages the actual workflow process. Due to the nature of the workflow service style ACID types of transactions
are not supported, instead, a compensation service is provided in this model to gracefully recover from unexpected problems.
The workflow outlined above is the topic of the WS-Transaction and WS-Coordination specifications. With these specifications,
Guidance
Design
workflows are defined using the BEPL markup. Given lack of BEPL support in the tools that we are using in class, applications
requiring the characteristics of a workflow service should use a controller service instead an code the business process into the
service assembly.