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.

6.1.1 Exercise 6.1 Discussion

 
 

6.2 Event Driven Architecture

 
 

6.2.1 What is an event?

 

6.2.2 Event Driven architecture and synchronicity

 
 
 

6.2.3 Event Driven vs Observer

 
 
 

6.2.4 Event Message

 
 
 

6.3 Comparing event messages and API

 

6.3.1 Exercise 6.2 Discussion

 

6.3.2 Exercise 6.3 Discussion

 
 

6.3.3 Exercise 6.4 Discussion

 

6.4 Don’t shoot the Messenger

 
 

6.4.1 What is an Event Hub?

 
 
 

6.4.2 Publish and Subscribe

 
 

6.4.3 Point-to-Point Messaging

 
 
 

6.4.4 Exercise 6.5 Discussion

 
 

6.4.5 Exercise 6.6 Discussion

 
 
 
 

6.4.6 Event Streaming

 
 

6.4.7 Web Hooks

 
 
 
 

6.5 Pros and Cons of Event Driven Architecture

 
 

6.5.1 Pros

 
 

6.5.2 Cons

 
 
 

6.6 Final Thoughts About Event Driven Architecture

 
 
 
 

6.7 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest