{
  "id": "type-n40",
  "revision": "268c43c78bf9bca0244fdd793e30eba0a4392e6d0a40ad703b0e138daca41c9b",
  "regions": [
    {
      "id": "control-plane",
      "label": "Control plane",
      "parent": null
    },
    {
      "id": "runtime",
      "label": "Runtime",
      "parent": null
    },
    {
      "id": "storage",
      "label": "Storage",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "controller",
      "label": "Service migration controller",
      "kind": "N40",
      "region": "control-plane",
      "ports": [
        {
          "id": "prepare",
          "profile": "P21",
          "contract": "PrepareServiceActivationV1",
          "polarity": "Offer"
        },
        {
          "id": "drain",
          "profile": "P21",
          "contract": "DrainServiceActivationV1",
          "polarity": "Offer"
        },
        {
          "id": "evidence",
          "profile": "P24",
          "contract": "CandidateAdmissionEvidenceV1",
          "polarity": "Require"
        },
        {
          "id": "switch",
          "profile": "P09",
          "contract": "CompareRouteEpochV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "old",
      "label": "Old service activation",
      "kind": "N27",
      "region": "runtime",
      "ports": [
        {
          "id": "drain",
          "profile": "P21",
          "contract": "DrainServiceActivationV1",
          "polarity": "Require"
        },
        {
          "id": "handoff",
          "profile": "P22",
          "contract": "ServiceEpochHandoffV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "next",
      "label": "Candidate service activation",
      "kind": "N27",
      "region": "runtime",
      "ports": [
        {
          "id": "prepare",
          "profile": "P21",
          "contract": "PrepareServiceActivationV1",
          "polarity": "Require"
        },
        {
          "id": "restore",
          "profile": "P22",
          "contract": "ServiceStateMigrationV2",
          "polarity": "Require"
        },
        {
          "id": "handoff",
          "profile": "P22",
          "contract": "ServiceEpochHandoffV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "state",
      "label": "Service state authority",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "migrate",
          "profile": "P22",
          "contract": "ServiceStateMigrationV2",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "router",
      "label": "Epoch-fenced service router",
      "kind": "N15",
      "region": "runtime",
      "ports": [
        {
          "id": "epoch",
          "profile": "P22",
          "contract": "ServiceEpochHandoffV1",
          "polarity": "Offer"
        },
        {
          "id": "switch",
          "profile": "P09",
          "contract": "CompareRouteEpochV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "evidence",
      "label": "Admission evidence",
      "kind": "N37",
      "region": "control-plane",
      "ports": [
        {
          "id": "cut",
          "profile": "P24",
          "contract": "CandidateAdmissionEvidenceV1",
          "polarity": "Offer"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "prepare",
      "kind": "H03",
      "incidences": [
        {
          "node": "controller",
          "port": "prepare",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "next",
          "port": "prepare",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "drain",
      "kind": "H03",
      "incidences": [
        {
          "node": "controller",
          "port": "drain",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "old",
          "port": "drain",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "restore",
      "kind": "H05",
      "incidences": [
        {
          "node": "next",
          "port": "restore",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "state",
          "port": "migrate",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "check",
      "kind": "H02",
      "incidences": [
        {
          "node": "evidence",
          "port": "cut",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "controller",
          "port": "evidence",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "switch",
      "kind": "H35",
      "incidences": [
        {
          "node": "old",
          "port": "handoff",
          "role": "old",
          "ordinal": 0
        },
        {
          "node": "next",
          "port": "handoff",
          "role": "new",
          "ordinal": 0
        },
        {
          "node": "router",
          "port": "epoch",
          "role": "authority",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "route",
      "kind": "H05",
      "incidences": [
        {
          "node": "controller",
          "port": "switch",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "router",
          "port": "switch",
          "role": "callee",
          "ordinal": 0
        }
      ]
    }
  ]
}
