Katkat

Design a generic key-value store

DatabricksSoftware Engineer · Technical Screen

Last updated

This question evaluates a software engineer's ability to design a clean, type-safe API for a generic key-value store, covering data modeling, interface design, and extensibility. It tests practical software design skills including generics, error handling, concurrency, and the ability to evolve an in-memory prototype into a persistent implementation without breaking callers.

Design a key-value store with a generic, user-friendly API. Define the data model and core operations (put, get, delete, exists, batch). Explain how you would expose generics in the interface (e.g., in Java), maintain type safety, and design for reusability. Describe error handling, versioning/TTL options, and how you would evolve an in-memory prototype to persistent storage.