6 Event Driven Architecture
This chapter covers
- What an event is, and what an event message is
- How an event driven architecture differs from REST API style architecture
- Why an event driven architecture is natural for asynchronous calls
- Is an event driven architecture the same as the Observer pattern?
- The similarities and differences when implementing the same action in a REST architecture vs event driven architecture
- Different types of event driven architectures, including publish/subscribe, point to point, WebHooks, and Event Streaming
- The Pros and Cons of Events vs REST
Event driven architecture is a popular architectural style that has many advantages, but also a few challenges, compared to REST-style and graphQL style API. Let’s look at some of the forces that make event driven architecture attractive, and look at what our microservices would look like if implemented in an event driven architecture.
6.1 Why is everyone cancelling their orders?
Bullwinkle just called me again – he was all in a fluster. He said he was getting too many cancelled orders, and they were killing his business. I asked him to slow down and tell me what was happening. After I got the full story, I have a suspicion I know what is wrong. Let me tell you what is happening, and you tell me if you agree.