# ferricstore v0.4.3 - Table of Contents

## Pages

- Guides
  - [Getting Started](getting-started.md)
  - [Embedded Mode](embedded-mode.md)
  - [Elixir Flow SDK](flow-elixir-sdk.md)
  - [Commands Reference](commands.md)
  - [Configuration Reference](configuration.md)
  - [Architecture](architecture.md)
  - [Deployment Guide](deployment.md)
  - [Security](security.md)
  - [Best Practices](best-practices.md)

- References
  - [Workflow Runtime Shapes And FerricFlow Examples](flow-vs-temporal-usage.md)
  - [Benchmarks](benchmarks.md)
  - [Flow Production Readiness](flow-production-readiness.md)
  - [Flow Retry Policy](flow-retry-policy.md)
  - [Testing Notes](testing.md)

## Modules

- [:ferricstore_wal_nif](:ferricstore_wal_nif.md): Rust NIF append-log I/O module.
- [FerricStore](FerricStore.md): Module-based cache instances for FerricStore.
- [FerricStore.BatchWorker](FerricStore.BatchWorker.md): Persistent process for erpc batch operations.
- [FerricStore.Flow.Job](FerricStore.Flow.Job.md): Claimed Flow job returned by `FerricStore.Flow.Workflow` modules.
- [FerricStore.Flow.Worker](FerricStore.Flow.Worker.md): Optional polling worker for `FerricStore.Flow.Workflow` modules.
- [FerricStore.Flow.Workflow](FerricStore.Flow.Workflow.md): Elixir workflow SDK for FerricStore Flow.
- [FerricStore.Impl](FerricStore.Impl.md): Elixir-native implementation of all FerricStore data-type operations, delegating to Router and command handlers.
- [FerricStore.Instance](FerricStore.Instance.md): Instance context for a FerricStore instance.
- [FerricStore.Instance.Supervisor](FerricStore.Instance.Supervisor.md): Per-instance supervision tree for a FerricStore instance.
- [FerricStore.Macro](FerricStore.Macro.md): Generates the full FerricStore public API (get, set, del, hash, set, list, sorted set, probabilistic, etc.) for `use FerricStore` modules.
- [FerricStore.Pipe](FerricStore.Pipe.md): Pipeline accumulator for batching multiple FerricStore commands.
- [FerricStore.Tx](FerricStore.Tx.md): Transaction accumulator for executing multiple FerricStore commands atomically.
- [Ferricstore.Application](Ferricstore.Application.md): OTP Application for the FerricStore core engine.
- [Ferricstore.AuditLog](Ferricstore.AuditLog.md): ETS-backed ring buffer that records security-relevant events.
- [Ferricstore.Bitcask.Async](Ferricstore.Bitcask.Async.md): Safe waiter for Tokio-backed async NIF calls.
- [Ferricstore.Bitcask.NIF](Ferricstore.Bitcask.NIF.md): Rustler NIF bindings for Bitcask record I/O, hint files, and mmap-backed probabilistic data structure file operations.
- [Ferricstore.Cluster.DataSync](Ferricstore.Cluster.DataSync.md): Shard-by-shard data directory copy for new node sync.
- [Ferricstore.Cluster.Manager](Ferricstore.Cluster.Manager.md): Manages cluster membership: monitors node connections, orchestrates join/leave
flows, and coordinates data sync for new followers.
- [Ferricstore.CommandTime](Ferricstore.CommandTime.md): Shared clock for command code that can run both outside and inside Raft apply.
- [Ferricstore.Commands.Bitmap](Ferricstore.Commands.Bitmap.md): Handles Redis bitmap commands: SETBIT, GETBIT, BITCOUNT, BITPOS, BITOP.
Each handler takes the uppercased command name, a list of string arguments,
and an injected store map. Returns plain Elixir terms — the connection layer
handles RESP encoding.
- [Ferricstore.Commands.Blocking](Ferricstore.Commands.Blocking.md): Parses and validates blocking list commands: BLPOP, BRPOP, BLMOVE, BLMPOP.
- [Ferricstore.Commands.Bloom](Ferricstore.Commands.Bloom.md): Handles Redis-compatible Bloom filter commands.
- [Ferricstore.Commands.CMS](Ferricstore.Commands.CMS.md): Count-Min Sketch commands routed through Raft for replication.
- [Ferricstore.Commands.Catalog](Ferricstore.Commands.Catalog.md): Central registry of all commands supported by FerricStore.
- [Ferricstore.Commands.Cluster](Ferricstore.Commands.Cluster.md): Handles FerricStore cluster inspection and management commands.
- [Ferricstore.Commands.Cuckoo](Ferricstore.Commands.Cuckoo.md): Handles Redis-compatible Cuckoo filter commands.
- [Ferricstore.Commands.Dispatcher](Ferricstore.Commands.Dispatcher.md): Routes Redis command names to the appropriate handler module.
- [Ferricstore.Commands.Expiry](Ferricstore.Commands.Expiry.md): Handles Redis expiry commands: EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT, TTL, PTTL, PERSIST.
- [Ferricstore.Commands.Flow](Ferricstore.Commands.Flow.md): RESP command dispatch boundary for FerricFlow commands.
- [Ferricstore.Commands.Generic](Ferricstore.Commands.Generic.md): Handles Redis generic key commands: TYPE, UNLINK, RENAME, RENAMENX, COPY,
RANDOMKEY, SCAN, EXPIRETIME, PEXPIRETIME, OBJECT, WAIT.
- [Ferricstore.Commands.Geo](Ferricstore.Commands.Geo.md): Handles Redis geo commands: GEOADD, GEOPOS, GEODIST, GEOHASH, GEOSEARCH,
GEOSEARCHSTORE.
- [Ferricstore.Commands.Hash](Ferricstore.Commands.Hash.md): Handles Redis hash commands: HSET, HGET, HDEL, HMGET, HGETALL, HLEN,
HEXISTS, HKEYS, HVALS, HSETNX, HINCRBY, HINCRBYFLOAT, HEXPIRE, HTTL,
HPERSIST, HSCAN, HRANDFIELD.
- [Ferricstore.Commands.HyperLogLog](Ferricstore.Commands.HyperLogLog.md): Handles Redis HyperLogLog commands: PFADD, PFCOUNT, PFMERGE.
- [Ferricstore.Commands.Json](Ferricstore.Commands.Json.md): Handles Redis JSON commands: JSON.SET, JSON.GET, JSON.DEL, JSON.NUMINCRBY,
JSON.TYPE, JSON.STRLEN, JSON.OBJKEYS, JSON.OBJLEN, JSON.ARRAPPEND,
JSON.ARRLEN, JSON.TOGGLE, JSON.CLEAR, JSON.MGET.
- [Ferricstore.Commands.List](Ferricstore.Commands.List.md): Handles Redis list commands using compound key storage.

