|
A very simple Redis implementation. |
|
I'm learning Kotlin and after reading Kotlin: An Illustrated Guide and Kotlin Design Patterns and Best Practices, I decided to give this a go taking advantage of the structure in the CodeCrafters challenge.
So take this for what it is: a learning project.
At the moment it is essentially a wrapper for a ConcurrentHashMap.
This code is heavily inspired by Rust Projects - Write a Redis Clone and resp-kotlin.
Run it with ./gradlew run then you can just use a normal redis-cli to communicate with the Redlin server.
- GET
- SET
- Expiration supported with
EX(seconds) andPX(milliseconds) - Set only if it does not exist with
NX - Set only if it exists with
XX
- Expiration supported with
- ECHO
- PING
- Add periodic eviction, currently only lazy eviction is supported.
- Implement basic transaction to support INCR.
- Implement support for lists
- Aim to use the coroutines properly and stop using ConcurrentHashMap by potentially implementing an Actor pattern.
- RDB Persistence
- Replication
- Proper logging
- Tests
