{
  "id": "type-h04",
  "revision": "48d2f5d205fc08505bb15495eb85e59f4654f9773a81a9b3a35182e75f99391d",
  "regions": [
    {
      "id": "server",
      "label": "Server",
      "parent": null
    },
    {
      "id": "broker",
      "label": "Broker",
      "parent": null
    },
    {
      "id": "storage",
      "label": "Storage",
      "parent": null
    },
    {
      "id": "operations",
      "label": "Operations",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "publisher",
      "label": "Order event publisher",
      "kind": "N02",
      "region": "server",
      "ports": [
        {
          "id": "events",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "topic",
      "label": "GCP order topic",
      "kind": "N24",
      "region": "broker",
      "ports": [
        {
          "id": "publish",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Neutral"
        },
        {
          "id": "events",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "subscription",
      "label": "Billing subscription",
      "kind": "N24",
      "region": "broker",
      "ports": [
        {
          "id": "events",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Neutral"
        },
        {
          "id": "ack",
          "profile": "P03",
          "contract": "OrderSubscriptionAckV1",
          "polarity": "Offer"
        },
        {
          "id": "failed",
          "profile": "P04",
          "contract": "FailedOrderDeliveryV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "worker",
      "label": "Invoice worker",
      "kind": "N06",
      "region": "server",
      "ports": [
        {
          "id": "events",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Require"
        },
        {
          "id": "commit",
          "profile": "P09",
          "contract": "IdempotentInvoiceWriteV1",
          "polarity": "Require"
        },
        {
          "id": "ack",
          "profile": "P03",
          "contract": "OrderSubscriptionAckV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "invoice",
      "label": "Invoice authority",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "write",
          "profile": "P09",
          "contract": "IdempotentInvoiceWriteV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "dead",
      "label": "Dead-letter review",
      "kind": "N20",
      "region": "operations",
      "ports": [
        {
          "id": "review",
          "profile": "P04",
          "contract": "FailedOrderDeliveryV1",
          "polarity": "Require"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "publish",
      "kind": "H04",
      "incidences": [
        {
          "node": "publisher",
          "port": "events",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "topic",
          "port": "publish",
          "role": "broker",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "subscription",
      "kind": "H04",
      "incidences": [
        {
          "node": "topic",
          "port": "events",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "subscription",
          "port": "events",
          "role": "subscription",
          "ordinal": 0
        },
        {
          "node": "worker",
          "port": "events",
          "role": "subscriber",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "commit",
      "kind": "H05",
      "incidences": [
        {
          "node": "worker",
          "port": "commit",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "invoice",
          "port": "write",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "ack",
      "kind": "H05",
      "incidences": [
        {
          "node": "worker",
          "port": "ack",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "subscription",
          "port": "ack",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "dead-letter",
      "kind": "H04",
      "incidences": [
        {
          "node": "subscription",
          "port": "failed",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "dead",
          "port": "review",
          "role": "subscriber",
          "ordinal": 0
        }
      ]
    }
  ]
}
