Source: https://developer.salesforce.com/docs/atlas.en-us.integration_patterns_and_practices.meta/integration_patterns_and_practices/integ_pat_middleware_definitions.htm
- Event Handling
- is the receipt of an identifiable occurrence at a designated receiver
- The key processes involved are
- Identifying where an event should be forwarded
- Executing the forwarding actions
- Receiving a forwarded event
- Taking some kind of appropriate action in response, such as writing to a log
- The event handler might ultimately forward the event to an event consumer
- Common uses include “publisher/subscriber”
- Protocol Conversion
- is typically a software application that converts the protocol of one device to another to achieve interoperability
- Salesforce does not support native protocol conversion. Any such requirements have to be handled by the Middleware or the endpoint
- Translation and Transformation
- Transformation is the ability to map one data format to another, insuring interoperability
- Queuing and Buffering
- rely on asynchronous messaging as opposed to request-response architecture
- message queues provide temporary storage while the destination program is busy
- key benefit is that if the receiver fails – the sender application can continue, passing new message into the queue
- Synchronous Transport Protocols
- single thread activity.
- Caller sends request message
- ….waits for reply message, blocking everything else
- then processes the reply
- Appears as if there is only a single request at a time
- single thread activity.
- Asynchronous Transport Protocols
- one thread in the caller send the request message and sets up a callback
- A separate thread listens for the replay message
- The reply message invokes the appropriate callback with reestablishes the callers context and process
- Enables multiple outstanding requests to share a single reply thread
- Mediation Routing
- is the specification of a complex “flow” from one component to the next component
- Mediators coordinate with a group of objects so that the objects don’t have to know how to coordinate with each other.
- Makes sure the right message gets to the right consumer
- Process Choreography and Service Orchestrations
- forms of “service composition” where any number of endpoints and capabilities are being coordinated
- Difference
- Choreography:
- behavior resulting from a group of interacting individual entities with no central authority
- combines the interface behavior description of each service
- Orchestration:
- behavior resulting from a central conductor coordinating the behavior of individual entities performing tasks independent of each other
- shows the complete behavior of each service
- Choreography:
- Salesforce Recommended: All complex orchestrations be implemented in the middleware layer because of governor limits and timeouts
- Transactionality (encryption, signing, reliable, delivery, transaction management)
- ability to support global transactions that encompass all necessary operations against each required resource
- Implies support for the four ACID propertities that guarantees all-or-nothing outcomes
- Atomicity, Consistency, Isolation, Durability
- Salesforce is not able to participate in distributed transactions or transactions initiated outside of Salesforce, therefore transactionality should be implemented in the middleware
- Routing
- Specifying the complex flow of messages from component to component
- Salesforce Recommends: Message Routing should be done in the middleware or at the end points
- Extract,Transform, and Load (ETL)
- Extracting data from the source(s)
- Transforming data
- Cleaning
- Filtering
- Formatting
- Loading data into target system