Skip to content

feature, add VOL connector wrapping (H5Pset_vol + connector lookup) #281

@steven-varga

Description

@steven-varga

Summary

Wrap the HDF5 1.12 VOL (Virtual Object Layer) connector framework so users can register, look up, and select alternative storage backends through h5cpp.

Background

HDF5 1.12 stabilised the VOL connector API — pluggable storage backends that can replace or wrap the native HDF5 file format. Examples in the wild: the pass-through VOL (forwards to native), the DAOS VOL (object storage), the Rest VOL (REST-API-backed), the async VOL (the connector layer the async event set sits on top of).

Today h5cpp has no wrapper for any of these APIs. The only acknowledgement in the tree is a backward-compat comment in h5cpp/H5Pall.hpp:377 mentioning H5Pset_vol() — no h5::vol_t descriptor, no h5::set_vol() builder, no connector lookup. Users on a VOL-enabled HDF5 build must drop to the C API to select anything other than the native VFD.

This is the single largest architectural feature missing from h5cpp's 1.12 coverage. Filing it explicitly so the v1.12 surface gap isn't tracked only by the absence of an issue.

HDF5 APIs to wrap

Connector registration / lookup

  • H5VLregister_connector_by_name, H5VLregister_connector_by_value
  • H5VLis_connector_registered_by_name, H5VLis_connector_registered_by_value
  • H5VLfind_connector_by_name, H5VLfind_connector_by_value
  • H5VLget_connector_id_by_name, H5VLget_connector_id_by_value
  • H5VLget_connector_name
  • H5VLclose, H5VLunregister_connector

FAPL integration

  • H5Pset_vol, H5Pget_vol_id, H5Pget_vol_info
  • H5Pset_vol_cap_flags (1.12.1+)

Proposed h5cpp API

// Identify a connector — either by registered name ("daos", "rest", "pass-through")
// or by numeric type value.
h5::vol_t pass = h5::vol::by_name("pass-through");
h5::vol_t daos = h5::vol::by_value(0x504F);

// Compose into a FAPL like any other property.
h5::fapl_t fapl = h5::default_fapl | h5::vol{pass};
h5::fd_t fd = h5::create("file.h5", H5F_ACC_TRUNC, h5::default_fcpl, fapl);

// Query the VOL a handle is using.
auto name = h5::vol_name(fd);   // "native", "pass-through", …

Acceptance criteria

  • h5::vol_t opaque descriptor with RAII close
  • h5::vol::by_name(...) / h5::vol::by_value(...) factories backed by H5VLfind_connector_by_*
  • FAPL composition via operator| (matches h5::ros3, h5::threads{N} pattern)
  • h5::vol_name(fd|gr|ds) query helper using H5VLget_connector_name
  • Unit test using the always-available pass-through VOL so CI can exercise the wrapper without external dependencies
  • Documentation entry describing the connector model and how to install third-party VOLs

Out of scope

  • Implementing a new VOL connector (this issue only wraps the registration / selection APIs).
  • VOL connector capabilities introspection (H5VLget_cap_flags) — separate follow-up if needed.
  • Async event set (H5ES*, HDF5 1.13+) which builds on VOL but is post-1.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions