Skip to main content
Source baselineNereuscommit c820391dc1de·verified 2026-08-07·authority reader-facing-summary

Module boundaries

The repository separates protocol-neutral storage contracts from provider implementations and protocol adapters. The important rule is directional: protocol types map down to neutral values; they must not leak back into nereus-core or nereus-api.

Responsibilities

ModuleOwnsBoundary rule
nereus-apiStreamStorage, IDs, append/read values, profiles, targets, trim/seal/delete optionsMust not depend on Pulsar, Kafka, BookKeeper client, or an Object SDK
nereus-coreAppend lane/session, primary-WAL registry, stable commit, generation-0 materialization, recovery, read, trim, lifecycle, provider-neutral physical-reference SPIMay know neutral BookKeeper target shapes, not RecordBatch or ManagedLedger types
nereus-metadata-oxiaOxia keyspace, records/codecs/stores for head, commit, index, session, task, checkpoint, root, cursor, projection, binding, scan/watch/CASHydrates durable records into canonical in-memory models
nereus-object-storeObject provider API, S3-compatible provider, Object WAL, range read, HEAD, guarded/replayable upload, checksums, conditional deleteExposes provider-neutral results upward
nereus-bookkeeperLedger namespace, allocator/recovery, writer/reservation, primary WAL, reader leases, materialization source, whole-ledger retention, activationUses BookKeeper public API without ManagedLedger types
nereus-materializationPolicy/planner/task, worker/staging/publication, generation allocator/index, NCP/NTC formats, recovery checkpoints, source retirement, physical roots/protection/pins/GCDepends on core contracts; core does not depend on one worker implementation
nereus-managed-ledgerPulsar-compatible facade, projection/virtual Position, ManagedLedger/ManagedCursor mapping, owner/hydration/snapshot/retention handoffConverts Pulsar values to neutral API values
nereus-pulsar-adapterBroker config, storage-class binding, runtime/readiness, policies, admin route, lifecycle assemblyOwns Pulsar runtime wiring, not L0 commit truth
nereus-kafka-adapterNative Kafka activation/binding, RecordBatch Produce/Fetch, leader authority, checkpoint/recovery, DeleteRecords, NTC2, admissionKafka server/common types stay here or in the Kafka fork
nereus-kop-adapterKoP-facing isolation boundaryMust not depend on Native Kafka adapter or read its projection formats
nereus-bomModule and external dependency versionsKeeps adapter composition aligned

Dependency direction

The diagram describes allowed conceptual direction, not a license for cyclic implementation dependencies. Adapters can compose provider runtimes, but a provider response must be reduced to a protocol-neutral target, outcome, or typed error before it crosses into the shared core.

Review rules

When a change crosses a module boundary, verify:

  1. protocol-specific values are translated at the adapter/facade edge;
  2. the shared core still owns the logical head and commit linearization;
  3. provider-specific retries preserve exact identity and outcome semantics;
  4. metadata codecs hydrate legacy and current records into one canonical model;
  5. tests do not pass because a protocol adapter accidentally bypassed the core contract.

Source anchors