Enterprise Service Bus (ESB)
Enterprise Service Bus mediates enterprise integrations with routing, transformation, orchestration, and protocol mediation.ESB Core Capabilities
Message Routing
Content-based routing, rule-based routing, dynamic routing
Transformation
Schema mapping, protocol conversion, canonical data model
Orchestration
Multi-service workflow coordination, business process execution
Protocol Mediation
SOAP, REST, MQ, FTP, SFTP, EDI interoperability
ESB Architecture
Canonical Data Model
Normalize data across heterogeneous systems using a shared schema.ESB vs Microservices
| Aspect | ESB (SOA) | API Gateway (Microservices) |
|---|---|---|
| Integration | Centralized smart pipe | Decentralized dumb pipe |
| Services | Coarse-grained | Fine-grained |
| Data | Shared databases | Database per service |
| Governance | Centralized | Decentralized |
| Standards | SOAP/WSDL/WS-* | REST/gRPC/Events |
| Complexity | In the bus | In the services |
SOAP & WSDL
SOAP is a formal XML-based RPC protocol. WSDL describes operations, schemas, and bindings.WSDL Structure
WS-Security
SOAP security standards: authentication, signatures, encryption.SOAP/WSDL provides formal contracts and strong typing, but is heavyweight. Use for enterprise B2B integrations where formal contracts are required.
Business Process Management (BPM)
BPM automates multi-step business workflows using executable process models.BPMN 2.0
Business Process Model and Notation — graphical workflow notation executed by engines (Camunda, Flowable).BPMN Elements
Events
Start, End, Message, Timer, Error, Signal
Activities
Service Task, User Task, Script Task, Subprocess
Gateways
Exclusive (XOR), Parallel (AND), Inclusive (OR), Event-based
Flows
Sequence Flow, Message Flow, Data Association
Camunda BPMN Example
BPM Best Practices
Do
- Use BPMN for complex multi-step workflows with human approval steps
- Model processes with business stakeholders using visual tools
- Version BPMN process definitions
- Monitor process instances and durations
Don't
- Put business logic inside BPMN scripts (use service tasks)
- Create overly complex processes (>20 activities)
- Skip process testing (use Camunda test framework)
Enterprise Application Integration
Integration Patterns
- Point-to-Point
- Hub-and-Spoke (ESB)
- Event-Driven
Direct connections between systems.Pros: Simple, fast
Cons: n(n-1)/2 connections, tight coupling
File-Based Integration
Batch file transfer for legacy systems.Legacy System Integration
Strangler Fig Pattern
Incrementally replace legacy system without a risky big-bang rewrite.Anti-Corruption Layer (ACL)
Protects new system from legacy system’s data model.Enterprise System Examples
SAP Integration
SAP ERP & HANA
SAP ERP & HANA
SAP S/4HANA is the modern ERP suite running on the HANA in-memory database.Integration Approaches:Best Practices:
- OData APIs: RESTful APIs for CRUD operations
- BAPIs: Business APIs (RFC function modules)
- IDocs: Asynchronous document exchange
- SAP BTP: Integration suite for cloud and hybrid scenarios
- Use CDS Views for performant HANA data modeling
- Prefer BTP side-by-side extensions over in-system ABAP customizations
- Use SAP’s standard APIs rather than direct table access
Salesforce Integration
Salesforce Platform
Salesforce Platform
Salesforce CRM with Sales Cloud, Service Cloud, and Lightning Platform.Integration Methods:Best Practices:
- REST API: Standard CRUD operations
- Bulk API: Large data volumes (millions of records)
- Streaming API: Real-time event notifications (PushTopics)
- Platform Events: Pub-sub for event-driven architecture
- Apex REST/SOAP: Custom web services
- Bulkify all Apex code — handle lists, not single records
- Use Flows for declarative automation before writing Apex
- Monitor governor limits (100 SOQL queries, 10k DML rows per transaction)
Microsoft Dynamics 365
Dynamics 365 & Power Platform
Dynamics 365 & Power Platform
Microsoft ERP and CRM built on Azure with Dataverse.Integration Approaches:Best Practices:
- Web API: OData 4.0 REST API
- Plugins: .NET assemblies in Dataverse event pipeline
- Power Automate: Low-code workflow automation
- Dual-write: Real-time sync between Finance & Operations and Dataverse
- Azure Logic Apps: Enterprise integration workflows
- Use Dataverse APIs for external integrations
- Use virtual tables to surface external data without ETL
- Register plugins in pre-operation for validation, post-operation for side effects
Integration Best Practices
Design
- Start with domain model, not data model
- Use canonical data models for many-to-many integrations
- Document integration contracts (OpenAPI, AsyncAPI)
- Version all integration APIs
Resilience
- Implement retry with exponential backoff
- Use circuit breakers for external calls
- Design idempotent consumers
- Configure dead letter queues
Security
- Use mTLS for service-to-service
- Implement API key rotation
- Never pass credentials in URLs
- Encrypt sensitive data at rest and in transit
Operations
- Monitor integration health and latency
- Alert on integration failures
- Track message flow with correlation IDs
- Maintain integration audit logs