Backend & APIs
AuraScore 81/100

MES-ERP Bidirectional Synchronization Middleware Architecture Plan

Design a high-reliability, idempotent integration backend synchronizing shop-floor execution with enterprise resource planning.

Use this template when architecting transactional middleware between plant-floor MES and corporate ERP systems. It produces an integration architecture and implementation roadmap focused on data consistency.

Template

Role: Principal Integration Engineer specializing in manufacturing transactional middleware and enterprise event buses.

Context

  • Manufacturing Execution System: {{mes_platform_type}}
  • Enterprise ERP: {{erp_backend_system}}
  • Transaction load: {{sync_transaction_frequency}}
  • Work-order pattern: {{batch_vs_event_ratio}}
  • Idempotency policy: {{idempotency_requirement}}
  • Maximum disaster RTO: {{failover_rto_minutes}} minutes

Task

Develop an engineering blueprint and implementation plan for a bidirectional, fault-tolerant middleware layer connecting {{mes_platform_type}} and {{erp_backend_system}} that guarantees transactional integrity for production orders, inventory consumption, and finished goods receipts.

Method

  1. Map data contracts between {{mes_platform_type}} work-order states and {{erp_backend_system}} production posting endpoints.
  2. Architect an outbox pattern implementation within the middleware database to enforce transactional delivery guarantees.
  3. Design an idempotent API gateway layer enforcing {{idempotency_requirement}} using distributed deduplication locks.
  4. Formulate event routing and aggregation rules handling the defined {{batch_vs_event_ratio}} traffic profile.
  5. Specify schema versioning, backward compatibility contracts, and dead-letter queue re-drive workflows for malformed payloads.
  6. Establish an operational disaster recovery sequence guaranteeing state reconciliation within {{failover_rto_minutes}} minutes.
  7. Detail continuous health-checking and synthetic transaction probes for end-to-end integration monitoring.

Constraints

  • MUST enforce strict exactly-once or idempotent at-least-once semantic processing for all financial and material posts.
  • MUST NOT allow unhandled ERP downtime to stall shop-floor assembly line progression.
  • Integration contracts must decouple MES runtime availability from ERP network latency.
  • Outbox stores must include an automated rolling archive mechanism for processed records.

Output format

  1. Architectural Interaction Model (numbered step-by-step transaction lifecycle)
  2. API Contract & Idempotency Specification (JSON payload schemas + error codes)
  3. Failure Isolation & Queue Drain Blueprint (flowchart description + retry strategy)
  4. Disaster Recovery & State Reconciliation Runbook (table with SLA limits and CLI steps)
  5. 6-Week Delivery and Rollout Milestone Plan (bulleted sprint phases)

Self-review

  • Verify that network outages on {{erp_backend_system}} cannot block line operators on {{mes_platform_type}}.
  • Check that deduplication logic meets the exact {{idempotency_requirement}} constraints.
  • Validate that recovery time targets stay strictly within {{failover_rto_minutes}} minutes.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-backend-apis
manufacturing-industrial
mes
erp
middleware