Skip to content

quangh33/memkv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple in-memory key-value database

How to run

  cd cmd
  go run main.go
  # on another terminal
  redis-cli -p 8081

Supported features

  • 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:

Todo

  • Hyperloglog
  • Morris counter
  • Cuckoo filter
  • Approx LRU eviction
  • Approx LFU eviction
  • Longest Common Subsequence

Releases

No releases published

Packages

No packages published

Languages