Wednesday, 5 September 2007
Comparing ROA and SOA
« Architectural Paradigms 2007 | Main | ROA and SOA and Service Contracts »
As part of my ongoing look at enterprise architecture in 2007, I want to focus on the commonalities and distinguishing features between Resource Orientation and Service Orientation, comparing ROA and SOA. I'm witholding judgement as best I can, to try to be as objective as I can about what these two approaches to web services are. Accordingly, I'm not looking at practicalities. Those clearly matter, but they are separate and distinct from the purely technical differences. Practicalities change over time, but the technical pieces probably don't. I'm considering SOA implemented as SOAP web services, in angry defiance of people who say SOAP is just one implementation mechanism of SOA. While that's reasonable language, it has little value to me in the real world to continually say "SOAP based SOA" instead of just "SOA". There's no other widely adopted implementation of SOA with market and mindshare significance. ROA, on the other hand, is a new term for a particular perspective on REST. The flag bearer for ROA is the book RESTful Web Services by Richardson and Ruby and I follow their interpretation of ROA as faithfully as I can.
The principles of SOA are pretty well known:
- Open Standards - HTTP, XML, XML Schema, SOAP, WSDL, various WS-*
- Loose Coupling - Service consumers do not couple to implementation platform, but instead rely on open standards or metadata.
- Reusability - Services are intended to be highly reused. The goal is a single authoritative service, meeting the needs of all consumers.
- Contractual - Services adhere to an interface agreement artifact (a service description) that is functionally definitive of the interface.
- Discoverability - The service contract is an outwardly descriptive and externalizable metadata artifact suitable for forwarding by 3rd parties to potential service consumers
- Autonomy - Services have control over the implementation of logic and technical machinery they encapsulate.
- Statelessness - Services generally do not maintain conversational state, Every call is self contained.
- Rich Behavior - The service contract exposes many kinds of method invocations and associates them logically with the data structures described in the service description.
- Metadata - Both requests and responses have a clear delination between metadata and payload.
- Open Standards - HTTP, often XML, possibly XML Schema or DTD
- Loose Coupling - Service consumers do not couple to implementation platform, but instead rely on open standards.
- Universal Addressability - Resources have a URI which serves as a single global name that defines their identity.
- Uniform Interface - All resources support a small and standard set of behavior methods (GET, POST, PUT, DELETE). Often only GET and POST are used.
- Behavior Conventions - GET never has side-effects, and anything without side-effects should use GET. PUT and DELETE should be idempotent (repeating them has no additional affect).
- Statelessness - Services generally do not maintain conversational state, Every call is self contained.
- Representations - A resources can have tangible representations as bits in various MIME types, but the resource is different than the representations. Representations of a resource may vary with time, and the set of available representations can also grow and shrink over time.
- Connectedness - A resource can (and should) reference other resources by name (URI) in the representation.
- Autonomy - Resource providers have control over the implementation of logic and technical machinery they encapsulate, subject only to the uniform interface behavior conventions.
- Minimal Overloading - parameters to state changing operations should not be used solely to select different behaviors. Heuristically, if an operation parameter could be converted to part of the URI, then it should be.
- Contractual vs Not - SOA offers contractually, discoverable interfaces, while and ROA expects designers to solve problems as they set fit.
- Rich vs Uniform Behavior - ROA has the uniform interface applied with minimally overloading, while SOA provides rich, discoverable behavior
- Differentiation vs Equivalence of Data and Metadata - SOA relies on metadata to inform behavior, while ROA uses universal addressability, connectedness and design time conventions for representations and URI's to blur data and metadata together.
Technorati Tags: roa soa web-services REST SOAP
Posted by at 7:26 PM in the internet, web, web 2.0 and beyond

Comparing ROA and SOA
and SOA and Service Contracts « Comparing ROA and SOA | Main