Tech Brief

SOA Quick Start

Expose your business tasks as services.

Service-oriented architecture (SOA) is an evolution in enterprise architecture, not a revolution. It captures and uses the best practices of the architectures-monolithic, two-tier and N-tier -- that came before it. Yet arriving at a common definition of SOA is not easy.

Applicability of SOA
Enterprise IT departments typically run applications that can be broadly classified into backbones and front-ends. The backbone is comprised of all the back-end systems. This includes the applications developed on J2EE, Microsoft .NET, CICS mainframes and various other technologies that contain the business logic. It also includes the stored procedures, data in the databases and data stored in various other formats. The backbone can be considered the combination of all the business tiers and data tiers of the enterprise.

The front-end layer is the combination of all the presentation tiers in the enterprise architecture. This layer includes all business channels -- those with front-ends (Web- and desktop-based) and those without front-ends (Web services and EJBs exposed to partners and clients).

Let's assume a bank relies on two applications. One is a banking application developed using Microsoft .NET used by all the employees, and the other is a J2EE-based application that deals with end-of-day batch clearance of checks to other banks.

The .NET-based banking application is used both in the cash counter and also in ATMs. As suggested by the N-tier architecture, this system will have a single business tier that caters to both of the front-ends.

The J2EE-based application has a Web interface for the treasury of the bank to validate the checks and clear them. A Web service or EJB-based interface is also provided for use with external banks to handle automated clearance of checks across banks.

In this scenario, the enterprise backbone of the bank consists of the J2EE back-end and the .NET back-end. The front-end business channels consist of the ATM interface and cash-counter interface of the .NET application, and the Web-based interface and the EJB interface of the J2EE application. These are the channels through which business is carried out by the bank.

SOA describes a better way of organizing the enterprise backbone, and provides high flexibility -- faster response to change -- and re-use of the existing IT assets. These two characteristics make SOA attractive to enterprises.

Service Orientation
SOA requires the backbone to be broken up into a set of services. Each service performs a specific business task. Services can be strung together to form a business process.

Consider a transfer amount business process. This process consists of business tasks like checking the account balance for transfer, debiting the source account, crediting the destination account and finally logging the whole transaction. If each of these tasks can be exposed as services, then the whole process can be built by connecting them in a desired order. For a business process such as withdrawal of money from the account, the tasks of checking the account balance and debiting the source account can be reused.

Essentially, SOA separates the process logic from the business logic. The business logic is made available as services. The process logic is constructed by linking these services. The procedure of linking the services to form a business process is also referred to as orchestration. Languages like Business Process Execution Language (BPEL) are used to build the process logic.

Building Services
BPEL can be used to build the process logic, but what about the specific business task, or service? The first step in building a service is to identify the services in the system. This is best done with the help of a business analyst, who can define the reusable business tasks. In the bank example, a business analyst can help in determining whether the task of checking an account balance is a service, or if the whole transfer amount must be a service.

The next step is to implement services in a loosely coupled and autonomous manner. A service can be compared to a static method of Java that takes as input (parameters) all the data required for processing and returns the processed output. SOA mandates that a service can be invoked from any type of client independent of their implementation language or platform. Web services and SOAP technology are one way of exposing a business service.

SOA strives for maximum re-use. The existing business logic can be exposed as services by writing wrappers around it, thus making the business logic available for various systems in the heterogeneous environment. In the bank example, the Microsoft .NET front-end application can use the J2EE back-end, exposed as a service, to provide support for the external check-clearance facility for the bank employees.

Banking on SOA
[click image for larger view]
Banking on SOA: If business tasks can be exposed as services, then the whole process can be built by connecting the services in order.

The separation of process logic from business logic makes the system more flexible. Most of the business changes are related to process logic rather than business logic, and therefore warrant only modification/ creation of the BPEL script.

If any of the business tasks are missing, only the service containing that business logic has to be developed and tested. Therefore, this architecture supports incremental development from the very foundation, reducing the overall risk, cost of change and development itself.

About the Author

Srikanth Seshadri is a Java/Java EE architect for Torry Harris Business Solutions.

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.