Assistant: codex Assistant-Model: gpt-5.6-luna Assistant-Session: 01a087b0-7b1e-7531-8ef3-6525ebaf7ee7
222 lines
6.2 KiB
YAML
222 lines
6.2 KiB
YAML
fiam_version: '0.2'
|
|
instance:
|
|
id: specimen.resource.shared-postgresql-table
|
|
kind: specimen
|
|
title: Shared PostgreSQL table integration
|
|
status: provisional
|
|
intent: Separate database protocol binding from the shared table that creates architectural coupling between applications.
|
|
nodes:
|
|
- id: node.app-a
|
|
kind: system-node
|
|
name: Application A
|
|
node_type: fiam.node-type.service
|
|
- id: node.app-b
|
|
kind: system-node
|
|
name: Application B
|
|
node_type: fiam.node-type.service
|
|
- id: node.postgres
|
|
kind: system-node
|
|
name: PostgreSQL
|
|
node_type: fiam.node-type.database
|
|
ports:
|
|
- id: port.pg.provider
|
|
owner: node.postgres
|
|
participations:
|
|
- contract: contract.sql
|
|
mode: offers
|
|
- id: port.app-a.pg
|
|
owner: node.app-a
|
|
participations:
|
|
- contract: contract.sql
|
|
mode: requires
|
|
- id: port.app-b.pg
|
|
owner: node.app-b
|
|
participations:
|
|
- contract: contract.sql
|
|
mode: requires
|
|
contracts:
|
|
- id: contract.sql
|
|
kind: interface-contract
|
|
purpose:
|
|
- fiam.purpose.transactional-data-access
|
|
operations:
|
|
- id: operation.sql.write
|
|
name: INSERT/UPDATE
|
|
effect: fiam.effect.write
|
|
- id: operation.sql.read
|
|
name: SELECT
|
|
effect: fiam.effect.read
|
|
endpoints:
|
|
- id: endpoint.pg
|
|
kind: endpoint
|
|
address: db.internal:5432
|
|
bindings:
|
|
- id: binding.pg
|
|
contract: contract.sql
|
|
provider_port: port.pg.provider
|
|
consumer_ports:
|
|
- port.app-a.pg
|
|
- port.app-b.pg
|
|
endpoints:
|
|
- endpoint.pg
|
|
communication_stack:
|
|
- role: fiam.stack-role.database-protocol
|
|
term: fiam.protocol.postgresql-frontend-backend
|
|
- role: fiam.stack-role.transport
|
|
term: fiam.transport.tcp
|
|
information_resources:
|
|
- id: resource.pg.exchange
|
|
kind: information-resource
|
|
name: public.integration_exchange
|
|
resource_kind: fiam.information-resource.relational-table
|
|
resource_scope: fiam.resource-scope.shared-state
|
|
owner: node.postgres
|
|
selectors:
|
|
- kind: fiam.resource-selector.sql-qualified-name
|
|
value: public.integration_exchange
|
|
facets:
|
|
durability: fiam.durability.persistent
|
|
mutability: fiam.mutability.mutable
|
|
interactions:
|
|
- id: interaction.app-a.write
|
|
kind: interaction
|
|
operation: operation.sql.write
|
|
binding: binding.pg
|
|
- id: interaction.app-b.read
|
|
kind: interaction
|
|
operation: operation.sql.read
|
|
binding: binding.pg
|
|
assertions:
|
|
- id: assertion.app-a.write-table
|
|
assertion_kind: relation
|
|
subject: interaction.app-a.write
|
|
predicate: fiam.relation.writes-to
|
|
polarity: asserted
|
|
object_ref: resource.pg.exchange
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: modeling specimen
|
|
confidence: 0.98
|
|
- id: assertion.app-b.read-table
|
|
assertion_kind: relation
|
|
subject: interaction.app-b.read
|
|
predicate: fiam.relation.reads-from
|
|
polarity: asserted
|
|
object_ref: resource.pg.exchange
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: modeling specimen
|
|
confidence: 0.98
|
|
- id: assertion.pg.table-conforms
|
|
assertion_kind: relation
|
|
subject: resource.pg.exchange
|
|
predicate: fiam.relation.conforms-to-shape
|
|
polarity: asserted
|
|
object_ref: shape.pg.exchange-table
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
- id: assertion.pg.table-element
|
|
assertion_kind: relation
|
|
subject: resource.pg.exchange
|
|
predicate: fiam.relation.element-shape
|
|
polarity: asserted
|
|
object_ref: shape.pg.exchange-row
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
facets:
|
|
role: fiam.shape-role.element
|
|
slot: row
|
|
- id: assertion.pg.collection-element
|
|
assertion_kind: relation
|
|
subject: shape.pg.exchange-table
|
|
predicate: fiam.relation.element-shape
|
|
polarity: asserted
|
|
object_ref: shape.pg.exchange-row
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
facets:
|
|
role: fiam.shape-role.element
|
|
slot: row
|
|
- id: assertion.pg.write-accepts
|
|
assertion_kind: relation
|
|
subject: interaction.app-a.write
|
|
predicate: fiam.relation.accepts-shape
|
|
polarity: asserted
|
|
object_ref: shape.pg.exchange-row
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
facets:
|
|
role: fiam.shape-role.request
|
|
representation: fiam.representation.sql-row
|
|
- id: assertion.pg.read-produces
|
|
assertion_kind: relation
|
|
subject: interaction.app-b.read
|
|
predicate: fiam.relation.produces-shape
|
|
polarity: asserted
|
|
object_ref: shape.pg.exchange-row
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
facets:
|
|
role: fiam.shape-role.response
|
|
representation: fiam.representation.sql-row
|
|
tests:
|
|
stresses:
|
|
- shared-state-coupling
|
|
- binding-vs-data-resource
|
|
- schema-qualified-selection
|
|
notes:
|
|
- Both applications use the same PostgreSQL Binding family, but their integration coupling is through the shared table resource.
|
|
expected_properties:
|
|
- id: check.evidence
|
|
kind: all-assertions-have-evidence
|
|
- id: check.no-deprecated
|
|
kind: no-deprecated-terms
|
|
- id: check.no-legacy-representations
|
|
kind: no-legacy-representations
|
|
- id: check.pg.table-shape
|
|
kind: relation-exists
|
|
subject: resource.pg.exchange
|
|
predicate: fiam.relation.conforms-to-shape
|
|
object_ref: shape.pg.exchange-table
|
|
- id: check.pg.row-shape
|
|
kind: relation-exists
|
|
subject: resource.pg.exchange
|
|
predicate: fiam.relation.element-shape
|
|
object_ref: shape.pg.exchange-row
|
|
- id: check.pg.ddl
|
|
kind: field-contains
|
|
ref: artifact.pg.exchange-ddl
|
|
field: describes
|
|
value: shape.pg.exchange-row
|
|
x-references:
|
|
- https://www.postgresql.org/docs/current/ddl-basics.html
|
|
- https://www.postgresql.org/docs/current/infoschema-tables.html
|
|
information_shapes:
|
|
- id: shape.pg.exchange-table
|
|
kind: information-shape
|
|
name: integration_exchange collection
|
|
shape_kind: fiam.information-shape.collection
|
|
- id: shape.pg.exchange-row
|
|
kind: information-shape
|
|
name: integration_exchange row
|
|
shape_kind: fiam.information-shape.object
|
|
artifacts:
|
|
- id: artifact.pg.exchange-ddl
|
|
kind: artifact
|
|
name: integration_exchange DDL
|
|
artifact_type: fiam.artifact.sql-ddl
|
|
describes:
|
|
- resource.pg.exchange
|
|
- shape.pg.exchange-table
|
|
- shape.pg.exchange-row
|
|
locator: db://public.integration_exchange/ddl
|