Sync vs Async Communication By David Boyne
Sync vs Async Communication By David Boyne
EDA visuals and the book is free thanks to our sponsors:
When we design our architecture and build our services it can be useful to know the different types of communication patterns. Although pretty simple, I think it’s important to know the difference between sync and async.
Sync
- Normally seen as the “request/response” pattern. Example would be taking a phone call, you need both parties there.
- An example of this could be a command, many API calls want something to happen.
- Fails fast, simple and low latency
- What happens when many requests come in? Need to scale the service, could you use Async pattern instead? Something to consider.
Async
- With EDA a producer can fire an event and forget it and allow downstream consumers to process it (if they want…)
- With messages, a message could be added to queue and downstream services control the speed of injestion and process async.
- Async provides a loose coupling between services/systems.
- Receiver can control the rate of consumption of events/messages
- Example of this would be Amazon SQS.
Extra resources
- AWS: Re:invent 2022 - Building next-gen applications with event-driven architectures - Video on building EDA applications and speaker talks through communication patterns.
Explore other visuals
Want to work together?
If you're interested in collaborating, I offer consulting, training, and workshops. I can support you throughout your event-driven architecture journey, from design to implementation. Feel free to reach out to discuss how we can work together, or explore my services on EventCatalog.
Download EDA Visuals
Join over 13,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.