# Fast, Distributed and Persistent: A new Model for key value stores
---
- Why is it important? :exclamation:
- Zebra :zebra_face:
- Goal :bow_and_arrow:
- Approaches & Evaluation :motorway:
- Tenacious Zebra :confetti_ball:
---
# Why is it important?
:exclamation:
---
Key value storage are used everywhere
- Gaming
- Session managment (Redis)
- Blockchain Technologies
- etc.
---
Recent improvements for consesus:
- BFT-SMART [2014]
- HotStuff [2019]
- Chop Chop [2023]
---
## What are the new bottlenecks?
- performance on the nodes themself
---
# Zebra
:zebra_face:
---
- Uses a Merkle Patricia trie
- Uses multiprocessing on subtries
- Hashmap for each thread
<img src="https://hackmd.io/_uploads/BJo5rBwoT.png" width="400px" />
---
- Cheap snapshot (O(1))
- Integrity detection
- Efficient sending
- Efficient storing
---
## No Persistency!
---
# Goal
:bow_and_arrow:
---
Find a solutions for zebra that satisfies following criterias:
- Modifications should be persistently saved
- Atomicity
- Performance should be "reasonable" well
---
# Approaches
:motorway:
---
## Store database
## vs
## Store changes (WAL)
---
- **No backup:** Baseline
- **No backup dashmap:** Concurrent hashmap alternative
- **File Backup:** Simple solution
- **Multiple PickleDB:** One DB for each thread
- **Okay WAL:** Use an existing WAL implementation
- **RocksDB WAL:** Use RocksDB as a WAL
---
## Testing
---
Anazlyzing:
- Machine with 96 Cors
- Write Percentage
- Transaction size
---
### Write percentage
100 Transaction with 100'000 operations
<img heihgt="500px" width="600px" src="https://hackmd.io/_uploads/BJfww-Lop.png" />
---
## 10% Write and 90% Read

---
### Transaction size
100,000/100 to 10/1,000,000
<img heihgt="500px" width="600px" src="https://hackmd.io/_uploads/Skg_PZLsa.png" />
---
### CPU Usage

---
### Absolute performance

---
# Tenacious Zebra
:confetti_ball:
---

https://github.com/barmettlerl/tenacious-zebra
---
We have shown:
- It is possible to make zebra persistent
- It is possible to do it without loosing too much performance
---
# Questions
:question:
---
{"description":"View the slide with \"Slide Mode\".","title":"Talk slides template","contributors":"[{\"id\":\"e15f076b-5930-47d4-aab9-8fb00ec4b2b7\",\"add\":5204,\"del\":2638}]"}