More Insightful SOA Design Patterns

Share the article!

The website has a wealth of SOA Design Patterns that is worthy of detailed study and exploration. Although I personally think the book SOA Design Pattern by Thomas Erl is 2/3rds filled with vacuous patterns, the website which was created while the book was being written has a wealth of valuable contributions. In fact, if you ever read the book, you would immediately notice that the insightful contributions come from the contributors and not the original author. This is a bit unfortunate since historical Design Patterns books have been mostly about written in collaboration. The 5 volume series “Pattern-Oriented Software Architecture” that was first compiled from 1996 to 2007 is one of my favorites. My big beef with the Erl book is that most of the credit goes to Erl, while he has provided the most mediocre of contributions.

However I digress. The topic of this entry is about the other Design Patterns that unfortunately didn’t make it into the book. My objective is to give a brief summary of some of the more interesting ones. So with little fan fare, here’s my list of interesting SOA design patterns from the candidate list:

  1. Alternative Format – This pattern is quite prevalent today. Typically JSON and XML are formats that are supported. In Web 2.0 based systems JSON is extremely important in allowing pure javascript clients to consume services.
  2. Code on Demand – This pattern is simple the embedding of code in a response that a client can subsequently execute. It’s most prevalent today as Javascript in web browsers. Applets and Flash are another example. This very capability is what enables AJAX and therefore a lot of Web 2.0 functionality. There is however, another pattern that is a bit more unique and interesting which I would call DSL on Demand. The difference being that the execution is performed with the server and not on the client.
  3. Consumer-processed Composition (Balasubramanian, Carlyle, Pautasso) – I would call this pattern “Integration at the Glass”. In general by deferring execution logic to when it is bound to a consumer then one can achieve the more flexibility.
  4. Enterprise Domain Repository (Lind) – I would prefer the name “Multi-source domain objects”. This is a common problem with legacy systems and the handling of which should be any SOA toolbox.
  5. Entity Endpoint (Balasubramanian, Carlyle, Pautasso ) – This pattern comes naturally in a ReSTful architecture. However even for WS-I or CORBA based systems, there needs to be a mechanism to exchange URLs or pointers so that one can resolve entities. I would call this pattern “Durable Reference”. It is indeed surprising that many SOA based initiatives treat this capability as an afterthought.
  6. Entity Linking (Balasubramanian, Webber, Erl, Booth) – This pattern again comes for ReSTful architecture. State exists in the clients and state transitions are achieved by the URL linking. This I would call “Trampoline Control Flow”.
  7. Endpoint Redirection (Balasubramanian, Carlyle, Pautasso)
    - Another ReSTful pattern. This in general is about redirecting an invocation to another service. This mechanism is quite useful in managing the evolution of a system. For example, a service may redirect a request to the an upgraded service.
  8. Forwards Compatibility (Orchard)
    – An interesting pattern that is useful for Service evolution in that it maintains backward compatibility and supports extensions in the communications between services.
  9. Idempotent Capability (Wilhelmsen, Pautasso) – The simple identification of the idempotency of services is a critical feature in building optimal distributed systems.
  10. Legacy Router (O’Brien) – There is a generalization of this pattern in that every dynamic system must begin from a well know landmark. This pattern exists in many dynamic discovery based P2P networks.
  11. Message-Based State Deferral (Balasubramanian, Carlyle, Pautasso) – This again is a consequence of a ReSTful based approach. The idea however is relevant for distributed systems in that there are benefits in maintaining state in the client or in the message that is exchanged between services.
  12. Service Virtualization (Roy) – There seems to be a common theme among many patterns in that greater flexibility is achieved if the reference to a service is a virtual one that who’s behavior can change dynamically.
  13. Validation by Projection (Orchard) – Seems to be a subset of Partial Validation, I’m unsure as to what the difference is, however I will give the pattern the benefit of the doubt since afterall both patterns are written by the same authors.

Many of these patterns are clearly inspired by ReST architecture ( a book is in the works to address this). Also, I’ve purposely ignored those patterns that involve optimizing the resource allocation in a distributed systems with the exception of the Idempotent Capability pattern. For SOA, the emphasis is in pursuing flexible architectures in favor of optimal ones. So its best that focus be kept, lest we be distracted and prematurely optimize our architectures.

My hidden agenda in why I am exhaustively covering the SOA Design Patterns is that I have a Pattern Language of my own in the works. Over time I will discuss this in more details.

Share the article!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>