{
  "id": "type-n23",
  "revision": "3c32ae9cfdb96477bc9358259b904ce0c5797dff0f87ce1dfa7e8febd482f0b6",
  "regions": [
    {
      "id": "server",
      "label": "Server",
      "parent": null
    },
    {
      "id": "database",
      "label": "Database",
      "parent": null
    },
    {
      "id": "broker",
      "label": "Broker",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "checkout",
      "label": "Checkout request",
      "kind": "N19",
      "region": "server",
      "ports": [
        {
          "id": "place",
          "profile": "P02",
          "contract": "PlaceOrderRequestReceiptV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "tx",
      "label": "Order unit of work",
      "kind": "N23",
      "region": "database",
      "ports": [
        {
          "id": "place",
          "profile": "P02",
          "contract": "PlaceOrderRequestReceiptV1",
          "polarity": "Offer"
        },
        {
          "id": "transaction",
          "profile": "P10",
          "contract": "PostgresOrderOutboxTransactionV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "order",
      "label": "Order table",
      "kind": "N21",
      "region": "database",
      "ports": [
        {
          "id": "transaction",
          "profile": "P10",
          "contract": "PostgresOrderOutboxTransactionV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "outbox",
      "label": "Outbox table",
      "kind": "N21",
      "region": "database",
      "ports": [
        {
          "id": "transaction",
          "profile": "P10",
          "contract": "PostgresOrderOutboxTransactionV1",
          "polarity": "Neutral"
        },
        {
          "id": "read",
          "profile": "P05",
          "contract": "CommittedOutboxCursorV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "dispatch",
      "label": "Outbox dispatcher",
      "kind": "N02",
      "region": "server",
      "ports": [
        {
          "id": "read",
          "profile": "P05",
          "contract": "CommittedOutboxCursorV1",
          "polarity": "Require"
        },
        {
          "id": "publish",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "topic",
      "label": "GCP Pub/Sub topic",
      "kind": "N24",
      "region": "broker",
      "ports": [
        {
          "id": "publish",
          "profile": "P04",
          "contract": "OrderPlacedEventV1",
          "polarity": "Require"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "place",
      "kind": "H05",
      "incidences": [
        {
          "node": "checkout",
          "port": "place",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "tx",
          "port": "place",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "atomic",
      "kind": "H16",
      "incidences": [
        {
          "node": "tx",
          "port": "transaction",
          "role": "authority",
          "ordinal": 0
        },
        {
          "node": "order",
          "port": "transaction",
          "role": "participant",
          "ordinal": 0
        },
        {
          "node": "outbox",
          "port": "transaction",
          "role": "participant",
          "ordinal": 1
        }
      ]
    },
    {
      "id": "read",
      "kind": "H05",
      "incidences": [
        {
          "node": "dispatch",
          "port": "read",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "outbox",
          "port": "read",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "publish",
      "kind": "H04",
      "incidences": [
        {
          "node": "dispatch",
          "port": "publish",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "topic",
          "port": "publish",
          "role": "subscriber",
          "ordinal": 0
        }
      ]
    }
  ]
}
