YOUR FEEDBACK
Bill Miller wrote: Good article. Data Services is a great place to get value from SOA, and a great...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


Service-Oriented Architecture: Beyond Web Services
Service-Oriented Architecture: Beyond Web Services

Chances are you've heard the term service-oriented architecture (SOA). It describes a software architecture in which reusable services are deployed onto application servers and then consumed by clients in different applications or business processes. If you've tried to find information on SOAs, the chances are also good that you found a description that includes Web services, often exclusively. This might have led you to the conclusion that if you aren't using Web services, you have no need for SOAs. This couldn't be further from the truth.

The problem starts with the definition. SOAs are designed to decouple the implementation of a software service from the interface that calls that service. This allows clients of a service to rely on a consistent interface regardless of the implementation technology of the service. Instead of building big, monolithic applications, developers can build more agile services that can be deployed and reused across an organization for different applications and processes. This allows for better reuse of software functionality, as well as for increased flexibility because developers can evolve the implementation of a service without necessarily affecting the clients of that service.

To this end, the main requirement of an SOA is that the interface to the services is decoupled from the implementation. When you hear this description it might remind you of another technology that is discussed a lot: Web services. Web services allows access to a diverse set of functionality through a standard protocol-and-interface definition. Web services and service-oriented sound like the same thing, but they're not.

SOAs and Web Services
Today's examples of SOAs are mainly in the business process area. These applications are focused on building business process flows where several services are used in conjunction to accomplish a larger task. These processes also require data transformation as different types of data are taken from one service and sent to another service in the flow. In this example, Web services are often used as the services in the process. Web services provide a good mechanism to communicate with a diverse set of technologies that would be much harder to integrate without them; however, a problem arises when a developer needs to add a non–Web service service to a business process that also contains Web services. To handle this case, either the client has to code to multiple interfaces, or the developer needs to add an abstraction layer that shelters the client from the differences in the service interfaces and implementations. This abstraction layer is known as a service-oriented interface (SOI). In the case where all of the services in the process are Web services, the Web service interface is the service-oriented interface.

Web services are one example of an SOI. The problem with using Web services exclusively in a service-oriented architecture is that developers have to wrap any functionality they want to expose as a Web service. This makes sense in cases where the service is built using a foreign technology or is supplied by a different vendor, but ideally you would try to avoid the overhead of packing and unpacking data into XML for services running on the same infrastructure. However, because Web services are one of the few standardized examples of an SOI, they are often assumed to be the only choice when building an SOA.

Beyond Web Services
A non–Web service example of an SOI can be found in the Java Specification Request (JSR) 227. JSR 227 is a standard data-binding and data-access facility for J2EE. The goal of JSR 227 is to abstract the implementation of a data source from a client looking to take that data and bind it to a user interface. Whether you're displaying data from a database, Enterprise JavaBean (EJB), legacy system, Web service, or plain old Java object, the interfaces and data are the same.

This is shown in the "Model Layer" in Figure 1. By providing a consistent interface to any business service, the model layer is implementing an SOI. The functionality provided in any SOI really comes down to the required information. For example, the model layer in Figure 1 doesn't necessarily have to provide full access to all features and functionality of the business service that it represents. Instead it just needs to provide enough functionality for clients to successfully bind that data into user interfaces and then manipulate it.

Inside an SOA
Taking a closer look at how this is done leads us to the DataControl. The job of the DataControl in the model layer is to abstract the implementation of the business service from the client, as well as to act as a mediator between the client and that business service. The DataControl API describes certain functionality of the business service that the developer wants to expose. For all of this to work, the DataControl needs to expose this information in an implementation-neutral manner. Regardless of the implementation of the business service, the description is the same.

It's worth highlighting why a DataControl was chosen over a Web service as the interface for the data- binding SOI. Using an SOI that is focused on a specific job dramatically increases its viability, performance, and acceptance. For example, while Web services typically run on the server, the DataControl runs on the client because that's where the data will be displayed and changed. The DataControl can also represent multiple kinds of services and does not need to package the data as XML in order to send it to the client, as it's already running on the client. Also, while a Web service is designed for calling operations on services, the DataControl can also access attributes, which is a very common way to display data in a user interface. Trying either to change the data-binding architecture or bend Web services in order for them to meet the requirements of the data-binding SOI would have been the wrong decision. Using an SOI that's designed for a specific task allows developers to get the advantages of an SOA without having to sacrifice the design, performance, or ease-of-use to get there.

Let's get back to the DataControl. The DataControl is able to abstract the implementation of the business service by breaking things down into a common form. In this case, that common form is a set of attributes and operations. Any business service has zero or more attributes and operations. Attributes are simple setXX and getXX methods that conform to the standard JavaBean pattern. An operation can be any other method on the business service and can take parameters and return values. The DataControl also describes the data that is returned from an attribute or operation. This description is represented as generic objects with typed attributes. Attributes can be primitives or other objects. This allows for complex data models to be described regardless of where the data comes from.

How It Works
The DataControl processes requests from the client and maps them into the implementation-specific data that it retrieves from the business service. By getting the description of the attributes, operations, and data in a common metadata format, the client no longer cares about the implementation details. The DataControl becomes the contract between the business service and the user interface (client), and the developer has the freedom to change and modify the business service as necessary without having to break the contract.

Figure 2 shows an example of this SOA using an EJB business service. The DataControl sits on the client and communicates with the application server as any EJB client does. When the UI client calls an operation on the DataControl, the DataControl in turn calls the Java Naming and Directory Interface (JNDI) to access the EJB, makes the method call on that EJB, and gets back data transfer objects. The DataControl then passes back a collection of maps describing these objects to the UI client. The UI client can then make get() calls on any of the maps to access the different attributes of the data objects. The get() method of the map delegates to the DataControl, which in turn responds with the actual data from the EJBs. The same is true when the UI client updates the data using the set() method of the map.

Since the DataControl is running on the client, there's no need to repackage the data into XML or JavaBeans. It's all handled in the delegated get() and set() methods of the map right on the client.

What's in It for Me?
The DataControl is completely in charge of how the data is cached, loaded, and managed. That functionality is sheltered from the client because of the SOI. This allows developers to optimize and tweak the implementation of their business service or extend the functionality of the DataControl without affecting the client. For example, we could modify the application described by Figure 2 and add client-side caching. In this case, we would extend the DataControl to cache the data on the client, saving trips to the server for each call. The server would then notify the DataControl when the data is invalidated, causing it to make subsequent calls to the server to refresh its cache. All of this can be done without any affect on, or knowledge of, the clients (other than that they will all start running faster!).

In addition to this improved flexibility in your applications, SOAs are also designed to promote better reuse. Once you've started to provide a set of services for your business, creating new applications or business processes becomes much easier. Simply build on what you have while adding any additional services as you go. This allows organizations to move away from making big version changes to an entire application and instead promote a series of continuous, small changes to the different services, processes, and clients in their environments. This adds a significantly higher level of maintainability to any application.

Finally, let's not forget performance, scalability, and manageability. Companies like Oracle, IBM, and Intel are moving toward grid computing solutions. "The Grid," as it is known at Oracle, is a runtime architecture that's designed to intelligently manage all tiers of all your distributed applications from one unified location. The grid ensures that the right applications get the right resources and computing power at the right time. And while any J2EE application can run on the grid, companies can really increase the benefits they get from the grid by having a supply of reusable business services that are deployed and managed using a variety of different grid policies. As you might have guessed, this is a perfect job for an SOA.

Take another look at service-oriented architectures and decide which are the best service-oriented interfaces for your requirements. By implementing an SOA, companies can gain many benefits over traditional application architectures, regardless of whether or not they have committed to Web services technologies. Developers can start utilizing SOAs today and get increased flexibility and better control over their applications, while at the same time aligning themselves with technologies such as Web services and grid computing to gain added advantages in the future.

About Ted Farrell
Ted Farrell is Architect and Director of Strategy for Application Development Tools at Oracle Corporation. Mr. Farrell is responsible for the technical and strategic direction of Oracle's development tools products, including Oracle9i JDeveloper, Oracle's Jave and XML Integrated Development Environment (IDE) for J2EE application and Web services development. This responsibility includes aligning various development technologies with a vision that allows Oracle to become a leader in J2EE development. Prior to Joining Oracle, Mr. Farrell was Chief Technology Officer at WebGain, an application development tools solutions provider. While at WebGain, Mr. Farrell was responsible for the technical vision and acquisition strategy that included the purchase and incorporation of multiple software companies' products and technologies into a single environment. Mr. Farrell also conceived and designed WebGain's patent-pending BusinessDesigner, a product designed to capture and track business requirements for applications.

YOUR FEEDBACK
Brent Anderson wrote: Naturally an article like this is exposed to leaving out the end of the spectrum that each one of us is particularly interested in seeing elaborated upon, but I was surprised to see that he touched on "Business Processes" so much w/o representing an architectural component resonsible for orchestrating business processes which can often stretch across multiple Business Service calls... typically over the course of being driven by various user actions in the front end... but should also be just as usable from a business process driven in a headless batch oriented manner as well.
Arun Candadai wrote: This is a nice article that clearly explains the need for a service abstraction layer for building robust applications in a SOA-enabled environment. Clearly, as the author points out, SOA is a generic concept that goes well beyond Web Services and extends to include EJBs, other XML-based communications, JMS, Database Access, Java Bean Objects, and so on. Essentially, the best practice to accessing the service boils down to defining a unified service interface that is instantiated and executed by the client in the same fashion regardless of the underlying source of the business service. As you design your service interfaces, it becomes important to pay attention to the level of abstraction, especially for business services. It is preferred to always use a coarse-grained service interface definitions with service operations that map to important business functionality. For data service...
bioye wrote: this is a good article about SOA and it is laudable. It serves as a good introduction to the specifics of SOA from a Java perspective. But with no mention of Jini, maybe it is still an incomplete article. However, the articulation of web services'' place is really good. is jsr 227 completed?
Tom wrote: Hm. I see no reason why a SOI can't be implemented with POJO's instead of maps. Any service also provides a jar with POJO''s for a client to use in order to access the service. This allows for a more "natural" way of Java coding and one doesn''t have to typecast, etc.
William Swaney wrote: Hmmmm... an article (albeit short) on SOA and Java and no mention of Jini? You do a disservice to your readers. Bill
LATEST JAVA STORIES & POSTS
In the past couple of years, interest in Jetty has surged. Jetty is an open source Java-based web and application server and servlet container, but what else do you know about it? To commemorate the 12th anniversary of Jetty, here are 12 things that might surprise you
JavaScript is one of the most interesting and misunderstood programming languages in common use today. Most developers will go their entire careers without realizing its full potential. It's not often that you get a language that supports the feature set that JavaScript does, whi...
JavaScript 2 is becoming increasingly important. Learn how to take advantage of JavaScript 2 while still running in today's browsers. Leverage your current JavaScript and HTML skills to build applications that run in Flash 7-9, DHTML and more with no code changes! OpenLaszlo 4.2 ...
JavaScript is a language with more than its share of bad parts. It went from non-existence to global adoption in an alarmingly short period of time. It never had an interval in the lab when it could be tried out and polished. JavaScript has some extraordinarily good parts. In Jav...
The one thing that unifies the distributed computing style known as SOA, in most of its manifestations, is self-describing data via the Extensible Markup Language (XML). The benefits of XML over opaque message formats in data interchange are well established. No matter if your fo...
Cloud computing is an opportunity for businesses to implement low-cost, low-power and high-efficiency systems to deliver scalable infrastructure. But moving to a cloud infrastructure is not necessarily as nice and clean as the providers would want you to think. With cloud infrast...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

SPONSORED BY INFRAGISTICS
In every field of design one of the first things students do is learn from the work of others. They ...
There are many forces that influence technological evolution. After a decade of building enterprise ...
2008 is going to be an important year for Rich Internet Applications. Most organizations are deliver...
The OpenAjax Alliance is developing an Ajax industry wishlist for future browsers, using a dedicated...
Infragistics announced the availability of two Community Technology Preview (CTP) User Interface (UI...
The YUI development team has released version 2.5.2; you can download the new release from SourceFor...
ADS BY GOOGLE