Key-Value Data Store Service
Build a High-Performance, Scalable Key-Value Data Store Service
We are looking for engineers who love coding, problem-solving, and building systems that scale efficiently and are easy to maintain. To test your skills, we’ve designed a coding challenge that mirrors real-world engineering tasks. It's not just about solving the problem, but about writing clean, maintainable code that shows a deep understanding of systems architecture, performance, and usability (in this case, for a fellow developer).
In addition to solving the challenge, we’ll be looking at how you approach system design, code clarity, and testing—qualities that reflect the mentorship you’ll receive here.
What to expect:
- Effort: It should take a total of 2-4 hours to cover all requirements.
- Relevance: The skills applied will be required for this role.
- Feedback: Thorough code review and design feedback for each submission.
- Iterations: The chance to improve your submission based on feedback.
- Discussion: An exploration of how this was built and the choices made.
The Challenge:
Develop a key-value (kv) data store with advanced functionality, supporting Create, Read, and Delete (CRD) operations.
The data store service must expose the API endpoints documented below. Your implementation would ideally demonstrate a level of comfort with both functionality and performance.
Method | API Path | Request Body | Response Body |
---|
GET | /api/object/{key} | - | {
"key": <String>,
"data": <Object>
} |
POST | /api/object | {
"key": <String>,
"data": <Object>,
"ttl": <Number>
} | - |
POST | /api/batch/object | [
{
"key": <String>,
"data": <Object>,
"ttl": <Number>
}
] | - |
DELETE | /api/object/{id} | - | - |
Functional Requirements:
RDBMS as storage:
- You must use an RDBMS database to store the key value pair and it’s associated data.
- We recommend you use database migration frameworks to bootstrap the database and its table schema.
Create API:
- Support adding a key-value pair, where the key is a string (max 32 chars) and the value is a JSON object (max 16KB).
- If the key already exists, return an appropriate error.
Get API:
- Retrieve the JSON value corresponding to a key.
Delete API:
- Remove a key-value pair using the key.
Time-to-Live (TTL):
- Each key supports an optional TTL (in seconds). After this TTL expires, the key should automatically become unavailable for read or delete requests.
Batch API:
- Implement a batch Create API that handles multiple key-value pairs in a single request, showcasing the efficiency of your design.
- Feel free to decide your own limits for a batch and explain using a comment why you chose the limit.
Multi-Tenancy:
- Ensure the service is multi-tenant in nature and is capable of handling different clients while managing secure boundaries around each tenant’s respective data.
Exception handling:
- Appropriate error responses must always be returned to a client if it uses the data store in unexpected ways or breaches any limits.
Non-Functional Requirements:
Tenant fair usage:
- Ensure each tenant exploits the system fairly by imposing a tenant-level cap on the size of the storage each can maintain.
- Support managing different limits for each tenant.
Concurrency
- Your implementation must allow concurrent access of data from multiple clients with appropriate controls in place.
Security
- Secure the data by appropriate methods where a tenant must not be able to access another tenant’s data.
Quality and Testing Expectations:
- Submit your code with comprehensive unit / integration tests. These should cover all edge cases, error scenarios, and concurrent access patterns.
- Tests should ideally validate TTL expirations, cover error handling (e.g., duplicate keys), as well as concurrent access.
- Include instructions or scripts to run the tests and verify the correctness of your solution.
Languages:
While you’re free to use a language of your choice, our preferred stack includes:
- NodeJS
- Java
- Python
- GoLang
- Ruby
Submission:
- Write to us at thrive@strivelabs.ai with the subject line - “Key-Value Data Store Submission - [Your Name]”.
- Submit your code via a GitHub repository (or any other version control repository).
- Include a README in your code that covers:
- Instructions to set up, run, and test your solution.
- Details of any interesting design decisions you made.
- Any system-specific dependencies or limitations.
- Try to ensure your data store works across major operating systems (Windows, Linux, macOS). If there are OS-specific constraints, please mention them clearly.
- Include a rough estimate of the time you spent on the project.
- Include a CV or a link to your profile to help us learn more about yourself.
This is an opportunity to showcase your creativity, design thinking, and problem-solving skills. We're excited to see how you tackle this challenge and look forward to discussing your approach!