Exercise: Build a basic key-value db implementation (think a very early version of Redis).
Key Value DB (Redis) exerciseLabels: Intermediate
Time to complete: 1-2 weeks
What will you learn:
- Building a TCP server in Go.
- Handling multiple client connections concurrently.
- Basics of data storage and retrieval using key-value pairs.
- Implementation of an in-memory database structure.
- Understanding and implementing basic Redis commands.
- Error handling
How to evaluate your solution:
Actual Solution:
Don’t look at the solution unless you have to. Otherwise, you’re not getting much value from the bootcamp.
I know what I am doing; stop patronizing me.
- If you say so 🤷, Here’s the sample implementation -https://github.com/one2nc/keyvaluedb
Resources:
- Not exactly related to this problem statement, but please watch the Writing System Software playlist from the Redis creator (Salvatore Sanfilippo) himself - https://www.youtube.com/playlist?list=PLrEMgOSrS_3fghr8ez63xKFNF-BA6Pz13
- Refer to https://blog.pjam.me/posts/toy-redis-go/ to build Redis in Go if you get stuck with the implementation.
The “Redis” name and logo are trademarks of Redis Ltd.