# Percolator case study

+ Bob has $10, Joe has $2, and Bob wants to transfer $7 to Joe.

![left](./student-guide/diagram/11-example-01-01.png)
------------------------------------------------------------
Percolator case study
Bob has $10, Joe has $2, and Bob transfers $7 to Joe.

1. Initial state
Bigtable has three different storages (corresponding to three different CF (column family) in TiDB), including data for storing data, and lock for storing lock information. In order to optimize writes for storing and writing version information,
The data in the bigtable is stored as key-values. In this example, the key is Bob or Joe, and the values in the “data” store is the version number: data, that is, 5:10, the “lock” data is empty, and “write” stores 6:data @5. Where 6 indicates the current largest version number, the index points to the version number data of “data” 5.
In distributed data, we assume that Bob and JOE exist on different storage instances.
