One of the most basic tenets of SOA is that a consumer of a service “should not know anything about it’s internal workings.” But even this most basic of SOA principles is really a “rule of thumb” rather than a universal truth.
Recently I made an online purchase, as I have done many times before. And as my order wound its way through the retailer’s systems I received numerous emails to inform me that my order was being processed. This is pretty standard stuff. But then something dawned on me. If the shipping process was a “service” then it violates a generally accepted SOA principle, and that is: services should be black boxes and consumers should know nothing about their internal workings.
The retailer I placed the order with is a niche retailer and through the sequence of emails I managed to piece together the following information:
- My order was made up of products from two locations.
- The products are transferred to a central location prior to being shipped in one package, rather than being sent direct from the two locations.
- The retailer’s website doesn’t have real-time stock counts (or I wouldn’t need to receive an email confirming my products are in stock – even though the website said they were when I was placing my order)
- My credit card is charged after stock is verified and after the stock hits the central location – but before the package is shipped.
That is a lot of information about the internal workings of the retailer’s supply chain. I daresay I would have got a lot more emails if one of my products was out of stuck. If I was designing their systems I wouldn’t divulge quite so much information but as a customer, I want to be kept in the loop, and the emails reassure me that something is being done about my order.
The moral of the story is this: when it comes to designing solutions, it’s never black and white. There’s no such thing as a universal truth. You need to challenge all assumptions – and challenge them every time you make a decision.