Tuesday, July 2, 2013

Shared mutable, Isolated mutable and Immutable state in Concurrency explained by "Russians drinking vodka" analogy...

Actually I got tired of this stereotype of all Russians equating to Vodka drinkers, Babushkas, Izbushkas, and Ivans... This is ridiculous but having said that after reading a book on concurrency and going through some examples I found myself thinking about explaining different types of concurrency designs on example of several Russians drinking a bottle of vodka... And the fact that I have Russian background gives me a right to think about it and share with you. No, I ain't no racist! :( At the same time you could think whatever is dear to you ... say French having a bottle of Champagne... or Germans having a threesome... Bad for me I am not a German. :)))...

In this analogy we will make following association:

  • A number of Russian guys to number of threads performing a task
  • A task is to consume vodka 
  • A resources is a bottle of vodka