{
  "id": "game-authoritative",
  "revision": "355611235428e4fe1e1e808a16adc40d5b30dceb22333075b468d67392e037ba",
  "regions": [
    {
      "id": "client",
      "label": "Game clients"
    },
    {
      "id": "server",
      "label": "Authoritative game host"
    }
  ],
  "nodes": [
    {
      "id": "input",
      "label": "Player input",
      "kind": "N13",
      "region": "client",
      "ports": [
        {
          "id": "command",
          "profile": "P04",
          "contract": "PlayerCommandV1",
          "polarity": "Offer"
        },
        {
          "id": "intent",
          "profile": "P04",
          "contract": "InputIntentV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "prediction",
      "label": "Prediction / rendering",
      "kind": "N11",
      "region": "client",
      "ports": [
        {
          "id": "intent",
          "profile": "P04",
          "contract": "InputIntentV1",
          "polarity": "Require"
        },
        {
          "id": "authoritative",
          "profile": "P01",
          "contract": "GameSnapshotV1",
          "polarity": "Require"
        },
        {
          "id": "ack",
          "profile": "P24",
          "contract": "AckPositionV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "room",
      "label": "Authoritative room actor",
      "kind": "N05",
      "region": "server",
      "ports": [
        {
          "id": "command",
          "profile": "P04",
          "contract": "PlayerCommandV1",
          "polarity": "Require"
        },
        {
          "id": "physics",
          "profile": "P02",
          "contract": "SimulationStepV1",
          "polarity": "Require"
        },
        {
          "id": "tick",
          "profile": "P15",
          "contract": "TickV1",
          "polarity": "Require"
        },
        {
          "id": "snapshot",
          "profile": "P01",
          "contract": "GameSnapshotV1",
          "polarity": "Offer"
        },
        {
          "id": "event",
          "profile": "P04",
          "contract": "MatchEventV1",
          "polarity": "Offer"
        },
        {
          "id": "position",
          "profile": "P24",
          "contract": "TickPositionV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "physics",
      "label": "Simulation kernel",
      "kind": "N16",
      "region": "server",
      "ports": [
        {
          "id": "step",
          "profile": "P02",
          "contract": "SimulationStepV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "clock",
      "label": "Server tick clock",
      "kind": "N09",
      "region": "server",
      "ports": [
        {
          "id": "tick",
          "profile": "P15",
          "contract": "TickV1",
          "polarity": "Offer"
        },
        {
          "id": "clock",
          "profile": "P24",
          "contract": "ClockRefV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "log",
      "label": "Match event log",
      "kind": "N24",
      "region": "server",
      "ports": [
        {
          "id": "event",
          "profile": "P04",
          "contract": "MatchEventV1",
          "polarity": "Require"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "command",
      "kind": "H02",
      "incidences": [
        {
          "node": "input",
          "port": "command",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "room",
          "port": "command",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "predict",
      "kind": "H02",
      "incidences": [
        {
          "node": "input",
          "port": "intent",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "prediction",
          "port": "intent",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "simulate",
      "kind": "H05",
      "incidences": [
        {
          "node": "physics",
          "port": "step",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "room",
          "port": "physics",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "tick",
      "kind": "H02",
      "incidences": [
        {
          "node": "clock",
          "port": "tick",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "room",
          "port": "tick",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "snapshot",
      "kind": "H02",
      "incidences": [
        {
          "node": "room",
          "port": "snapshot",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "prediction",
          "port": "authoritative",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "log",
      "kind": "H02",
      "incidences": [
        {
          "node": "room",
          "port": "event",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "log",
          "port": "event",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "alignment",
      "kind": "H31",
      "incidences": [
        {
          "node": "clock",
          "port": "clock",
          "role": "clock",
          "ordinal": 0
        },
        {
          "node": "room",
          "port": "position",
          "role": "simulation",
          "ordinal": 1
        },
        {
          "node": "prediction",
          "port": "ack",
          "role": "client",
          "ordinal": 2
        }
      ]
    }
  ]
}
