# Ice Cream and Distributed Systems

DevFeed: [Ice Cream and Distributed Systems](<https://devfeed.tech/articles/ice-cream-and-distributed-systems-12465.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2014/10/25/ice-cream.html>)

Author: Marc Brooker

Published: 2014-10-25T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog.md>), [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog-2.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

The article uses an ice-cream-serving anecdote to explain a distributed-systems consistency problem. It then describes partitioning a network into two groups and argues that, when messages between them are lost, a later read in one group cannot reflect an earlier write in the other, illustrating the impossibility of guaranteeing consistent decisions in general without communication.

## Source excerpt

Ice Cream and Distributed Systems Can we serve a fair amount of ice cream? When I was a child, I really liked to eat ice cream. It's still pretty great, but back then I was somewhat fanatical about it. My parents knew that the delicious mix of fat and sugar was best served only occasionally, and would carefully limit my intake. I, of course, found a way around the system. First, I'd go to my mother and ask if it was time for ice cream, and she would give me an answer. If she answered in the negative, I'd ask my father the same question. That strategy increased by chances of an affirmative answer, because the decisions that my parents made were not consistent. Occasionally, I'd even eat some served by my mother, and then try my father for a second bowl. After a while of running this scheme, my parents figured it out. They decided that they needed to give me a consistent answer, and the only way to do that was to talk to each other every time I asked the question. Their coordination approach worked great. It guaranteed a consistent answer, and only made young Marc wait a little longer for his question to be answered. It all broke down when my parents went to work. Being a child, I could find a good excuse to speak to either parent at any time, but their jobs prevented them from speaking to each other. Once again, I could use the situation to my rich, sweet, and creamy advantage. With my parents unable to communicate, I was able to force an inconsistent decision. Did my parents miss a trick that would have allowed them to make a consistent ice cream serving decision without being able to talk to one another? Assume that the network consists of at least two nodes. Thus it can be divided into two disjoint, non-empty sets: {G1, G2}. The basic idea of the proof is to assume that all messages between G1 and G2 are lost. Then if a write occurs in G1, and later a read occurs in G2, then the read operation cannot return the results of the earlier write operation. Assuming that