SOA Programming Models
SOA Programming Models
The majority of them provide only SOAP over HTTP support a , which is not always an
optimal transport for SOA implementation.
The majority of them provide only synchronous and one-way service invocation b ,
which are only a subset of the service interaction styles.
These APIs are directly exposed to the implementation code which leads to the
following:
o Any API changes (which usually happen at least once a year) require changes
in the business implementation.
These APIs do not directly support many important service runtime patterns. For
example, implementation of dynamic routing requires custom programming and
usage of additional APIs (JAX-R in Java) for accessing registry.
In attempt to fix some of the issues of the current APIs sets there are currently
attempts underway to raise the level of abstraction through defining SOA
programming model (with many elements borrowed from other technologies), which
aim to reduce the complexity to which application developers are exposed to when
they deal directly with middleware or web services specific APIs. By removing the
majority of communications support from the business code and hiding it behind
programming model abstraction/implementation this approach facilitates 1:
Simplified development of business services
Improved testability
One of the first attempts to create such type of model was Web Services Invocation
Framework (WSIF) 2 3 originally introduced by IBM and currently part of Apache
foundation.
WSIF attempted to align service usage model with the WSDL-based service
definition-WSIF APIs directly support WSDL semantics. This enabled WSIF to provide
a universal invocation model for different implementations of services over different
transports. Although WSIF never gained wide adoption by itself, it is used by many
BPEL engines, for example WPC from IBM and BPEL Manager from Oracle, as an API
for service invocations.
The three models currently gaining most popularity for SOA implementations are:
Windows Communication Foundation (Indigo) programming Model from Microsoft,
which attempts to simplify service programming by creating a unified OO model for
all service artifacts.
Java Business Integration (JBI) model from Java Community Process, which address
complexities and variabilities of services programming through creation of services
abstraction layer in a form of a specialized (service) container.
Service Components Architecture (SCA) from IBM, BEA, IONA, Oracle, SAP, Siebel,
Sybase, etc., is based on the premise that a "well-constructed component based
architecture with well-defined interfaces and clear-cut component responsibilities can
quite justifiable be considered as an SOA" 4.
Indigo is the latest implementation of the programming model for service oriented
architecture from Microsoft, supporting a rich set of technologies for "creating,
consuming, processing and transmitting messages". Indigo is planed to be released
with the next version of Windows-Vista.
A service is defined in Indigo as a program exposing a collection of endpoints, with
each endpoint defined as a combination of three major elements 5:
The Endpoint's address-a network address through which the endpoint can be
accesses.
Implementation class Class Annotate class with [ServiceBehavior] and derive it from service
contract interface.
Data contract Class Annotate class with [DataContract] and its members
with [DataMember]
Protocol channels handle support for specific QoS characteristics, for example,
security channel encrypts message and adds security header. Indigo uses WS-
*c specifications for implementation of protocol channels. Adherence to the standards
makes Indigo's implementation interoperable with other systems, based on WS-*
complaint implementation d.
The Indigo connector has a build in support for intermediaries including firewalls,
proxies, and application-level gateways. These intermediaries are the foundation for
implementation of many of the patterns required for successful SOA implementation,
including message validation, security enforcement, transport switching, monitoring
and management, load balancing and context-based routing.
In the JBI-based implementation services do not interact with each other directly.
Instead, similar to the message broker architecture widely adopted in EAI
implementations, JBI container acts as universal intermediary routing messages
between services (Figure 1).
Mediations, in this case, can support a wide variety of functionality, ranging from
message transformation and security enforcement to content-based routing and
service versioning.
JBI container hosts two distinct types of plug-in components 9:
Service Engine (SE). SEs are essentially standard containers for hosting service
providers and service consumers that are internal to the JBI environment f. Example of
SEs often present in JBI environment are data transformers, business rules containers
and BPEL engines.
Binding Component (BC). BCs provide connectivity to services consumers and
providers external to a JBI environment. BCs allow to integrate
components/applications that do not provide Java APIs and use remote access
technologies to access them.
Interactions between plug-in components employ standardized service definitions
based on WSDL 2.0. WSDL 2.0 definitions provide shared understanding, between
services consumers and providers and serves as a foundation of interoperability in JBI
implementations.
In addition to standardized service definitions JBI uses the notion of "normalized"
messages supporting global components interoperability. Message normalization
allows for mapping protocol and business specific context into a generic,
transportable fashion and is similar in concept to introduction "canonical" message
representation often used by EAI implementations g.
Each JBI container exists within a single JVM and houses all BCs and SEs, belonging
to this container along with a set of services, providing operational support for SEs,
and BCs implementation.
JBI also defines a standard set of JMX-based controls allowing external administrative
tools to perform a variety of system administrative tasks, as well as administer the
components themselves. This administration support provides standard mechanisms
for 9:
Installing plug-in components.
Composition metamodel
Type metamodel
Properties that may be set on the component to tailor or customize its behavior. Each
property is defined as a property element. Component can contain zero or more
property elements.
Composition metamodel
This metamodel (Figure 3) defines component instances and how they are
connected 11.
Figure 3 Component instances and their connections in the composition
metamodel
A notion of instance in this metamodel is different from the notion of instance used
in OO. A component instance here is a component implementation with complete
resolved set of properties, modifying component behavior for solving of a particular
problem.
Wiring in SCA abstracts out most of the infrastructure level code (similar to channels
in Indigo). For example, wires can be defined to be synchronous or asynchronous,
support transactional behavior of components invocation, etc. SCA handles this
infrastructure details under the covers. A wire can also connect between different
interface languages (e.g. Java interfaces and WSDL portTypes/interfaces) in either
direction, as long as the operations defined by the two interface types are equivalent.