The Physics of Computers: The CAP Theorem
When computers talk to each other over the internet, connections sometimes break. When a connection breaks, engineers are forced to make a hard choice. You cannot have everything. You must pick between two things:
- Consistency: Make sure every user sees the exact same data. If they can't, shut the app down until it's fixed.
- Availability: Keep the app running for everyone, even if some people see old or wrong data for a little while.
The PACELC Rule
Even when the internet is working perfectly, saving data slows things down. If you want all computers to agree on a piece of data, they have to wait for the slowest computer to reply. More computers = more waiting.