# ferricstore v0.3.4 - Table of Contents

## Pages

- Guides
  - [Getting Started](getting-started.md)
  - [Embedded Mode](embedded-mode.md)
  - [Standalone Mode](standalone-mode.md)
  - [Commands Reference](commands.md)
  - [Configuration Reference](configuration.md)
  - [Architecture](architecture.md)
  - [Deployment Guide](deployment.md)
  - [Security](security.md)
  - [Extensions](extensions.md)
  - [Best Practices](best-practices.md)
  - [Comparison with Other Stores](comparison.md)

## Modules

- [:ferricstore_wal_nif](:ferricstore_wal_nif.md): Rust NIF WAL I/O module for ra_log_wal.
- [FerricStore](FerricStore.md): Module-based cache instances for FerricStore.
- [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.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.Commands.Bitmap](Ferricstore.Commands.Bitmap.md): Handles Redis bitmap commands: SETBIT, GETBIT, BITCOUNT, BITPOS, BITOP.
- [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.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.
- [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.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.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.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 (prefix) runtime configuration.
- [Ferricstore.PubSub](Ferricstore.PubSub.md): ETS-based Pub/Sub registry for FerricStore.
- [Ferricstore.RaFileInstrument](Ferricstore.RaFileInstrument.md): Instruments ra_file:sync/1 to collect timing data about WAL fsync calls.
- [Ferricstore.Raft.Batcher](Ferricstore.Raft.Batcher.md): Namespace-aware group commit batcher for a single FerricStore shard.
- [Ferricstore.Raft.Cluster](Ferricstore.Raft.Cluster.md): Manages the ra Raft cluster for FerricStore shards.
- [Ferricstore.Raft.StateMachine](Ferricstore.Raft.StateMachine.md): Ra state machine for a single FerricStore shard.
- [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.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.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.RmwCoordinator](Ferricstore.Store.RmwCoordinator.md): Per-shard fallback for async read-modify-write (RMW) commands under
contention.
- [Ferricstore.Store.Router](Ferricstore.Store.Router.md): Routes keys to shard GenServers using consistent hashing via `:erlang.phash2/2`.
- [Ferricstore.Store.Shard](Ferricstore.Store.Shard.md): GenServer managing one Bitcask partition backed by an ETS hot-read cache.
- [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 write-path handlers: put, delete, incr, append, getset, getdel, getex, and setrange with async flush and Raft support.
- [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 compile.patched_wal](Mix.Tasks.Compile.PatchedWal.md): Mix compiler task that builds the patched ra_log_wal.erl to .beam for WAL write optimizations.
- [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.

