The Roger Protocol

Node Discovery

How clients discover node version, features, limits and configuration

Overview

Nodes expose discovery informations (such as current version, supported versions, features configuration and limits) to help clients know wheather or not they are compatible with it and what features are available, their configuration and their limits.

There are 2 different discovery routes:

  • /_roger/version: An unversioned route that allows the client to fetch the node's identity (name, description) as well as it's current version and supported versions
  • /_roger/v#/features: Unlike the version route, the features route is versioned. It exposes the node supported features and their configuration as a key-value pair dictionary mapping feature names to their configuration (such as rate-limiting thresholds, upload limits, oauth public keys...)

Discovery Sequence

  1. Check Version: Call /_roger/version to verify node compatibility
  2. Fetch Configuration: Call /_roger/v#/features with the supported major version of choice to retrieve the node configuration and limits
  3. Configure the Client: Cache the responses and adjust client-side rules accordingly

Client Notes

  • Ignore Unknown Keys: Because different nodes can run different minor versions, your client might encounter unknown configuration keys that it doesn't support yet
  • Notify the user on version missmatch: If your client runs on a major version that isn't supported by the node, display a clear prompt to the user showing the version missmatch
  • Set a timeout on the config: Refetch the config after a certain period of time to stay up to date with the node.