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.
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
- Map data contracts between {{mes_platform_type}} work-order states and {{erp_backend_system}} production posting endpoints.
- Architect an outbox pattern implementation within the middleware database to enforce transactional delivery guarantees.
- Design an idempotent API gateway layer enforcing {{idempotency_requirement}} using distributed deduplication locks.
- Formulate event routing and aggregation rules handling the defined {{batch_vs_event_ratio}} traffic profile.
- Specify schema versioning, backward compatibility contracts, and dead-letter queue re-drive workflows for malformed payloads.
- Establish an operational disaster recovery sequence guaranteeing state reconciliation within {{failover_rto_minutes}} minutes.
- 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
- Architectural Interaction Model (numbered step-by-step transaction lifecycle)
- API Contract & Idempotency Specification (JSON payload schemas + error codes)
- Failure Isolation & Queue Drain Blueprint (flowchart description + retry strategy)
- Disaster Recovery & State Reconciliation Runbook (table with SLA limits and CLI steps)
- 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.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.