Unified Resource Coordinate

Tags: packet, addressing

© R.A.Sol

HPPR supports two address forms:

Hash addresses are immutable. Coordinate addresses are time-dependent and may resolve to different packets as new packets are stored.

A versioned coordinate pins one exact packet.

Terms

Coordinate Syntax

Coordinate form:

//<group>/<api>//<key>

Rules:

Examples:

Coordinate Group API Key
//u/docs//index.html u docs index.html
//lab.eu/chat/message//room-7/1 lab.eu chat/message room-7/1
//lab.eu/chat//message/room-7/1 lab.eu chat message/room-7/1

The API/Key boundary is a design choice. API names should be finite, developer-defined protocol surfaces. Key names may be unbounded, data-defined, or instance-specific.

Version Selectors

Multiple packets can share one coordinate. Add /|/... to select a version.

Example

Packet:

🖧: P.EXAMPLE~HASH~EXAMPLE~HASH~EXAMPLE~HASH~EX.H3
Group: a-group
API: some-api
Key: our-collection/item
TAI: 1640995200:123000000
...

Addresses:

Get resolution

In the tables below, <key> is the Key header value and does not end with /. The <api> value does not end with /.

The tip is the latest packet at a coordinate. Tie-break order is highest TAI, then highest hash.

Path Gets
//<group>/<api>//<key> tip
//<group>/<api>//<key>/ tip
//<group>/<api>//<key>/| tip
//<group>/<api>//<key>/|/plex Plex tip
//<group>/<api>//<key>/|/plex/<tai> Plex tip at tai
//<group>/<api>//<key>/|/plex/<tai>/<hash> exact Plex
//<group>/<api>//<key>/|/seal Seal tip
//<group>/<api>//<key>/|/seal/<verifier> Seal tip for signer
//<group>/<api>//<key>/|/seal/<verifier>/<tai> signer Seal tip at tai
//<group>/<api>//<key>/|/seal/<verifier>/<tai>/<hash> exact Seal

List resolution

LIST operates over two trees: the API tree and the Key tree for one exact API.

Path Lists
//<group>/ top-level API segments
//<group>/<api>/ API child segments, plus // when Key tree exists for exact API
//<group>/<api>// Key roots for exact API
//<group>/<api>//<key>/ Key children, plus |/ when present
//<group>/<api>//<key>/|/ plex/ and or seal/
//<group>/<api>//<key>/|/plex/ TAIs
//<group>/<api>//<key>/|/plex/<tai>/ hashes
//<group>/<api>//<key>/|/seal/ signer verification values
//<group>/<api>//<key>/|/seal/<verifier>/ TAIs
//<group>/<api>//<key>/|/seal/<verifier>/<tai>/ hashes

The // child in API listings is a boundary marker. It means packets exist under the exact API and their Key roots can be listed with //<group>/<api>//.

Parsing

Parsers MUST treat hash addressing as a separate branch before coordinate parsing.

hash-address = "////" hash-text
coordinate = "//" group "/" api "//" key [version-selector]

Reject malformed coordinates including:

| is forbidden in API and Key segments, so /|/ unambiguously starts version selection.