Skip to content

[M4] Python custom engine (trampoline) #28

Description

@tetsuh

Summary

Support custom storage engines written in Python via a nanobind trampoline.

References

  • docs/05_api_python.md §2.3 (custom engine contract)
  • docs/01_requirements.md X01, N03

Scope

  • python/bindings/storage_engine_trampoline.cpp: subclass
    sitos.StorageEngine in Python implementing
    put/get/list/delete (and optional take_snapshot)
  • Missing take_snapshot falls back to the copy-based default (N03)
  • GIL handling documented: node calls into Python engines take the GIL;
    production guidance (prefer C++ engines) in the docstring
  • pytest version of the engine contract suite, instantiated with a
    Python dict-based engine (tests/python/test_custom_engine.py)

Out of scope

  • Performance parity with C++ engines

Acceptance Criteria

  1. A pure-Python engine passes the pytest contract suite
  2. Snapshot isolation holds via the fallback for engines without
    take_snapshot
  3. A StorageNode running on a Python engine serves gets/puts end-to-end

Dependencies

For the implementer

  • Copy the checklist above into your PR description and tick items as you
    complete them. Do not edit the checklist in this issue.
  • Follow docs/development_workflow.md (branch issue/28-python-custom-engine,
    Conventional Commits per §2.1, TDD RED first).
  • This issue is closed automatically by the PR via Closes #28.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pythonPython bindings and packagingtype:featNew feature or capability

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions