Friday September 30, 2005 For some odd reason, long lost in the fuzzy recesses of my memory, I agreed to give a talk last week at Oracle OpenWorld on SOA. It's a topic that I'm not an expert on. There are lots of people around who know far more about it than I do. A lot of my unease about giving the talk was that I was very confused about what SOA is, and that ended up being what I spent most of my hour onstage talking about.
There are a lot of corporations, analysts, consultants, experts, "experts" and pundits saying a lot of things about SOA, without a lot of consistancy about the meaning of the term. When you expand the acronym to "Service Oriented Architecture" you get a pretty good, but broad, picture. The Wikipedia definition is one of the better ones out there. In most descriptions, SOA has become a broad cellectiom of techniques that go far beyond just architecting systems as services. The topic feels a lot like that quote from Through the Looking Glass:
'When I use a word,' Humpty Dumpty said in rather a scornful tone,
'it means just what I choose it to mean--neither more nor less.'
'The
question is,' said Alice, 'whether you CAN make words mean so many
different things.'
'The question is,' said Humpty
Dumpty, 'which is to be master... that's all.'
There is a collection articles that insist that SOA is not OOP (or
OOP-ITL [Object Oriented Programming In The Large]). They draw weird
distinctions that mostly demonstrate how little they understand of OOP.
A common misunderstanding is the belief that everything that can be done
to an object must be a method on the object - for example that "play"
must be a method on a "MusicCD" object, tying the service to the object.
In this example, the right way to have done it is to represent the CD
player as an object distinct from the CD itself, which would be played
with a statement like "player.play(cd)". OOP is a modeling tool, how you
choose to model a situation is a matter of taste, the situation at hand,
and engineering judgement.
Then there's the camp that defines SOA as just being the same as OOP. I
rather like this because it meshes well with the phrase "Service
Oriented Architecture", which is the way that I tend to think of most
good OOP designs. Using the previous example, rather than having verbs
like "play" be methods on the CD object it's usually better to try to
restrict methods to things that are intrinsic to the object. One could
argue in this world that perhaps SOA could be thought of as a subset of
OOP, since there are many other architectures that can be modeled within
OOP.
One of the concepts here that is often not made clear in these discussions is the distinction between a server and a service. A server is an implementation artifact: usually a machine. A service is an abstract concept that may be implemented by some number of servers (perhaps zero, perhaps many). The mapping between services and servers should be dynamic, depending on factors like load and quality of service - implemeted in things like the N1 Service Provisioning System.
The last bit of confusion for me is that in most discussions, SOA is
about more than just architecting around services. The "S" in SOA should
expand to "Scale", since so much of what is talked about is how to
archtect these systems for large scales. Statelessness
and idempotence
are techniques that have been around for years (both appear, for
example, in the design of NFS from 20 years ago) are usually considered
key components of SOA architectures.
In the end, there's a big bag of techniques that you may or may not want to use. Whether the collection you need fits someone's definition of SOA shouldn't matter - do what's appropriate. Statelessness and idempotence are tough and only really valuable at high levels of scale. Proper OO structuring is always a good idea.
Posted by Ron Welch on September 30, 2005 at 02:55 PM PDT #
Posted by oskar on October 04, 2005 at 12:44 AM PDT #
I dont tie SOA to OO at all, I think that's a very strange way of looking at this since a SOA could be quite procedural. At this point, I'd like to avoid the procedural/OO debate.
I think ultimately SOA was adopted before business owners knew what it meant. In a lot of cases, the backlash is a bunch people trying to get away from the heavy architectures they've created for reasons they didn't quite understand for a need they didn't really have.
To me, the benefits of SOA in general are wonderful with regard to exposing functionality to some sort of public domain, as well as setting up abstractions for legacy applications, both on and offline.
SOA also has a modern connotation that implies XML, and http. I don't view http as a necessary component, but xml definitely. What better way to communicate data between two systems than an extensible document format in a standardized encoding?
Posted by Ivan on October 05, 2005 at 08:30 AM PDT #
Posted by Gregg Wonderly on October 05, 2005 at 09:50 AM PDT #
Posted by Eirik Maus on October 05, 2005 at 12:49 PM PDT #
SOA is applying interfaces at an architectural level. The goals of SOA are the same to the goals of interfaces. You create an abstraction of a business concept by defining the interface used to implement that business need. All the benifits of an interfaces now exist for the system that implements that interface.
I think its easier to picture SOA when you describe it in terms of a business concept and not an object like a CD. An example I like is the business concept of charging a credit card. It makes sense to encapsulate the functionality for charging credit cards, so you can create an interface to do that: BillingSystem.charge, BillingSystem.refund, etc.
Now, if you only have 1 system then you would not create an entire separate enterprise system to do this, you can implement it using OOP and use it from the one system. If you have many systems in your company, however, that want to charge credit cards, then you create a separate system. You apply SOA to define an "interface" and implement it using your choice of tools (Web Services, EJB, Corba, EDI)
I think the most common misunderstanding of SOA is at what level it is applied. If you are creating a single system, you are not using SOA. You may be creating interfaces and applying similar concepts to SOA, but it is really OOP. Once you get to the system level and you are architecting the various systems that need to interact with eachother, then you are applying SOA principles.
If you boil it down to this you'll notice that SOA doesn't mean much and it does add much that is new. The only thing new are some of the tools that are being used to implement the concept (Web Services) and a renewed interest in better organizing the enterprise as a whole.
Posted by Kris Huggins on October 05, 2005 at 09:08 PM PDT #
Posted by Deepak Alur on October 18, 2005 at 01:24 PM PDT #
I liken OOP to a world and SOA is the architecture of a building in the world. You can have many different kinds of buildings with the same architecture and many different architectures in the same world.
To tie it in-line, you can also have the same architecture(SOA) in different worlds(OOP, procedural etc) So SOA would be like a architecture of an inter-dimentional portal that allows different buildings in any world to communicate.
Posted by Choon Whee on October 18, 2005 at 08:07 PM PDT #
James,
I think you get OO's connection with SOA very well but I'm not sure everyone reading your blog is getting it (or maybe I'm misunderstanding your intent and everyone else is reading your mind!). In my view, the relationship between OO and SOA is that OO provides both the fundamental design principles for SOA (that is, service/state encapsulation and loose-coupling) as well as providing a natural development style to implement SOA. However in relation to your closing comments, I think statelessness and idempotence are design characteristics supporting scalability and fault-tolerance, not service-orientation per se.
I say more about this perspective on SOA over on blogs.sun.com (March '05) and colmsmyth.blogspot.com (just now).
(BTW, I find your blog quite illuminating but the light refraction diagrams in the background are distracting!)
All the best,
Colm.
Posted by Colm Smyth on October 19, 2005 at 12:03 PM PDT #
Based on the wikipedia definitions of OOP and SOA, comparison between OOP and SOA is like comparing an architectural methodology with a programming model.
I think Colm is correct that OOP provides concepts used for SOA and that SOA is not a subset of OOP per se.
Also, the third diagram shows that OOP-ITL is subset of SOA. Maybe that is a correct representation (or maybe I misunderstood the diagram)!
Regards Anil </html>Posted by Anil Jeswani on November 30, 2005 at 03:58 AM PST #
Posted by glen on March 12, 2006 at 09:23 PM PST #
Posted by Eko Suprapto Wibowo on July 28, 2006 at 07:28 PM PDT #
Posted by 天天免费电影 on August 05, 2006 at 12:54 AM PDT #