Goblin Core Documentation
Goblin Core is a compact, single-node server with Redis command semantics and two independent protocol choices: RESP for compatibility and SBE for typed binary clients. Both protocols work over TCP (optionally accelerated with Cisco ExaSock or native NVIDIA XLIO Ultra), Unix-domain sockets, shared-memory rings, and polled one-sided RDMA rings.
Start here
- Build, configure, and run Goblin Core
- Install Goblin Core from source
- Release history
- Performance architecture
- Benchmark methodology and results
- Pub/Sub performance benchmark
- XLIO Ultra command latency
- List storage algorithms
- Real-time and memory-efficient hash indexes
- Firehose replication and Kafka recovery
- Kafka write-log ingestion
- Authentication and trusted transports
- TCP listeners and native TLS
- Hard memory ceiling and deterministic OOM
Protocols and transports
| Document | What it covers |
|---|---|
| TCP listeners and TLS | Repeatable IPv4/IPv6 binds, the mandatory plaintext localhost companion, certificate configuration, and protocol/security boundaries. |
| Shared-memory ring buffers | Ring creation, SQ/CQ layout, busy polling, reconnect behavior, sizing, HugeTLB, NUMA placement, and the C++ clients. |
| Polled RDMA rings | RC queue-pair setup, sequence-word slots, cached credits, memory registration, mixed-target priority, and RESP/SBE clients. |
| InfiniBand setup | Adapter inventory, PSID-safe firmware updates, OpenSM, link validation, verbs/perftest acceptance checks, IPoIB, and the mixed ring/RDMA polling contract. |
| ExaSock / Nexus SmartNIC | Opt-in CMake flag, system ExaSock SDK (not vendored), exasock wrapper, RESP/SBE TCP clients, INFO fields. |
| Native XLIO Ultra TCP | Native RESP/SBE server and client, strict poll priority, pinned XLIO/DPCP sources, ConnectX-5 qualification, build recipe, snapshot constraints, and kernel-TCP interoperability. |
| SBE protocol | Handshake, framing, schema generation, message and reply types, compatibility rules, and typed-client usage. |
Protocol and transport are independent. RESP and opt-in SBE can each run over TCP (native TLS, ExaSock, or XLIO Ultra), Unix-domain sockets, a shared-memory ring, or a polled RDMA ring. XLIO preserves ordinary TCP on the wire and remains compatible with a kernel TCP peer. Ordinary socket TCP is always plaintext on 127.0.0.1 and requires TLS on non-loopback addresses. SBE requires --enable-sbe and is intentionally unauthenticated; see Authentication before exposing it.
Replication, durability, and replay
GOBLIN.FIREHOSE provides transport-neutral live replication over TCP, UDS, shared-memory rings, or RDMA. A replica can load a native snapshot, replay the durable RESP2 mutation log from Kafka, buffer the live firehose while it catches up, and open its listeners only after the handoff is complete. Kafka owns the durable history; Goblin Core remains the compact serving layer.
The Thunder and Redpanda durability deployment record preserves the host-specific first production-style lab setup separately from the general source installation guide.
Command reference
Commands that share one implementation family link to the corresponding family reference. Goblin-specific atomic helpers and scripting commands have individual pages.
Server and keyspace
AUTH,HELLO,CLIENT,COMMANDSELECT,QUIT,PING,ECHOINFOTIME,ROLE,CONFIG GETMULTI,EXEC,DISCARD,WATCH,UNWATCHDEL,EXISTS,TYPE,DBSIZE,RANDOMKEY,TOUCHRENAME,RENAMENX,COPY,SCAN
The bounded-iteration reference documents the shared cursor, filtering, and mutation contract for SCAN, HSCAN, SSCAN, and ZSCAN.
The transaction reference documents atomic queued execution, optimistic WATCH, runtime versus queue-time errors, and the fixed page-backed per-client queue.
Strings and counters
SET,SETNX,GET,GETEX,GETSET,GETDELSTRLEN,APPEND,GETRANGE,SETRANGEINCR,DECR,INCRBY,DECRBY,INCRBYFLOATMSET,MSETNX,MGET
Expiration
Sorted sets
The sorted-set command reference covers conditional updates, score bounds, rank and score ranges, endpoint pops, scans, and storage.
ZADD,ZINCRBY,ZCARDZSCORE,ZMSCORE,ZRANK,ZREVRANKZRANGE,ZRANGEBYSCORE,ZREVRANGEBYSCORE,ZCOUNTZREM,ZREMRANGEBYRANK,ZINTERSTORE,ZUNIONSTORE,ZPOPMIN,ZPOPMAX,ZSCAN,ZREMRANGEBYSCORE
Hashes
The hash command reference covers behavior and replies. The hash implementation guide covers the efficient and incremental RT indexes, qualified command families, and --real-time mode.
HSET,HMSET,HSETNX,HGET,HMGETHDEL,HEXISTS,HLEN,HSTRLENHGETALL,HKEYS,HVALS,HINCRBY,HINCRBYFLOAT,HRANDFIELD,HSCAN
Bounded iteration
Lists
The list command reference covers both the default segmented backend and the adaptive-PMA backend. The local work-queue benchmark compares the new commands with the existing list surface over one RESP2/UDS path.
LPUSH,RPUSH,LPUSHX,RPUSHXLPOP,RPOP,LMOVE,RPOPLPUSH,LLEN,LINDEX,LRANGEBLPOP,BRPOP,BLMOVE,LMPOP,BLMPOPLSET,LTRIM,LREM,LINSERT
Every list command is also available under GOBLIN.PMA.* and GOBLIN.SEGMENTED.*, allowing clients and benchmarks to select a concrete implementation without changing the standard aliases.
Pub/Sub
The Pub/Sub command reference covers RESP2 arrays, RESP3 pushes, typed SBE delivery, glob matching, disconnect cleanup, and the page-backed slow-consumer queue.
SUBSCRIBE,UNSUBSCRIBE,PSUBSCRIBE,PUNSUBSCRIBEPUBLISH,PUBSUB CHANNELS,PUBSUB NUMSUB,PUBSUB NUMPAT
Native atomic helpers
These commands replace multi-command Lua idioms with one atomic C++ operation.
| Command | Native operation |
|---|---|
GOBLIN.CAD |
Compare-and-delete a string key. |
GOBLIN.CAEXPIRE |
Renew a TTL only while the expected token still owns the key. |
GOBLIN.CAS |
Compare-and-set while preserving the existing TTL. |
GOBLIN.INCREX |
Fixed-window counter with expiry armed on the first write. |
GOBLIN.ZWINDOW |
Sliding-window limiter, self-healing mutex, or counting semaphore. |
GOBLIN.INCRBOUND |
Increment only while the result stays within a ceiling. |
GOBLIN.DECRPOS |
Decrement only while a positive balance remains. |
GOBLIN.HCAD |
Compare-and-delete a hash field. |
GOBLIN.HSETGT |
Set a hash field only when the new numeric value is greater. |
GOBLIN.CLAIM |
Claim work once with an expiring lease, or return its prior result. |
GOBLIN.TD_LEADERBOARD_RESCORE |
Stream a timestamp leaderboard through linear, exponential, or step decay and return its top k. |
Operational extensions are collected in the GOBLIN.* command reference: GOBLIN.MEMORY, GOBLIN.OPTIMIZE, GOBLIN.SAVE, GOBLIN.DUMPWORLD, and GOBLIN.LOAD. The same-version server stream is documented separately as GOBLIN.FIREHOSE.
Scripting
Each runtime has an independent VM and compiled-script cache. They share the same keyspace and atomic command execution model. See the scripting overview for argument, sandbox, cache, and return value rules.
| Runtime | Commands |
|---|---|
| PUC-Lua 5.1 | EVAL, EVALSHA, SCRIPT |
| Luau | LUAU.EVAL, LUAU.EVALSHA, LUAU.SCRIPT |
| Wren | WREN.EVAL, WREN.EVALSHA, WREN.SCRIPT |
| Jim Tcl | TCL.EVAL, TCL.EVALSHA, TCL.SCRIPT |
| MicroPython | UPYTHON.EVAL, UPYTHON.EVALSHA, UPYTHON.SCRIPT |
| QuickJS | QUICKJS.EVAL, QUICKJS.EVALSHA, QUICKJS.SCRIPT |