Networking Layer
Speed is nothing without a frictionless delivery mechanism. LoomCache handles inter-node communication and client-server traffic through a highly optimized TCP layer.
The Binary Protocol
Section titled “The Binary Protocol”Rather than communicating via HTTP or REST JSON, LoomCache utilizes a hyper-efficient, custom binary protocol.
Wire Protocol Pipelining
Zero-copy serialization with batched pipelining over persistent TCP connections.
CLIENT
OP
BIN
OP
BIN
OP
BIN
SERVER
- Header Structure: Every packet has a fixed length header declaring the payload size, operation code (OP-Code), and a strict format.
- Zero-Copy Serialization: Map entries and keys are translated directly into byte streams, skipping object intermediary garbage collection where possible.
- Pipelining: Multiple commands can be flushed rapidly on the same connection, avoiding round-trip latency.
Thread-Pool Isolation
Section titled “Thread-Pool Isolation”Networking logic is separated via specialized execution arenas:
CommandExecutorPooldelegates non-I/O heavy state machine requests.- This prevents slow networks from backing up the core consensus algorithms.
Security (mTLS)
Section titled “Security (mTLS)”Production deployments demand zero-trust encryption. LoomCache natively supports Mutual TLS (mTLS) for cluster inner-node communication. Each node validates the identity of adjoining nodes before participating in Raft elections or accepting writes.