Part 1 - Introduction to SOA, ROA, and REST
This is a first in a series of posts by Gary Mazo, Senior Software Engineer with IBM Rational Developer for System z (RDz), that introduces web services and RESTful services in general and how they are supported in Customer Information Control System (CICS). He compares and contrasts the features and ways of developing and operating these services.
This initial post is an introduction to what Web services are in general and what the service concepts have come to mean in relation to the popular "RESTful" services.
Service oriented architecture
Until recently, there has been a tradition in service oriented architecture (SOA) to associate all service-like A2A (any-to-any) interaction with big web services. "Big" here applies to protocols of service interaction that are ostensibly mature, largely standardized, and established in many areas of the IT industry. Because of the tighter coupling between the consumer and the provider of service, and because of the reliance on strict protocols, these services are sometimes called "high-ceremony" services.
In SOA, everything is a service and it is worth reminding ourselves what that is. The following graphic very succinctly describes the concept of a service, service orientation, SOA and composite application:
At the heart of SOA are Web services. The three major characteristics of a service in SOA are:
- Reusable and repeatable - most services are used more than once
- Standards-based - there are three fundamental standards that form basis for web services:
- XML (eXtensible Markup Language)
- SOAP (Simple Object Access Protocol)
- WSDL (Web Services Description Language)
- Stateless - invocation of the service does not know anything about any previous invocations
Familiarity with the XML concepts is helpful for the rest of this discussion. In later parts of this series I will go into a bit more details about XML and its use in CICS services.
Besides the technologies that are the basis for big web services and SOA, the most notable additional standards are the WS-* set of protocols and standard submissions. WS in WS-* of course stands for "Web Services". An example of a WS-* standard submission is WS-Addressing, which was submitted in 2004 to w3.org. One protocol that stands apart from the rest of WS-* is WS-I, or "Web Services Interoperability", which is now part of the OASIS organization (oasis-open.org). There are other WS-* protocols out there and some are more popular or more accepted than others.
REST and Resource Oriented services
Enter "REST" - Representation State Transfer. REST (or RESTful) architecture is a set of concepts that put "resource" in the center of the interconnected IT world. While SOA and "Big" web services revolve around "high ceremony" rich interaction protocols, RESTful approach views everything as a resources with a very few standard actions or functions that can be performed. There are only four operations that can be performed on a resource in a pure RESTful architecture. These operations are to Create, Read, Update, or Delete a resource. This is the old concept of a database record life cycle - a.k.a C.R.U.D. The only difference is that RESTful services call these operations using the HTTP vocabulary verbs: POST, GET, PUT, DELETE. These operations essentially comprise the entire set of "services" in a RESTful architectures. In other words, RESTful architecture is resource oriented. We can even call it "ROA" by analogy with SOA.
The following graphic shows the concepts of ROA:
The major components of a RESTful service involve HTTP, XML, and XML-based protocols like Atom protocols. The protocols and formats of data exchange, unlike big web services, are not widely standardized so the RESTful services are "low ceremony" and have a relatively looser coupling than big web services. In practice, however, RESTful service implementers (like Google's Data API Protocol) tend to standardize on XML-based protocols, and more specifically, Atom.
CICS, SOA and ROA
CICS supports SOA by providing a very rich stack of the Web services tools and run-time support via web services pipeline architecture and resources such as WEBSERVICE. The ROA support in CICS is through XML-processing resources such as XMLTRANSFORM and through the ATOMSERVICE resources that support the Atom protocol.
In the future posts I will look into details of creating and using these CICS resources in an end-to-end composite Web application. Stay tuned!
- RESTful Web Services vs. "Big" Web Services: Making the Right Architectural Decision
- Google Atom services
- CICS Atom support
About the Author
Gary Mazo is a Senior Software Engineer with IBM Rational Developer for System z (RDz). He joined IBM in 1987, and spent 10 years developing compilers and compiler tools. Lately, Gary has been actively involved in creating service-oriented architecture (SOA) tools for RDz. He holds 6 software patents and enjoys tinkering with all things related to software and hardware.