← All procedures

systems.timers

The verdicts of the timer law for the timer settings of an application

CLI
Package
@procedures/systems · README
Path
["systems","timers"]
CLI
mark systems timers
As data
{"$proc":["systems","timers"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/systems/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["systems","timers"], {});
console.log(JSON.stringify(result));

From the command line

$ mark systems timers

As data, in a program

{ "$proc": ["systems", "timers"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
perAttemptMsnumbernoThe time of one try (resilience perAttempt), in milliseconds
overallMsnumbernoThe time of a call with its retries (resilience overall), in milliseconds
retryobjectnoThe settings of the retry
circuitBreakerobjectnoThe settings of the circuit breaker
webSocketClientobjectnoThe settings of the WebSocket client
webSocketServerobjectnoThe settings of the WebSocket server
idempotencyTtlMsnumbernoThe time that the server keeps the result of a keyed write, in milliseconds

Output

FieldTypeRequiredDefaultDescription
okbooleanyesTrue when no rule is violated
findingsobject[]yesThe verdict of each rule
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "perAttemptMs": {
        "description": "The time of one try (resilience perAttempt), in milliseconds",
        "type": "number",
        "minimum": 0
      },
      "overallMs": {
        "description": "The time of a call with its retries (resilience overall), in milliseconds",
        "type": "number",
        "minimum": 0
      },
      "retry": {
        "description": "The settings of the retry",
        "type": "object",
        "properties": {
          "maxRetries": {
            "description": "The tries after the first one",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "retryDelayMs": {
            "description": "The first backoff, in milliseconds",
            "type": "number",
            "minimum": 0
          },
          "backoffMultiplier": {
            "description": "The factor of each next backoff",
            "type": "number",
            "minimum": 1
          },
          "maxDelayMs": {
            "description": "The longest backoff, in milliseconds",
            "type": "number",
            "minimum": 0
          }
        }
      },
      "circuitBreaker": {
        "description": "The settings of the circuit breaker",
        "type": "object",
        "properties": {
          "resetTimeoutMs": {
            "description": "The time that the breaker stays open, in milliseconds",
            "type": "number",
            "minimum": 0
          }
        }
      },
      "webSocketClient": {
        "description": "The settings of the WebSocket client",
        "type": "object",
        "properties": {
          "requestTimeoutMs": {
            "description": "The time until the first frame of a call, in milliseconds",
            "type": "number",
            "minimum": 0
          },
          "heartbeatIntervalMs": {
            "description": "The time between two pings, in milliseconds",
            "type": "number",
            "minimum": 0
          },
          "heartbeatTimeoutMs": {
            "description": "The time that the client waits for a pong, in milliseconds",
            "type": "number",
            "minimum": 0
          },
          "heartbeatMisses": {
            "description": "The pongs that can go missing before the connection closes",
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        }
      },
      "webSocketServer": {
        "description": "The settings of the WebSocket server",
        "type": "object",
        "properties": {
          "heartbeatIntervalMs": {
            "description": "The time between two pings of the server, in milliseconds",
            "type": "number",
            "minimum": 0
          },
          "heartbeatMisses": {
            "description": "The pongs that can go missing before the server closes the connection",
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "reverseRequestTimeoutMs": {
            "description": "The time until the first frame of a call of the server to a client, in milliseconds",
            "type": "number",
            "minimum": 0
          }
        }
      },
      "idempotencyTtlMs": {
        "description": "The time that the server keeps the result of a keyed write, in milliseconds",
        "type": "number",
        "minimum": 0
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean",
        "description": "True when no rule is violated"
      },
      "findings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "rule": {
              "type": "string",
              "description": "The id of the rule"
            },
            "verdict": {
              "type": "string",
              "enum": [
                "holds",
                "violated",
                "unbounded",
                "depends"
              ],
              "description": "The verdict of the rule"
            },
            "statement": {
              "type": "string",
              "description": "The rule in words"
            },
            "window": {
              "description": "What goes wrong when the rule is violated",
              "type": "string"
            },
            "evaluated": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "lhs": {
                    "description": "The left side, in seconds",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "rhs": {
                    "description": "The right side, in seconds",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "margin": {
                    "type": "number",
                    "description": "The margin, in seconds"
                  },
                  "holds": {
                    "description": "True when the inequality holds. Null: a symbol has no value.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "lhs",
                  "rhs",
                  "margin",
                  "holds"
                ],
                "additionalProperties": false
              },
              "description": "Each inequality of the rule"
            },
            "unbound": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The symbols without a value"
            }
          },
          "required": [
            "rule",
            "verdict",
            "statement",
            "evaluated",
            "unbound"
          ],
          "additionalProperties": false
        },
        "description": "The verdict of each rule"
      }
    },
    "required": [
      "ok",
      "findings"
    ],
    "additionalProperties": false
  }
}