- [Ferricstore.Commands.Memory](Ferricstore.Commands.Memory.md): Handles Redis MEMORY subcommands.
- [Ferricstore.Commands.Namespace](Ferricstore.Commands.Namespace.md): Handles the `FERRICSTORE.CONFIG` command for namespace-aware configuration.
- [Ferricstore.Commands.Native](Ferricstore.Commands.Native.md): Handles FerricStore-native commands that go beyond the Redis command set.
- [Ferricstore.Commands.PubSub](Ferricstore.Commands.PubSub.md): Handles Redis pub/sub commands that go through the normal dispatcher:
PUBLISH, and PUBSUB (with subcommands CHANNELS, NUMSUB, NUMPAT).
- [Ferricstore.Commands.Server](Ferricstore.Commands.Server.md): Handles Redis server commands: PING, ECHO, DBSIZE, KEYS, FLUSHDB, FLUSHALL,
INFO, COMMAND, SELECT, LOLWUT, and DEBUG.
- [Ferricstore.Commands.Set](Ferricstore.Commands.Set.md): Handles Redis set commands: SADD, SREM, SMEMBERS, SISMEMBER, SMISMEMBER,
SCARD, SINTER, SUNION, SDIFF, SDIFFSTORE, SINTERSTORE, SUNIONSTORE,
SINTERCARD, SRANDMEMBER, SPOP, SMOVE, SSCAN.
Each set member is stored as a compound key:
    S:redis_key\0member_name -> "1"
- [Ferricstore.Commands.SortedSet](Ferricstore.Commands.SortedSet.md): Handles Redis sorted set commands: ZADD, ZSCORE, ZRANK, ZRANGE, ZCARD,
ZREM, ZINCRBY, ZCOUNT, ZPOPMIN, ZPOPMAX, ZRANGEBYSCORE, ZREVRANGE,
ZSCAN, ZRANDMEMBER, ZMSCORE.
- [Ferricstore.Commands.Stream](Ferricstore.Commands.Stream.md): Handles Redis Stream commands: XADD, XLEN, XRANGE, XREVRANGE, XREAD, XTRIM,
XDEL, XINFO STREAM, XGROUP CREATE, XREADGROUP, and XACK.
- [Ferricstore.Commands.Strings](Ferricstore.Commands.Strings.md): Handles Redis string commands.
- [Ferricstore.Commands.TDigest](Ferricstore.Commands.TDigest.md): Handles Redis-compatible TDIGEST.* commands.
- [Ferricstore.Commands.TopK](Ferricstore.Commands.TopK.md): Handles Top-K commands routed through Raft for replication.
- [Ferricstore.Config](Ferricstore.Config.md): GenServer managing runtime configuration for FerricStore.
- [Ferricstore.Config.Local](Ferricstore.Config.Local.md): ETS-backed storage for node-local configuration parameters.
- [Ferricstore.CrossShardOp](Ferricstore.CrossShardOp.md): Mini-percolator for cross-shard multi-key operations.
- [Ferricstore.CrossShardOp.IntentResolver](Ferricstore.CrossShardOp.IntentResolver.md): Resolves stale intents left by crashed cross-shard operation coordinators.
- [Ferricstore.DataDir](Ferricstore.DataDir.md): Manages the FerricStore on-disk directory layout (spec section 2B.4).
- [Ferricstore.Doctor](Ferricstore.Doctor.md): Admin diagnostics and bounded repair jobs.
- [Ferricstore.FS](Ferricstore.FS.md): Thin Elixir wrapper over `Ferricstore.Bitcask.NIF.fs_*` that
- [Ferricstore.FetchOrCompute](Ferricstore.FetchOrCompute.md): GenServer managing compute locks for cache-aside with stampede protection.
- [Ferricstore.Flow.Admission](Ferricstore.Flow.Admission.md): Low-overhead Flow write admission gate.
- [Ferricstore.Flow.ClaimDueAPI](Ferricstore.Flow.ClaimDueAPI.md): Public Flow claim path.
- [Ferricstore.Flow.ClaimWaiters](Ferricstore.Flow.ClaimWaiters.md): Waiter registry for `FLOW.CLAIM_DUE ... BLOCK`.
- [Ferricstore.Flow.LMDBWriter](Ferricstore.Flow.LMDBWriter.md): Async Flow projection writer for LMDB.
- [Ferricstore.Flow.OrderedIndex](Ferricstore.Flow.OrderedIndex.md): Compatibility facade for the Flow ordered index.
- [Ferricstore.Flow.RetentionSweeper](Ferricstore.Flow.RetentionSweeper.md): Periodic Flow retention cleanup for terminal records and their history/value refs.
- [Ferricstore.GlobMatcher](Ferricstore.GlobMatcher.md): Linear-time binary glob matcher.
- [Ferricstore.HLC](Ferricstore.HLC.md): Hybrid Logical Clock (HLC) for FerricStore.
- [Ferricstore.Health](Ferricstore.Health.md): Tracks node readiness for Kubernetes health probes (spec 2C.1 Phase 3).
- [Ferricstore.HyperLogLog](Ferricstore.HyperLogLog.md): Pure-Elixir HyperLogLog probabilistic cardinality estimator.
- [Ferricstore.KeyspaceNotifications](Ferricstore.KeyspaceNotifications.md): Emits Redis-compatible keyspace and keyevent notifications via PubSub.
- [Ferricstore.MemoryBudget](Ferricstore.MemoryBudget.md): Central sizing policy for memory-sensitive queues and caches.
- [Ferricstore.MemoryGuard](Ferricstore.MemoryGuard.md): Memory pressure monitor and eviction controller for FerricStore.
- [Ferricstore.Merge.Manifest](Ferricstore.Merge.Manifest.md): Crash-safe manifest for in-progress merge operations.
- [Ferricstore.Merge.Scheduler](Ferricstore.Merge.Scheduler.md): Per-shard merge scheduler that triggers compaction when file rotation occurs.
- [Ferricstore.Merge.Semaphore](Ferricstore.Merge.Semaphore.md): Node-level semaphore that limits concurrent merge operations.
- [Ferricstore.Merge.Supervisor](Ferricstore.Merge.Supervisor.md): Supervises the merge subsystem: one `Semaphore` and N `Scheduler` processes.
- [Ferricstore.Metrics](Ferricstore.Metrics.md): Prometheus-compatible metrics exposition for FerricStore.
- [Ferricstore.NamespaceConfig](Ferricstore.NamespaceConfig.md): GenServer managing per-namespace commit-window configuration.
- [Ferricstore.OperationalGuard](Ferricstore.OperationalGuard.md): Proactive operational guard for memory/disk capacity.
- [Ferricstore.OperationalLimits](Ferricstore.OperationalLimits.md): Capacity-derived operational budgets for a FerricStore node.
- [Ferricstore.PrefixMetricsCache](Ferricstore.PrefixMetricsCache.md): Cached Prometheus text for expensive per-prefix metrics.
- [Ferricstore.PubSub](Ferricstore.PubSub.md): ETS-based Pub/Sub registry for FerricStore.
- [Ferricstore.QuorumMetrics](Ferricstore.QuorumMetrics.md): Low-cardinality Prometheus counters for the quorum write path.
- [Ferricstore.Raft.Backend](Ferricstore.Raft.Backend.md): Runtime write backend.
- [Ferricstore.Raft.Batcher](Ferricstore.Raft.Batcher.md): WARaft write facade for default-instance call sites.
- [Ferricstore.Raft.BlobCommand](Ferricstore.Raft.BlobCommand.md): Prepares large-value Raft commands for blob side-channel replication.
- [Ferricstore.Raft.Cluster](Ferricstore.Raft.Cluster.md): WARaft cluster facade for FerricStore shards.
- [Ferricstore.Raft.CommandClock](Ferricstore.Raft.CommandClock.md): Stamps Raft commands with a leader-side HLC timestamp before they enter the log.
- [Ferricstore.Raft.ReplyAwaiter](Ferricstore.Raft.ReplyAwaiter.md): Alias-backed waiters for replies sent with `GenServer.reply/2`.
- [Ferricstore.Raft.StateMachine](Ferricstore.Raft.StateMachine.md): Replicated state machine for a single FerricStore shard.
- [Ferricstore.Raft.WARaftBackend](Ferricstore.Raft.WARaftBackend.md): Production WARaft backend boundary.
- [Ferricstore.Raft.WARaftBackend.Batcher](Ferricstore.Raft.WARaftBackend.Batcher.md): Namespace-window batcher for the WARaft replacement backend.
- [Ferricstore.Resp.Parser](Ferricstore.Resp.Parser.md): Rust NIF parser for the RESP3 protocol.
- [Ferricstore.Resp.ParserNif](Ferricstore.Resp.ParserNif.md): Rust NIF binding for RESP3 protocol parsing.
- [Ferricstore.SlowLog](Ferricstore.SlowLog.md): ETS-backed ring buffer that records commands whose execution time exceeds a
configurable threshold.
- [Ferricstore.Stats](Ferricstore.Stats.md): Tracks global server statistics using `:counters` for lock-free atomic increments.
- [Ferricstore.Store.ActiveFile](Ferricstore.Store.ActiveFile.md): Tracks the active log file for each shard.
- [Ferricstore.Store.BitcaskCheckpointer](Ferricstore.Store.BitcaskCheckpointer.md): Per-shard background fsync for Bitcask data files.
- [Ferricstore.Store.BitcaskWriter](Ferricstore.Store.BitcaskWriter.md): Background Bitcask writer for deferred persistence of small values.
- [Ferricstore.Store.BlobGCSweeper](Ferricstore.Store.BlobGCSweeper.md): Periodic conservative garbage collection for large-value blob storage.
- [Ferricstore.Store.BlobRef](Ferricstore.Store.BlobRef.md): Fixed-size side-channel reference for large-value blob storage.
- [Ferricstore.Store.BlobStore](Ferricstore.Store.BlobStore.md): Side-channel blob storage for large values.
- [Ferricstore.Store.BlobValue](Ferricstore.Store.BlobValue.md): Value-level glue for large payload blob side-channel storage.
- [Ferricstore.Store.ColdRead](Ferricstore.Store.ColdRead.md): Helpers for synchronous callers that need to wait on Tokio cold-read NIFs.
- [Ferricstore.Store.CompoundCommand](Ferricstore.Store.CompoundCommand.md): Builds the default Raft command contract for compound-key writes.
- [Ferricstore.Store.CompoundKey](Ferricstore.Store.CompoundKey.md): Encodes and decodes compound keys for data structure storage in Bitcask.
- [Ferricstore.Store.DiskPressure](Ferricstore.Store.DiskPressure.md): Per-shard atomic disk pressure flags.
- [Ferricstore.Store.LFU](Ferricstore.Store.LFU.md): LFU (Least Frequently Used) counter with time-based decay, matching Redis's
implementation.
- [Ferricstore.Store.ListOps](Ferricstore.Store.ListOps.md): Pure-logic module for list data structure operations.
- [Ferricstore.Store.LocalTxStore](Ferricstore.Store.LocalTxStore.md): Transaction-local store context for MULTI/EXEC.
- [Ferricstore.Store.Ops](Ferricstore.Store.Ops.md): Unified interface for store operations.
- [Ferricstore.Store.PipelinePlanner](Ferricstore.Store.PipelinePlanner.md): Core-owned pipeline routing precompute.
- [Ferricstore.Store.Promotion](Ferricstore.Store.Promotion.md): Collection promotion: migrates large compound-key collections from the
shared shard Bitcask into a dedicated per-key Bitcask instance.
- [Ferricstore.Store.Router](Ferricstore.Store.Router.md): Routes keys to shard GenServers using the shared `Ferricstore.Store.SlotMap`
hashing implementation.
- [Ferricstore.Store.Shard](Ferricstore.Store.Shard.md): GenServer managing one Bitcask partition backed by an ETS hot-read cache.
- [Ferricstore.Store.Shard.Compaction](Ferricstore.Store.Shard.Compaction.md): Promoted Bitcask compaction helpers injected into `Ferricstore.Store.Shard`.
- [Ferricstore.Store.Shard.Compound](Ferricstore.Store.Shard.Compound.md): Compound-key CRUD, prefix scan/count, promoted-collection dedicated storage, and automatic compaction.
- [Ferricstore.Store.Shard.ETS](Ferricstore.Store.Shard.ETS.md): ETS keydir operations: lookup, insert, delete, cold-read warming, LFU touch, hot-cache threshold enforcement, and prefix scans.
- [Ferricstore.Store.Shard.Flush](Ferricstore.Store.Shard.Flush.md): Async and sync Bitcask batch flush, file rotation, hint-file writing, and per-file dead-byte fragmentation tracking.
- [Ferricstore.Store.Shard.Lifecycle](Ferricstore.Store.Shard.Lifecycle.md): Shard startup (log/hint recovery, keydir rebuild), expiry sweep, probabilistic-file migration, Raft init, and graceful shutdown.
- [Ferricstore.Store.Shard.NativeOps](Ferricstore.Store.Shard.NativeOps.md): Shard-level CAS, distributed lock, rate-limit, and list operation handlers with Raft and direct-write paths.
- [Ferricstore.Store.Shard.Reads](Ferricstore.Store.Shard.Reads.md): Shard read-path handlers: ETS hot lookup, cold-key pread from Bitcask, exists check, and key enumeration.
- [Ferricstore.Store.Shard.Transaction](Ferricstore.Store.Shard.Transaction.md): Executes a queued MULTI/EXEC command batch inside a shard using a local transaction store.
- [Ferricstore.Store.Shard.Writes](Ferricstore.Store.Shard.Writes.md): Shard-local write handlers.
- [Ferricstore.Store.ShardSupervisor](Ferricstore.Store.ShardSupervisor.md): Supervises all `Ferricstore.Store.Shard` GenServers.
- [Ferricstore.Store.SlotMap](Ferricstore.Store.SlotMap.md): Manages the 1,024-slot to shard-index mapping.
- [Ferricstore.Store.TypeRegistry](Ferricstore.Store.TypeRegistry.md): Manages type metadata for Redis keys that hold data structures.
- [Ferricstore.Store.ValueCodec](Ferricstore.Store.ValueCodec.md): Shared helpers for parsing, formatting, and encoding values.
- [Ferricstore.Store.WriteVersion](Ferricstore.Store.WriteVersion.md): Per-shard atomic write version counters for WATCH/EXEC support.
- [Ferricstore.TDigest.Core](Ferricstore.TDigest.Core.md): Pure functional t-digest data structure for accurate on-line accumulation of
rank-based statistics such as quantiles, trimmed means, and cumulative
distribution values.
- [Ferricstore.Transaction.Coordinator](Ferricstore.Transaction.Coordinator.md): Transaction coordinator for MULTI/EXEC.
- [Ferricstore.Waiters](Ferricstore.Waiters.md): BEAM waiter registry for blocking list commands (BLPOP, BRPOP, BLMOVE, BLMPOP).

## Mix Tasks

- [mix ferricstore.config](Mix.Tasks.Ferricstore.Config.md): Manages FerricStore namespace configuration from the command line.
- [mix ferricstore.info](Mix.Tasks.Ferricstore.Info.md): Displays FerricStore node status including uptime, shard count, key count,
memory usage, and Raft consensus status.
- [mix ferricstore.keys](Mix.Tasks.Ferricstore.Keys.md): Lists keys stored in FerricStore, with optional glob pattern filtering.
- [mix ferricstore.merge](Mix.Tasks.Ferricstore.Merge.md): Triggers a manual merge/compaction check on one or all FerricStore shards.
- [mix ferricstore.recovery_kill9](Mix.Tasks.Ferricstore.RecoveryKill9.md): Runs a manual kill-9 recovery benchmark in a separate BEAM OS process.

