There was a time when Service Oriented Architecture was a buzzword. That time is now long gone, and SOA has become one of the essentials of enterprise software architecture. Due to the adaptation of SOA by many leading enterprises (such as Facebook, Amazon) and software systems, there is a trend of everyone wanting to be ‘service oriented’. Engineers talk about building web services, JSON services, RESTful APIs, but a significant number of them have been mislead by various misnomers (no pun intended) regarding SOA.
SOA is based on a concept which is inline with the basics of object orientation, and component based software engineering. What it advocates is to build services that focuses on a specific functionality (thus coherent), and to have a well defined API, backed by an encapsulated implementation. There’s more to it (and above sentence does no justice to SOA, I agree), but that’s the basic idea behind SOA. This might be one reason why Gregor Hohpe calls it ‘Same Old Architecture’ . However, this simplicity is often mistaken, and solutions which are not at all SOA are labelled as SOA today.
One of the nicest descriptions of SOA is the one circulated by Jeff Bezos, CEO of Amazon within his organization. Steve Yegge, who was an ex-amazonian and currently works for Google, wrote and amazing article about how well Amazon developed their platform in a SOA way, and how Google should improve on the platforming and SOA front. Yes, you heard that right. Even Google, the tech-giant is yet to learn the right use of SOA. Steve’s post was supposed to be published in an internal blog of Google, but he mistakenly published it in his public blog (which was withdrawn later). If you are interested, you can still read it at http://news.ycombinator.com/item?id=3101876 (which is a very insightful article).
Coming back to the topic, Jeff Bezos circulated the following at Amazon around 2002, when he decided that Amazon should build a platform. He never said it’s SOA, and he didn’t care about technology. Yet it worked, and transformed Amazon to the massive services platform it is today. Bezos said,
- All teams will henceforth expose their data and functionality through service interfaces.
- Teams must communicate with each other through these interfaces.
- There will be no other form of interprocess communication allowed: no direct linking, no direct reads of another team’s data store, no shared-memory model, no back-doors whatsoever. The only communication allowed is via service interface calls over the network.
- It doesn’t matter what technology they use. HTTP, Corba, Pub-Sub, custom protocols — doesn’t matter. Bezos doesn’t care.
- All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world. No exceptions.
- Anyone who doesn’t do this will be fired.
Above six points (or the first five) lays down the foundation for building a service oriented architecture. All communication happens through well-defined service interfaces, no exceptions. Each service is self-contained. Services are re-usable and externalizable. Another key point that should be highlighted is that ‘technology is not important’ for SOA. SOA is an architecture which can be applied for any technology.