Command Reference
RESP2 (Redis-compatible)
Section titled “RESP2 (Redis-compatible)”| Command | Description |
|---|---|
PING | Health check. Replies PONG. |
GET key | Retrieve a value, or a nil reply if the key doesn’t exist or has expired. |
SET key value [EX seconds | PX milliseconds] | Set a value, optionally with a TTL. Returns OK on success. |
DEL key | Delete a key. Replies with the number of keys removed (0 or 1). |
Unknown or unimplemented commands return a -ERR reply without dropping
the connection, so a client library that speaks standard RESP2 won’t hang
or crash when it hits a command Tellstone doesn’t support yet.
Native binary protocol
Section titled “Native binary protocol”The binary protocol exposes the same operations as typed Go calls via the
client package, rather than as a text command line:
| Client call | Equivalent to |
|---|---|
c.Get(key, scratch) | GET |
c.Set(key, value, ttlMs, scratch) | SET with a millisecond TTL (0 = no expiry) |
c.Delete(key, scratch) | DEL |
See Architecture for how the binary protocol and RESP share the same underlying storage engine.
Performance Considerations
Section titled “Performance Considerations”- All commands are designed for maximum performance with zero-copy operations where possible.
- The binary protocol is the fastest path for applications that can integrate directly with Go.
- RESP2 provides compatibility with existing Redis tools and client libraries.
On the roadmap (Phase 2)
Section titled “On the roadmap (Phase 2)”Not yet implemented: RESP3, INCR, EXPIRE, MULTI/EXEC, and any
commands operating on list/set/hash types, since those types don’t exist
in the storage engine yet either. See
Data Model for the current key/value shape.