You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actor pattern for data layer — single-threaded data store (septic tank) with lock-free reads/writes via message-passing (sewer channels + ring buffer)
TTL stored per key with lazy expiry on access
Inline command support (plain-text commands via telnet/netcat)
Pipelining (handle multiple commands in a single read)
Active expiry — background task that periodically sweeps expired keys
Commands
PING [message]
SET key value [NX|XX] [GET] [EX|PX|EXAT|PXAT|KEEPTTL]
GET key
DEL key [key ...] (single key for now cuz command parser doesn't support variadic args)
TTL key
INFO
EXISTS key [key ...] (single key for now)
EXPIRE key seconds
INCR / DECR / INCRBY / DECRBY
APPEND key value
MGET key [key ...] / MSET key value [key value ...]
KEYS pattern
TYPE key
RENAME key newkey
Lists (LPUSH, RPUSH, LPOP, RPOP, LRANGE)
Hashes (HSET, HGET, HGETALL, HDEL)
Sets (SADD, SREM, SMEMBERS, SISMEMBER)
AOF persistence — mutation routing, batched flushing, and fsync'd appends to data.aof are done; still need startup replay, torn-tail recovery, flush-on-shutdown, and compaction
Replication — replica handshake (PING → REPLCONF → PSYNC), full resync on connect, partial resync via replication backlog after reconnect
Transactions — MULTI / EXEC / DISCARD with WATCH for optimistic locking
Pub/Sub — SUBSCRIBE / PUBLISH / UNSUBSCRIBE with fan-out to blocking subscribers
About
Redic is a Redis-compatible server in C that uses actor-style message passing (Sewer, Septic Tank, Potty) for serialized in-memory operations and AOF persistence.