Implementing get and put functions
This section will delve into how to implement get
and put
functions in our key-value store.
Implementing get and put operations
A key requirement for our system is configurability. This means the ability to adjust the balance between availability, consistency, cost-effectiveness, and efficiency. We can achieve this by incorporating the fundamental get
and put
functions of a key-value store.
In our system, every node can perform get
(read) and put
(write) operations. The node that manages these operations is known as a coordinator, which is usually the first among the top n
nodes on the preference list.
Clients can select a node in two ways:
- By routing the request through a generic load balancer
- By using a partition-aware client library that directs requests straight to the relevant coordinator nodes
Both methods have their advantages. The first approach doesn’t tie the client to the code, while the second one...