BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
Module 10 — Synchronous vs Asynchronous Integrations

Module 10 — Synchronous vs Asynchronous Integrations

This module is about a core architecture decision:

Does the caller wait for the work to finish, or do we accept the work and finish it later?

That choice affects latency, reliability, retries, user experience, error handling, and scaling.

10.1Synchronous integrationClassic request/response:11 words10.2Synchronous exampleA UI asks:17 words10.3The synchronous reliability problemNow imagine:32 words10.4Asynchronous integrationInstead:12 words10.5HTTP 202A common async response is:31 words10.6Why async is more resilientSuppose Salesforce is unavailable for 20 minutes.28 words10.7Queue as a shock absorberSuppose normal traffic:19 words10.8But queues don't create capacityIf requests arrive at:24 words10.9Mule async optionsDepending on environment, you'll encounter things like:24 words10.10Queue mental modelProducer:18 words10.11Queue vs Flow ReferenceFrom Module 6:8 words10.12Async Scope vs messagingYou may also hear Mule's:32 words10.13Event-driven architectureInstead of commanding:15 words10.14Command vs eventUseful distinction:34 words10.15ChoreographyRemember Module 6?15 words10.16Eventual consistencyThis is one of the biggest async concepts.32 words10.17Eventual consistency isn't necessarily a bugFor many integrations:18 words10.18PollingAnother common pattern:9 words10.19Event vs pollingSuppose Salesforce changes Account.24 words10.20Salesforce Change Data CaptureSalesforce CDC is conceptually:24 words10.21Platform EventsPlatform Events are more business-event-oriented.17 words10.22Pub/Sub APIYou may hear Salesforce:28 words10.23At-most-once, at-least-once, exactly-onceThis terminology often appears in messaging interviews.35 words10.24Practical integration mindsetMost real message systems often force you to reason as if:32 words10.25Why duplicate events happenConsumer receives:19 words10.26Therefore acknowledge only after successConceptually:20 words10.27Dead Letter QueueAfter repeated failures:21 words10.28What belongs in DLQ?Example:12 words10.29Retry queue vs DLQA mature architecture may have:14 words10.30Poison messageA message that will never succeed without correction:27 words10.31OrderingSuppose events arrive:24 words10.32Key-based orderingIf broker supports partitioning/keying, you might use:29 words10.33Idempotency alone doesn't solve stale orderingImportant nuance.29 words10.34Async Salesforce update exampleMessage:8 words10.35Event schema versioningEvents themselves are contracts.34 words10.36Sync vs async decision ruleAsk:14 words10.37Good synchronous use caseswhere response is immediately needed.5 words10.38Good asynchronous use cases0 words10.39Hybrid patternVery common:11 words10.40Another hybridThen:10 words10.41Scheduler patternMule Scheduler can trigger flows:19 words10.42Scheduler + watermarkTypical delta sync:18 words10.43Polling too frequentlyBad:8 words10.44Polling too infrequentlyIf requirement says:18 words10.45Event replaySuppose consumer is down for an hour.44 words10.46Async observabilitySynchronous:12 words10.47Queue depthSuppose:14 words10.48Oldest message ageEven more useful sometimes:19 words10.49Async success response doesn't mean business completionImportant API semantic.20 words10.50Status resourceA robust async API might return:10 words10.51Callback/webhook patternInstead of polling status:16 words10.52Exactly-once delivery — be skepticalIf interviewer says:49 words10.53Exactly-once business effectExample:14 words10.54Transaction boundary with queueA hard problem:58 words10.55Outbox pattern mental modelInstead of:23 words10.56Salesforce as source vs targetSo far we've mostly had:18 words10.57Interview scenarioUser creates a customer and needs the Salesforce ID before continuing.38 words10.58Interview scenarioWe receive 500,000 nightly updates.37 words10.59Interview scenarioSalesforce may be unavailable for an hour, but we must not lose requests.56 words10.60Interview scenarioAccount changes in Salesforce must be propagated within seconds.41 words10.61Interview scenarioEvents sometimes arrive twice.51 words•Module 10 cheat sheetThe interview sentence to memorize is:93 words
← PreviousModule 9 — API-Led Architecture