HPPR HELLO and Endpoint Metadata

Tags: wire, command-flow, metadata

© R.A.Sol

🖧HELLO returns endpoint metadata. It tells the client which command flow this endpoint uses, which commands are accepted on that flow, and which other transport endpoints are reachable.

The generic HELLO request packet is defined in 030.

HELLO Response Shape

A HELLO response is a Null packet:

🖧: 0.H3
Command-Flow: session|message
[Session-Commands: <command-entry> *( " | " <command-entry> )]*
[Message-Commands: <command-entry> *( " | " <command-entry> )]*
[Allow-Null-Command: 0|1]
[Transport: <via> [hints...]]*
[Header: value]*
Data-Length: 0

Other HELLO headers are endpoint-specific or service-specific. The HPPR Repository Service adds repository fields such as Session-ID, Repo-Name, Seal-By, and PHC in 043 and 044.

Command-Flow

Command-Flow names the command execution flow advertised by this HELLO response.

Known values:

Flow Meaning
session connection-local HELLO session, session-bound non-HELLO requests
message one complete request message returns one complete response message

Rules:

Command Capability Headers

Command capability uses flow-specific command-list headers:

Session-Commands: 🖧GET 1 | 🖧STORE 1 | 🖧WATCH 1
Message-Commands: 🖧HELLO 1 | 🖧GET 1 | 🖧INGEST 1

Rules:

Formal grammar:

Session-Commands = command-entry *( " | " command-entry )
Message-Commands = command-entry *( " | " command-entry )
command-entry = command-name SP version *(SP option)
version = non-empty base-10 integer
option = non-empty token without SP or the literal separator " | "

Allow-Null-Command

Allow-Null-Command is a boolean capability for trusted local command envelopes.

Rules:

Transport

Transport advertises reachable transport endpoints:

Transport: tcp:4777 flow=session
Transport: quib:4776 flow=session
Transport: ws:4778 flow=session
Transport: http:4778 flow=message path=/hppr
Transport: udp:4777 flow=message

Rules:

Common Endpoint Headers

The following headers are common conventions. Services define whether they are required for that service.

Header Meaning
Seal-By endpoint or repository verifier, or 0 when none exists
Format packet and envelope format identifier; value H3
Status endpoint status; ok indicates success or readiness
Extension endpoint extension token; semantics are endpoint-specific