Skip to content

d-engine-core hard-codes KV Command type — prevents use as a general-purpose Raft consensus library #416

Description

@JoshuaChi

d-engine-core is positioned as the pure Raft consensus layer:
a reusable foundation that any distributed application can embed directly, independent of data model or storage semantics.

This positioning is currently broken. d-engine-core hard-codes a KV-specific Command type (Insert / Delete / CAS) as the unit delivered to every StateMachine implementation. Any consumer that needs different application semantics cannot use d-engine-core directly — it must route through d-engine-server's fixed KV
abstractions, even when those abstractions do not fit its data model.

TypeConfig already demonstrates the intended design: StorageEngine, StateMachine, Transport are all pluggable. The application command type (EngineCommand) is the missing pluggable piece.

Until this is resolved:

  • Upper-layer libraries (e.g. d-lmdb) with custom command semantics
    are forced through d-engine-server's KV API.
  • New operation variants must be added to d-engine-core's fixed enum
    even when they belong to the server layer.
  • d-engine-core cannot be adopted by applications that do not want
    KV semantics at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:client-kvCore KV API — get, put, delete, batch write, scan, range queries.component:kv-storeDesign and evolution of the KV storage layer above d-engine (schema, keyspace conventions).component:protoIssues related to d-engine-proto crate (protobuf definitions, gRPC APIs, wire protocol)component:raft-statemachineState machine semantics, apply pipeline, RocksDB/File state machine implementations.concern:scalabilityBehavior under large cluster size, high entry count, or long-running deployments.type:enhancementNew feature or request for improvementtype:refactorCode restructuring without changing external behavior

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions