adamfowleruk / groundupdb

Creating a database from the ground up in C++ for fun!
Apache License 2.0
127 stars 27 forks source link

Allow sharding of key space on a single machine #26

Open adamfowleruk opened 4 years ago

adamfowleruk commented 4 years ago

Please start with a use case description for a USER of this work [Who] As a database admin [What] I need to use all of the processing power of my DB server when storing/retrieving keys and performing queries [Value] In order to achieve very high throughput on sets, gets, queries

Describe the solution you'd like Wrapper ShardingKeyValueStore(KeyValueStore[] shards) that only passes on sets and gets for keys to the correct sharded KV store. It should also map/reduce the queries passed to it

Describe alternatives you've considered Consider letting the Database class handle this, but it's more of a storage detail, and so belongs in a KeyValueStore implementation. The suggested approach also makes it easier to go from an unsharded store to a sharded one, and doesn't impose knowledge on sharding on underlying KV store implementations

Additional context Requirements:-

Not requirements:-