cd cmd
go run main.go
# on another terminal
redis-cli -p 8081
- Compatible with Redis CLI
- Single-threaded architecture
- Multiplexing IO using epoll for Linux and kqueue for MacOS
- RESP protocol
- Graceful shutdown
- Simple eviction mechanism
- Commands:
- PING
- SET, GET, DEL, TTL, EXPIRE, INCR
- ZADD, ZRANK, ZREM, ZSCORE, ZCARD
- SADD, SREM, SCARD, SMEMEBERS, SISMEMBER, SRAND, SPOP
- GEOADD, GEODIST, GEOHASH, GEOSEARCH, GEOPOS
- BF.RESERVE, BF.INFO, BF.MADD, BF.EXISTS, BF.MEXISTS
- CMS.INITBYDIM, CMS.INITBYPROB, CMS.INCRBY, CMS.QUERY
- Data structures:
- Hashtable
- Skiplist
- Geohash
- Scalable Bloom Filter
- Count-min sketch
- Hyperloglog
- Morris counter
- Cuckoo filter
- Approx LRU eviction
- Approx LFU eviction
- Longest Common Subsequence