hgraph-web
C++-first HTTP/S and WebSocket transports for hgraph, implementing the contract in hgraph RFC 0024. The extension covers all four transports — HTTP(S) server, HTTP(S) client, WebSocket server, and WebSocket client — and exposes the same service model to native C++ and Python graphs.
One path-bound, multi-interface service_impl owns the sockets, TLS contexts,
and worker threads for a configuration. Serving a route and connecting a
WebSocket are subscription services keyed by the immutable route or connection
key; responding, sending frames, and calling a remote endpoint are
request/reply services; events and statistics are reference services. Graph
output reaches the transport through the implementation's sink inputs, and
requests, frames, delivery reports, events, and stats re-enter the root graph
through bounded push sources. Listeners and clients are created on graph start
and stopped with the graph; there is no user-held server or client object.
Routing lives in the transport rather than the graph. The route key set arrives
as TSS deltas, is compiled into a native route table, and requests are
delivered already keyed by route. Duplicate and ordered headers, multi-value
query parameters, and binary bodies are preserved end to end.
The server speaks HTTP/1.1 and WebSocket over Asio/Beast; the client speaks
HTTP/1.1, HTTP/2, and WebSocket over libcurl. The server ships the complete
HTTP/2 seam — the ALPN callback, protocol dispatch, and configuration
placeholders — and rejects h2 in server ALPN until the nghttp2 session lands
in a v1.x release. TLS termination, mTLS, SNI, and ALPN use OpenSSL on every
platform.
The core hgraph wheel owns a guarded compatibility shim at
hgraph.adaptors.web which delegates to this extension when it is installed.
The released hgraph.adaptors.tornado package is unchanged; whether it is
later re-pointed or deprecated is a separate migration decision. The extension
wheel installs only hgraph_web; it never contributes files to the core
hgraph package.
Status
The HTTP/1.1, HTTP/2 client, and WebSocket service implementations, schemas,
service interfaces, endpoint decorators, and codec helpers are available.
Runnable HTTP server/client and WebSocket loopback examples are in
python/examples.
Build and test
This is a first-party extension in the hgraph monorepo. It remains a separate CMake package and Python distribution: the top-level core package does not link curl, Boost, nghttp2, or OpenSSL, and does not install these modules.
For an in-tree native development build from the repository root:
cmake -S . -B build-web \
-DHGRAPH_BUILD_WEB_EXTENSION=ON \
-DBUILD_TESTING=ON
cmake --build build-web --parallel
ctest --test-dir build-web --output-on-failure
The extension can still be configured independently against an installed hgraph SDK:
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/hgraph/install
cmake --build build --parallel
ctest --test-dir build --output-on-failure
Each third-party dependency arrives with the translation unit that links it,
resolved with find_package(... CONFIG QUIET) first and falling back to a
pinned static FetchContent build. The skeleton links only hgraph::core.
Build its separately deployable ABI3 wheel from the repository root after
making the matching hgraph SDK discoverable through CMAKE_PREFIX_PATH:
CMAKE_PREFIX_PATH=/path/to/hgraph/sdk \
uv build --wheel --package hgraph-web --python 3.12
The deterministic suite runs against the extension's fake transport, which exercises routing, pacing, reservation, and lifecycle without sockets. A live loopback subset acts as the transport oracle.
Wheel builds require the SDK installed by a stable-ABI hgraph wheel. The
extension rejects an SDK that links Python::Python, because that would pin
the nominal ABI3 module to the build interpreter.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hgraph_web-0.8.22.tar.gz.
File metadata
- Download URL: hgraph_web-0.8.22.tar.gz
- Upload date:
- Size: 202.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a71e1a5cbbf80089ee07a733bf5e5cfe09eb72d3103fa0e1185a7060b8e80ca
|
|
| MD5 |
e18749ff37860eeb5e768238d28dba7d
|
|
| BLAKE2b-256 |
c284f51a6ee31fb9bd4979db7261a78bc1cdc2f907b6719ff5742d1dc87268a5
|
Provenance
The following attestation bundles were made for hgraph_web-0.8.22.tar.gz:
Publisher:
release-wheels.yml on hhenson/hgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgraph_web-0.8.22.tar.gz -
Subject digest:
8a71e1a5cbbf80089ee07a733bf5e5cfe09eb72d3103fa0e1185a7060b8e80ca - Sigstore transparency entry: 2684134260
- Sigstore integration time:
-
Permalink:
hhenson/hgraph@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Branch / Tag:
refs/tags/0.8.22 - Owner: https://github.com/hhenson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-wheels.yml@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hgraph_web-0.8.22-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: hgraph_web-0.8.22-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6722b5fce3c895798f46f4230e96cdf147af58d98bb55c5b191fa6494772c3f4
|
|
| MD5 |
96d8bdd70fae57b5062ccd9730ef7bf7
|
|
| BLAKE2b-256 |
4b42d7d037d1729f7eb3420305e81dbfac6985cfbc45617de229b00ca9829f61
|
Provenance
The following attestation bundles were made for hgraph_web-0.8.22-cp312-abi3-win_amd64.whl:
Publisher:
release-wheels.yml on hhenson/hgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgraph_web-0.8.22-cp312-abi3-win_amd64.whl -
Subject digest:
6722b5fce3c895798f46f4230e96cdf147af58d98bb55c5b191fa6494772c3f4 - Sigstore transparency entry: 2684134268
- Sigstore integration time:
-
Permalink:
hhenson/hgraph@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Branch / Tag:
refs/tags/0.8.22 - Owner: https://github.com/hhenson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-wheels.yml@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hgraph_web-0.8.22-cp312-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: hgraph_web-0.8.22-cp312-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6acb68ce8f0213c51a669b6e1c38aa369dad6e703072b7559212b481f3237931
|
|
| MD5 |
51636f9723f49e9b018cffd70ba4cce7
|
|
| BLAKE2b-256 |
fc8d86d96d3f169a3fa7980f5c1da87881de95f164c3d0fa1e31233cdaf0270b
|
Provenance
The following attestation bundles were made for hgraph_web-0.8.22-cp312-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release-wheels.yml on hhenson/hgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgraph_web-0.8.22-cp312-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
6acb68ce8f0213c51a669b6e1c38aa369dad6e703072b7559212b481f3237931 - Sigstore transparency entry: 2684134292
- Sigstore integration time:
-
Permalink:
hhenson/hgraph@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Branch / Tag:
refs/tags/0.8.22 - Owner: https://github.com/hhenson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-wheels.yml@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hgraph_web-0.8.22-cp312-abi3-macosx_15_0_arm64.whl.
File metadata
- Download URL: hgraph_web-0.8.22-cp312-abi3-macosx_15_0_arm64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.12+, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82bc9ef8511837cf67ab83bccd3086ae466ef284c5a503bc1b640c2153740a86
|
|
| MD5 |
98b4808723b322280700cc15ec10bd01
|
|
| BLAKE2b-256 |
50b4a3150ad224277e5f11d78d36f47e4184e975917ffb2b740e6997d5b9ce5e
|
Provenance
The following attestation bundles were made for hgraph_web-0.8.22-cp312-abi3-macosx_15_0_arm64.whl:
Publisher:
release-wheels.yml on hhenson/hgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hgraph_web-0.8.22-cp312-abi3-macosx_15_0_arm64.whl -
Subject digest:
82bc9ef8511837cf67ab83bccd3086ae466ef284c5a503bc1b640c2153740a86 - Sigstore transparency entry: 2684134274
- Sigstore integration time:
-
Permalink:
hhenson/hgraph@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Branch / Tag:
refs/tags/0.8.22 - Owner: https://github.com/hhenson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-wheels.yml@cd053a351ac7416fcec4fbccc464d92f03a3c000 -
Trigger Event:
push
-
Statement type: