Back to problems

Design a KV store with transactions

System Design · Applied Intuition · Hard

Design a transactional key-value storage engine that can keep data in memory, on disk, or both. Define the following operations and their semantics: get(key) retrieves the value associated with key, or indicates that the key is absent. put(key, value) inserts or updates the mapping for key. delete(key) removes the mapping for key. begin() starts a transaction. commit() atomically makes all changes made since the matching begin() visible to other clients. rollback() discards…

Checking your access…