{
  "code": null,
  "collection": "architecture",
  "href": "https://banes-lab.com/ontology#architecture-dual-write",
  "id": "dual-write",
  "kind": "anti-pattern",
  "layer": {
    "href": "https://banes-lab.com/ontology/schema#layer-enforcement-core",
    "json": "https://banes-lab.com/json/records/layer/enforcement-core",
    "label": "Enforcement Core",
    "markdown": "https://banes-lab.com/records/layer/enforcement-core.md",
    "ref": "layer:enforcement-core"
  },
  "name": "Dual Write",
  "ref": "architecture:dual-write",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-outbox-pattern",
          "json": "https://banes-lab.com/json/records/architecture/outbox-pattern",
          "label": "Outbox Pattern",
          "markdown": "https://banes-lab.com/records/architecture/outbox-pattern.md",
          "ref": "architecture:outbox-pattern"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-saga-pattern",
          "json": "https://banes-lab.com/json/records/architecture/saga-pattern",
          "label": "Saga Pattern",
          "markdown": "https://banes-lab.com/records/architecture/saga-pattern.md",
          "ref": "architecture:saga-pattern"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-idempotent-consumer",
          "json": "https://banes-lab.com/json/records/architecture/idempotent-consumer",
          "label": "Idempotent Consumer",
          "markdown": "https://banes-lab.com/records/architecture/idempotent-consumer.md",
          "ref": "architecture:idempotent-consumer"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-reconciliation-job",
          "json": "https://banes-lab.com/json/records/lexicon/reconciliation-job",
          "label": "Reconciliation Job",
          "markdown": "https://banes-lab.com/records/lexicon/reconciliation-job.md",
          "ref": "lexicon:reconciliation-job"
        }
      ],
      "relation": "refactored-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#vocabulary-severity-discouraged",
          "json": "https://banes-lab.com/json/records/vocabulary/severity-discouraged",
          "label": "discouraged",
          "markdown": "https://banes-lab.com/records/vocabulary/severity-discouraged.md",
          "ref": "vocabulary:severity-discouraged"
        }
      ],
      "relation": "severity"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-category-anti-patterns",
          "json": "https://banes-lab.com/json/records/architecture-category/anti-patterns",
          "label": "Anti-patterns",
          "markdown": "https://banes-lab.com/records/architecture-category/anti-patterns.md",
          "ref": "architecture-category:anti-patterns"
        }
      ],
      "relation": "category"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#force-event-messaging",
          "json": "https://banes-lab.com/json/records/force/event-messaging",
          "label": "Event messaging",
          "markdown": "https://banes-lab.com/records/force/event-messaging.md",
          "ref": "force:event-messaging"
        }
      ],
      "relation": "force"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/disciplined-methodology/verify#counting-copies",
          "json": "https://banes-lab.com/json/disciplined-methodology/verify/counting-copies",
          "label": "Counting copies",
          "markdown": "https://banes-lab.com/disciplined-methodology/verify/counting-copies.md",
          "ref": "chapter:/disciplined-methodology/verify#counting-copies"
        },
        {
          "href": "https://banes-lab.com/software-architecture#a-system-is-a-graph",
          "json": "https://banes-lab.com/json/software-architecture/model/a-system-is-a-graph",
          "label": "A system is a graph",
          "markdown": "https://banes-lab.com/software-architecture/model/a-system-is-a-graph.md",
          "ref": "chapter:/software-architecture#a-system-is-a-graph"
        },
        {
          "href": "https://banes-lab.com/software-architecture#definitions-own-what",
          "json": "https://banes-lab.com/json/software-architecture/model/definitions-own-what",
          "label": "Definitions own what, code owns how",
          "markdown": "https://banes-lab.com/software-architecture/model/definitions-own-what.md",
          "ref": "chapter:/software-architecture#definitions-own-what"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-category-anti-patterns",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-anti-patterns",
          "label": "Anti-patterns",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md",
          "ref": "chapter:/ontology#architecture-category-anti-patterns"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-category-event-messaging-asynchronous-architecture",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-event-messaging-asynchronous-architecture",
          "label": "Event / Messaging / Asynchronous Architecture",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-event-messaging-asynchronous-architecture.md",
          "ref": "chapter:/ontology#architecture-category-event-messaging-asynchronous-architecture"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-transactions-state-concurrency",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-transactions-state-concurrency",
          "label": "Transactions / State / Concurrency",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-transactions-state-concurrency.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-transactions-state-concurrency"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-vocabulary-severity",
          "json": "https://banes-lab.com/json/ontology/schema/the-vocabulary-severity",
          "label": "Severity levels",
          "markdown": "https://banes-lab.com/ontology/schema/the-vocabulary-severity.md",
          "ref": "chapter:/ontology/schema#the-vocabulary-severity"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-forces",
          "json": "https://banes-lab.com/json/ontology/schema/the-forces",
          "label": "The forces",
          "markdown": "https://banes-lab.com/ontology/schema/the-forces.md",
          "ref": "chapter:/ontology/schema#the-forces"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "summary": "A defect in which related state is written to two systems with no atomicity or compensation.",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/ontology#architecture-read-your-writes-violation",
      "json": "https://banes-lab.com/json/records/architecture/read-your-writes-violation",
      "label": "Read-Your-Writes Violation",
      "markdown": "https://banes-lab.com/records/architecture/read-your-writes-violation.md",
      "ref": "architecture:read-your-writes-violation"
    },
    "previous": {
      "href": "https://banes-lab.com/ontology#architecture-lost-update",
      "json": "https://banes-lab.com/json/records/architecture/lost-update",
      "label": "Lost Update",
      "markdown": "https://banes-lab.com/records/architecture/lost-update.md",
      "ref": "architecture:lost-update"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/records/architecture",
    "label": "Architecture principles",
    "markdown": "https://banes-lab.com/api/records/architecture.md",
    "ref": "api:records/architecture"
  },
  "aliases": [],
  "exemplar": {
    "after": "await db.save(foo);\nawait outbox.append(fooCreatedEvent(foo));",
    "before": "await db.save(foo);\nawait searchIndex.add(foo);",
    "lang": "ts",
    "medium": "code"
  },
  "formedBy": "Write related state to two systems without atomicity, outbox, saga, reconciliation, or compensation.",
  "scope": [
    "event_messaging"
  ],
  "severity": "discouraged"
}
