Saturday, July 16, 2011

Simplicity is Power and Beauty

Simplicity is an ultimate raison d'ĂȘtre of my life, from designing & constructing a system to conducting my daily activities. I believe that simplicity will eventually overcome complexity, and take lead in every aspect of our life, no matter it is in the field of science, technology, design, architecture, and music.

I don’t have much knowledge about design, architecture, or music; however, from science and technology, I can find numerous example of how simplicity equals to power and beauty.

Starting from college, I was attracted towards math. During years of undergraduate, graduate and Ph D, I became stronger at math than averages. The reason of math being so attractive to me is that it’s simple and elegant nature. It appears to me that physical complexities in our world can be expressed by simple mathematical expressions. The very basic illustration can be given using a word problem taught in middle schools. A typical word problem is, for example, consist of around 30 words. But it can be represented just by one equation with one (or two) variable plus a few other constants. Simple enough comparing to 30 words, isn’t it?  In addition, the mathematical expressions and algorithms are so powerful that leveraging them will provide you enormous competitive advantage. Examples can be found practically everywhere, such as indexing, web page ranking, and search engines.

Another example is XML. XML is so simple compared to other data formats. It is text based, and can contain practically anything you want without imposing additional conditions except the schema (xsd) that defines rules and formats. In fact, http protocol is an innovation of simplicity compared to previous binary based and machine-compiled applications. Following the http protocol, the emergence of SOAP and web service standards further simplify greatly the communication and interaction among disparate and heterogeneous systems. Based on the http protocol, the current REST concept is another example of simplicity. It matches to only 4 verbs of HTTP (get, put, post and delete), and it is stateless.

I can go much further to add more examples proving that simplicity overshadows the complexity, and the benefits of simplicity brought to our society in large. I strongly believe that simplicity is a way to go as my life principal.

Finally, let me ask you a question: in an ideal world or in the future, if every system can communicate via web service protocol, does it mean that usefulness of ESB (enterprise service bus) will be reduced? We have already seen that in the business world, the middleman’s role has been reduce quite a lot with the advances of technologies such as internet. By analogy,  ESB is a middleman, will ESB be out of picture in the next heat of technology. Who knows!

Sunday, July 3, 2011

Service Oriented Architecture (SOA) - Thought #4 : Orchestration and Choreography

For quite long time, I have heard of people talking about service orchestration and service choreography. Once, during a job interview, I was asked to explain the difference between the two. It seems to me there are confusions between these two terms.

So let’s take a step back to the basics of their definitions. I am copying/pasting the definition from dictionary.com:

Orchestration: (1) to compose or arrange (music) for performance by an orchestra.  (2) to arrange or manipulate, especially by means of clever or thorough planning or maneuvering: to orchestrate a profitable trade agreement.

Choreography: (1) the art of composing ballets and other dances and planning and arranging the movements, steps, and patterns of dancers.  (2) the arrangement or manipulation of actions leading up to an event: the choreography of a surprise birthday party.

Even with the help of dictionary, the real difference between them is quite subtle. My interpretation of the difference is that orchestration is to have a group of participants perform a common activity such as symphony from beginning to end; while choreography is to arrange pieces together to make a thing happen (an event).

Back to the technical world, orchestration is used frequently now to describe assembling, in the SOA arena, services (either atomic or composite) into a business process. This business process can work with other business processes to enable & enhance business capabilities. This is a kind of orchestration. Specifically, the business process service can be controlled and coordinated by a controller service (like a conductor with a symphony if you will). On the other side, choreography is more for peer-to-peer collaborations, such as business to business (B2B) services. It would be interesting to know when and how the term of choreography started to be used as a technical term. One guess from me is the W3C specs of Web Services Choreography Description Language back to year 2004. According to this specs, the web services choreography “is targeted for composing interoperable, peer-to-peer collaborations between any type of Web Service participant regardless of the supporting platform or programming model used by the implementation of the hosting environment”.

Side note: In just one sentence, peer-to-peer referrers to collaboration of servers as oppose to client-to-server .