Multi-Modal Freight Booking and Rate Engine Architecture Plan
Architect a distributed multi-carrier booking, rating, and dynamic settlement engine across legacy EDI and modern APIs.
Use this template when designing a high-scale digital freight marketplace or transportation management architecture. It specifies distributed saga patterns, carrier adapter bridges, rate-engine caching, and immutable audit trails.
Role: Enterprise Integration Architect specializing in multi-modal logistics exchanges and transaction engines.
Context
- Active carrier network capacity: {{carrier_network_scale}}
- Legacy carrier protocols in scope: {{legacy_edi_systems}}
- Peak order and booking volume: {{booking_throughput_peak}}
- Dynamic rating complexity: {{pricing_engine_tier}}
- Financial transaction audit requirement: {{audit_retention_period}}
- Modern integration interfaces: {{api_protocol_standards}}
Task
Formulate a distributed multi-modal freight booking architecture plan that modernizes {{legacy_edi_systems}} into {{api_protocol_standards}}, processes {{booking_throughput_peak}}, and coordinates complex multi-leg carrier holds via transactional sagas.
Method
- Design carrier adapter abstractions mapping legacy formats (EDI 204, 211, 990, 214) into uniform domain events using {{api_protocol_standards}}.
- Architect a distributed saga coordinator to handle multi-carrier, multi-leg booking reservations with automated compensation triggers on booking failure.
- Construct a high-performance distributed caching and pre-computation layer for {{pricing_engine_tier}} dynamic quote calculations.
- Define idempotency token mechanisms and deduplication windows across asynchronous carrier confirmation responses.
- Establish an append-only event sourcing store for dispute resolution and rating validation conforming to {{audit_retention_period}}.
- Detail rate-limiting, circuit breakers, and traffic throttling strategies designed for {{carrier_network_scale}} partners with unstable endpoints.
- Provide a detailed migration timeline mapping legacy batch workflows to continuous real-time dispatch events.
Constraints
- MUST implement compensatory transaction rollbacks across all intermediate legs if any carrier booking segment fails.
- MUST NOT mutate historic rate calculations or audit logs within {{audit_retention_period}}.
- MUST isolate slow third-party carrier EDI gateways behind asynchronous worker queues to prevent thread pool exhaustion.
- All booking state transitions must be backed by deterministic idempotency keys.
Output format
Deliver an architecture plan organized into 5 defined sections:
- Multi-Carrier Integration Tier & Protocol Adapter Architecture
- Distributed Booking Saga Workflow & Compensation Matrix
- Dynamic Rate Calculation Engine & High-Speed Cache Topology
- Immutable Financial & Operational Audit Event Sourcing Plan
- Partner Onboarding, Resiliency & Phased Modernization Roadmap Total output length: 1,100–1,500 words.
Self-review
- Ensure every legacy format in {{legacy_edi_systems}} has a defined modernization mapping path.
- Confirm that the multi-leg saga compensation logic comprehensively covers partial hold cancellations.
- Verify that dynamic pricing throughput matches the target capacity in {{booking_throughput_peak}}.
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.