Conversive Services

20 05 2009

Recently there has been some dicussion about the merits of SOA as an approach for building a new lagacy of systems (and I do mean legacy unfortunately).

Am I a big fan of SOA as it stands at present? Not really, but this does not mean that it cannot be a great asset in the future. The basic set of principles seem reasonably sound, but I do not yet believe that there is a level of maturity in either the current technology or in the understanding of those who preach it.

Why am I not convinced?

For me, the whole concept of a service is that it should be kept loose. By binding a service to a contract, we can choose the service that we want to use, if and only if, it supports a predetermined contract. This sounds rather tight to me. Okay, so I have choice over which service I use that supports a given interface, but if it later changes its contract then I am in deep trouble!

Now lets try to think differently. Imagine I want to convert Dollars to Euros.

  1. I search for services that convert currencies.
  2. I pass the values that I expect to be converted to a selected service.
  3. I receive back an exchange rate.

Simple.

Now lets view this task as a conversation.

  1. (Me) Do you convert currencies?
  2. (Service) Yes I do. Why do you need the conversion?
  3. (Me) I am going on my holidays.
  4. (Service) What curencies would you like to convert?
  5. (Me) Dollars to Euros.
  6. (Service) How many Dollars need converting?
  7. (Me) 200 Dollars.
  8. (Service) 200 Dollars is worth 100 Euros.
  9. (Me) Thank you.

Ah, what is going on? How have we managed to make such a long winded process out of what should be a very simple procedure? Well what happens if the service I am talking to can convert currencies, but not the ones that I want it to convert? The contract would be sound but I would still generate an exception in real terms. Conversive services aim to address this and many other issues associated with the contract based approach to services.

Over the next few posts I will explain why I think that this level of communication between services is necessary and hopefully get some bench time to code some examples.


Actions

Information

Leave a comment