Skip to main content

Generic Active Records Protocol Documentation

The wire protocol every GAR client and server speaks: the handshake, subscriptions and their filters, the binary and JSON encodings, batching, ownership, failed writes and termination.

Overview

The GAR protocol is a WebSocket-based messaging system built on top of TCP. It is used for streaming and snapshot-style data delivery and operates over a single bi-directional socket connection. When establishing a connection, clients must specify the subprotocol "gar-protocol":

Sec-WebSocket-Protocol: gar-protocol

How the pages fit

A session opens with an Introduction, then carries subscriptions one way and record writes both ways until it ends; each page below covers one part of that.

Subscriptions

A subscription names the classes, keys and topics a client wants and whether it is a one-shot snapshot or streaming; filters, the referencing-class list, exclusions, the class join and the nagle interval are all fields of it. The full reference is Subscriptions.

Auditing Topics (Control Port)

When running in audit mode (--ws-control-port <port>), GAR will emit internal topic traffic for monitoring

g Schema

Protocol Schema

  • af_unix_transport.md — local connections silently use AF_UNIX sockets rather than TCP loopback, and why a URL may resolve to unix:.
  • gar_pipelining.md — streaming records between endpoints in a shell pipeline, and the failure modes to watch for.

Deployment Schema

Features in this area

  • client libraries — Connecting to GAR from Python (pygar) and JavaScript (jsgar) over WebSocket.
  • subscription class join — Joining a subscription's key filter against another class's key set.
  • subscription query — Admitting a subscription's keys by what their records say: a schema-declared predicate with typed arguments, live membership, and where a proxy evaluates it.
  • key name list subscription — Making a subscription with a finite list of key names snapshot by direct lookup instead of scanning the class.
  • rpc — Calling a named GAR function and getting a structured reply.

Internals

The implementation record — every private section this page used to carry — is protocol_internals.md.

Metadata

Release files for pygar-client 4.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pygar-client 4.28.0
File Interpreter ABI Platform Actions
pygar_client-4.28.0-py3-none-any.whl Python 3 none any Details for pygar_client-4.28.0-py3-none-any.whl

Release files / pygar_client-4.28.0-py3-none-any.whl

Download URL pygar_client-4.28.0-py3-none-any.whl
Size 47.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8683d3f47c97d901ff4a3b8888bf0808a666cc03e1f91bd9ddd428350fd43030
BLAKE2b-256 checksum
How to use checksums
30549ed742a5522b3694736e0559a09f9f6a794a43a7ae2442200108ceea5fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for pygar-client 4.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.28.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page