package
0.0.0-20241212195640-2e19e05a42f5
Repository: https://github.com/addi-11/system-design.git
Documentation: pkg.go.dev
# README
Implementing Routing Strategy in KV Store on top of MySQL
-
Implementing
put
,get
,del
,ttl
operations all in sync. -
We create 2 tables and 2 connections simulating DB Partitions
kv_store_shard1
andkv_store_shard2
.
NOTE: Naming of the tables wrong - should be partition not shard -
Run the
set_db.sql
file to create DB, and partitions. Run:mysql -u root -p < <path to set_db.sql>
-
Implementing Routing technique, using a consistent hashing mechanism.
hash := sha256.Sum256([]byte(key))
idx := int(hash[0]) % shardCount
- Randomly get, put, del values.
Implementation of simple KV Store
Logs to the kvstore
Before cleanup
After cleanup
# Variables
No description provided by the author