|
1 |
| -# patrick-db |
| 1 | +<p align="center"> |
| 2 | + <img src="./media/thumbnail.png"> |
| 3 | +</p> |
| 4 | + |
| 5 | +# PatrickDB |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 26 | + |
| 27 | +Clients compatible with gRPC or REST can connect to patrick-db, such as the [cli](./server/src/client.rs) tool located in |
| 28 | +the [server](./server) directory. |
| 29 | + |
| 30 | +Envoy, which serves multiple purposes, is used here to interchange REST and gRPC. |
| 31 | + |
| 32 | +Zookeeper plays a role in service discovery and managing leader elections. |
| 33 | + |
| 34 | +The [router](server/src/router.rs), a gRPC server akin to the database server, interacts with Zookeeper. It identifies |
| 35 | +all partitions and their respective leaders and followers, directing traffic to the appropriate partition through |
| 36 | +hash-based partitioning. For write or read operations, it selects the leader, and for read-only operations, a follower |
| 37 | +is chosen. |
| 38 | + |
| 39 | +The [database](server/src/server.rs) itself is a gRPC server that implements a file-based storage system. In its role as |
| 40 | +a leader, it replicates data to followers using statement replication. |
0 commit comments