This post originated from an RSS feed registered with .NET Buzz
by Udi Dahan.
Original Post: Consistency vs. Availability
Feed Title: Udi Dahan - The Software Simplist
Feed URL: http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist
Feed Description: I am a software simplist. I make this beast of architecting, analysing, designing, developing, testing, managing, deploying software systems simple.
This blog is about how I do it.
I received the following question from Houman and I thought the both the question and answer deserved some more public discussion:
"Hello Udi,
I really enjoyed reading your article on MSJ, thanks.
I have been trying to get a handle on the trade off between consistency and availability in distributed environments. I feel that it is closely related to autonomousity. I was wondering if you could shed some light on it and how one can take advantage of WCF, WWF to address the problem.
Regards,
Houman"
And my response:
--
Consistency is a domain level concept ��� for instance, when you order a vacation including hotel, flight, and car rental, if one of those orders falls through, you don���t want to ���rollback��� on the others. From these domain level definitions, you can often run a sanity check on your service boundaries. Areas of consistency should fall within the boundaries of a single service. I don���t see myself, or anyone else for that matter, trading off on this ��� it is fundamental to the correctness of your system.
Availability is, or at least should be, orthogonal. You should be able to be consistent AND available at the same time. Service availability is not much different from "regular" availability that we���ve been doing all along. Of course, if we���ve divided up our services like I said before, than when one service becomes unavailable for some reason, the availability of other services should not be affected. This is definitely a part of service autonomy. If you have a poor division of responsibility between services, you can see it manifesting itself when the unavailability of one service causes other services, even though they may still run, to be incapable of providing service.
WCF is simply a communication mechanism. By understanding the above concepts, you will know which part of WCF to employ and when in your specific application. Workflow Foundation (WF) doesn���t really relate to any of the above.
--