searchlore

Back to Resource

All Segments

The Many Meanings of Event-Driven Architecture • Martin Fowler • GOTO 2017

The Many Meanings of Event-Driven Architecture • Martin Fowler • GOTO 2017

29 segments available

This presentation was recorded at GOTO Chicago 2017. #GOTOcon #GOTOchgo http://gotochgo.com Martin Fowler - Author, Speaker, Consultant and General Loud-mouth on Software Development ABSTRACT During my career, I've often people heard people describe their systems as "event-driven". But when looking deeper that phrase seems to lead to some very different architectural assumptions. On a recent workshop we identified four different patterns [...] TIMECODES 0:00 What people mean by EDA 00:51 How he came to write down common patterns of EDA and hold this talk 02:45 4 patterns detected 03:20 Pattern 1: Event Notification 08:33 Events vs Commands 11:30 Pro: Decoupling 13:50 Contra: inability to understand what is going on by stepping through the code 14:53 Pattern 2: Event-carried State Transfer 20:51 Pattern 3: Event Sourcing 32:11 Can be a very nice system development-wise 33:43 Downside of Event Sourcing 38:46 Which events to record in the event store? 43:31 Pattern 4: CQRS 47:39 Conclusion : How to use the knowledge about those 4 patterns Read the full abstract here: https://gotochgo.com/2017/sessions/47 RECOMMENDED BOOKS Martin Fowler & Pramod Sadalage • NoSQL Distilled • https://amzn.to/3ChIpu7 Martin Fowler • Patterns of Enterprise Application Architecture • https://amzn.to/3lp4sIq Martin Fowler • Domain-Specific Languages • https://amzn.to/3nzOIFk Martin Fowler • UML Distilled • https://amzn.to/3kahjyA Martin Fowler • Analysis Patterns • https://amzn.to/3Emabar https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.instagram.com/goto_con https://www.facebook.com/GOTOConferences #EventDrivenArchitecture #EventDriven #SoftwareArchitecture #MartinFowler CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: https://www.youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1

Segments Timeline

1
0:11 - 1:02
0:50 duration144 words

Defining Event-Driven Architecture

Martin Fowler introduces the concept of event-driven architecture (EDA) and reflects on the ambiguity surrounding its definition. He shares his experiences of hearing various interpretations of EDA throughout his career and emphasizes the need for clarity in understanding what constitutes an event-driven system.

"almost my entire career I've heard people talking about event-driven architectures and event driven systems and things of that kind and it's always been a little bit odd as to what what actually do pe..."

2
1:02 - 2:02
1:00 duration189 words

The Workshop Revelation

Fowler recounts a workshop held in Denver where participants from various project teams discussed their experiences with event-driven systems. He highlights the realization that different teams were applying the term 'event-driven' to distinct architectural patterns, leading to a need for a clearer understanding of these patterns.

"cuz I dug into other things instead but it really kind of came to a head late last year um at Fort Works we've been doing quite a lot of event-driven stuff and various people came to roughly the same ..."

3
2:02 - 3:14
1:12 duration224 words

Identifying Four Patterns of EDA

In this segment, Fowler outlines the four distinct patterns of event-driven architecture that emerged from the workshop discussions. He explains that when people refer to an event-driven system, they often mean that at least one of these patterns is in play, and he prepares to delve into each pattern in detail.

"bit more Precision into what we're talking about and so we thought that's important that we describe this and say a bit more to the rest of the world about some of our thoughts and I hope really hard ..."

4
3:14 - 4:52
1:37 duration265 words

Pattern 1: Event Notification

Fowler introduces the first pattern of event-driven architecture: Event Notification. He illustrates this concept using an example from an insurance company, explaining how events can decouple systems by allowing one system to notify another of changes, thus reversing dependencies and enhancing modularity.

"time gradually revealing what they are so to begin the first one let's imagine some example system that might be had by an insurance company and in this insurance system we have our customers and our ..."

5
4:52 - 6:01
1:09 duration210 words

Benefits of Event Notification

In this segment, Fowler elaborates on the advantages of using event notification in systems. He discusses how this approach allows for better management of dependencies and creates a first-class representation of changes, making it easier to track and respond to events without tightly coupling systems.

"that a lot of people don't really like very much so one way we can get around this coupling is we can say instead of doing that let's try and reverse things around I don't mind my insurance quoting sy..."

6
6:01 - 7:10
1:08 duration190 words

Events vs. Commands

Fowler contrasts events with commands, explaining the subtle differences in their usage and implications. He emphasizes that while both can encapsulate actions, the naming conventions reflect different intentions, with events indicating changes and commands dictating actions.

"and this is an approach that um we in our discussion whoops giving you a slideway there in our discussion we referred to as event notification we're using events as a notification system uh notificati..."

7
7:10 - 8:03
0:53 duration164 words

The Importance of Naming

In this segment, Fowler discusses the critical role of naming in software systems, particularly in distinguishing between events and commands. He highlights how proper naming can clarify system behavior and improve communication among developers, ultimately leading to better software design.

"dependencies now I've talked about this in terms of events and I've stressed this dependency switch that it does but it also does something else it bottles it sort of takes everything to do with the c..."

8
8:03 - 9:16
1:12 duration205 words

Leveraging Events for System Integration

Fowler explains how using events allows for easier integration of new systems without requiring changes to existing ones. He illustrates this benefit by discussing how new systems can subscribe to event streams, enabling them to react to changes without direct dependencies on the original systems.

"has its own benefits if once we can do that so we're actually getting a second benefit here which is this bottling it up into a into a thing into an object or I don't have to hesitate about using obje..."

9
9:16 - 10:01
0:44 duration118 words

The Drawbacks of Event Notification

Fowler addresses the potential downsides of event notification, particularly the challenges it poses for understanding system behavior. He warns that the lack of explicit programmatic flow can lead to confusion about how systems interact, making it difficult to trace events back to their origins.

"insurance for this customer that's the customer management system saying it knows what ought to be done and it's telling some remote system here's what you should do when I phrase it in terms of event..."

10
10:28 - 12:19
1:50 duration346 words

The Confusion of Events vs Commands

Martin Fowler discusses the nuances between events and commands in event-driven architecture. He highlights how naming conventions can lead to confusion, especially when commands are treated as passive events. This segment emphasizes the importance of clear communication in software systems and the challenges of understanding system behavior through event streams.

"happen then I want to name it in terms of a command now I mean you can get all the way over way you could have your insurance quoting system might ex insist on sending a communication an email to the ..."

11
12:19 - 14:22
2:03 duration371 words

The Dark Side of Event Notification

Fowler elaborates on the drawbacks of using event notification in systems. While it offers decoupling and flexibility, it also creates challenges in understanding system behavior. He shares personal experiences debugging event-driven systems, illustrating the trade-offs between flexibility and visibility in software architecture.

"attractive ability um and it easily allows you to do all sorts of interesting things without changing what's going on but when anything sounds like it's really nice there's always a butt isn't that an..."

12
14:22 - 16:21
1:58 duration344 words

Event Notification: A Common Pattern

In this segment, Fowler explains that event notification is a prevalent pattern in event-driven architectures. He discusses how systems often rely on generic event notifications, which can lead to additional traffic and the need for further queries to understand changes. This highlights the importance of providing sufficient information in event messages.

"tradeoffs so that's the first thing event notification and that I would probably say is the most common that people say when they're event driven they're using an event notification mechanism um somew..."

13
16:21 - 20:12
3:50 duration675 words

Event-Carried State Transfer Explained

Fowler introduces the concept of event-carried state transfer, a pattern that allows systems to avoid direct calls to the customer management system. He explains how this pattern improves performance and availability by duplicating necessary data within the consumer systems, while also addressing the challenges of data consistency.

"of time if I'm saying here's the address change then there's less traffic required because I only need to go in if I can care about an address change and then I can take this to The Logical um final c..."

14
20:12 - 21:36
1:24 duration263 words

The Trade-offs of Event-Carried State Transfer

In this segment, Fowler discusses the trade-offs associated with event-carried state transfer. While it enhances availability and reduces dependency on other systems, it introduces complexity in maintaining data consistency. He emphasizes the importance of understanding these trade-offs when designing event-driven architectures.

"consistency so this is a less common pattern um I don't know what the proportions are I would say a lot of the time that I see event notification I don't see event State trans based State transfer but..."

15
21:36 - 23:01
1:25 duration249 words

Understanding Event Sourcing

Fowler explains the concept of event sourcing, a technique that captures changes as events rather than overwriting existing data. He illustrates this with an example of changing a customer's address, highlighting how event sourcing creates a historical record of changes. This segment sets the stage for understanding the benefits and complexities of event sourcing in software development.

"understand it well enough they think they could explain it to somebody else a few okay I'm not going to ask you to come up on stage and do it don't worry okay here's how I explain event sourcing and s..."

16
22:34 - 24:34
2:00 duration324 words

Event Sourcing in Practice

Fowler discusses the practical implications of event sourcing, emphasizing its importance for software developers. He draws parallels between event sourcing and version control systems like Git, explaining how both maintain a history of changes that can be replayed to reconstruct state.

"finger magig that captures the details of a change and we pop that first class finger Mig the event into some kind of separate storage area then we process that event and we process the event to do ex..."

17
24:34 - 27:01
2:26 duration407 words

Event Sourcing and Accounting

Fowler compares event sourcing to accounting ledgers, illustrating how both maintain a record of changes over time. He explains how this method allows for easy auditing and debugging, enabling users to trace back through events to understand the current state of a system.

"is Version Control if you use git you use subversion Mercurial even if you use CVS and I have it was a long time ago but I used it you've used an Event Source system hell I use sccs you know shows how..."

18
27:01 - 30:11
3:09 duration605 words

Benefits and Challenges of Event Sourcing

Fowler outlines the benefits of event sourcing, including its auditing capabilities and debugging advantages. He also discusses the complexities involved in recalculating states after changes, highlighting the potential challenges developers may face when implementing this architecture.

"snapshots a common thing in accounting is to say at the end of a year or something would would say we're going to close out the year we calculate all the balances for the end of the year and then we k..."

19
30:11 - 32:50
2:39 duration504 words

High-Performance Event Sourcing Systems

Fowler shares insights from a high-performance trading system that utilizes event sourcing. He explains how the system operates entirely in memory for speed and efficiency, allowing for rapid transaction processing and easy state reconstruction from event logs.

"good things is actually one of the most intriguing the idea of using a memory image this basically says if our long-term record of what the state of a system is a l of events actually I should walk ov..."

20
33:00 - 34:44
1:44 duration341 words

Challenges of Event Sourcing

In this segment, Fowler addresses the complexities associated with event sourcing, particularly regarding external system interactions and event replay mechanisms. He discusses the importance of capturing every response from external systems as events to ensure accurate state rebuilding. The segment also touches on the intricacies of event schema management and the potential pitfalls developers may encounter.

"systems that have large amounts of nonvolatile main memory um because so much of our of our systems have been built under this assumption that we've only got so much memory we have to park everything ..."

21
34:44 - 36:56
2:11 duration386 words

Misunderstandings in Event Sourcing

Fowler recounts a conversation with a developer who misattributed difficulties in their project to event sourcing. He clarifies that the real issues stemmed from asynchronous processing rather than event sourcing itself. This segment emphasizes the need for clear understanding of the underlying causes of challenges in event-driven systems and the importance of synchronous operations.

"and you have to think through how to get through those so those definitely do add complexity and you get other complexity that typically comes along for the ride one of the trigger for doing this talk..."

22
36:56 - 38:29
1:32 duration298 words

Versioning Complexities in Event Sourcing

Fowler discusses the challenges of versioning in event sourcing systems, particularly when dealing with changes in application state and event schemas over time. He references Greg Young's insights on managing versioning complexities and the importance of maintaining a clear separation between events and business logic. This segment highlights the critical considerations for developers implementing event sourcing.

"to use asyn new invent approach even though it seems common that people confuse that another issue is versioning versioning can get quite complicated in invent Source system because of this ability to..."

23
38:29 - 40:01
1:32 duration271 words

Capturing Intent in Event Sourcing

In this segment, Fowler explores the nuances of capturing events in event sourcing, particularly the distinction between intention and actual changes in code. He discusses the limitations of traditional version control systems in representing developer intentions and the importance of storing both input and output events. This segment underscores the complexity of accurately representing changes in event-driven architectures.

"that book so events sourcing is like most things a tradeoff there are pros and cons there are some really nice advantages there are complexities involved I do find it surprising that more people haven..."

24
40:01 - 41:00
0:59 duration182 words

The Importance of Context in Events

Fowler emphasizes the significance of context when recording events in event sourcing systems. He discusses the need to capture both external events and internal changes to application state, highlighting the potential for losing important context if not managed properly. This segment reinforces the idea that careful consideration is required when designing event-driven systems.

"difficult to do that because of course a rename function method uh function cap capability for that would work with JavaScript is not going to work with Java is not going to work with python so I have..."

25
41:12 - 42:22
1:10 duration190 words

The Challenge of Versioning in Event Storage

In this segment, Fowler addresses the challenges of versioning when storing events in an event-driven architecture. He shares insights from Greg Young's advice on avoiding business logic between events and storage to prevent tangled versioning issues. Fowler suggests that storing both input and output events can be a solution to maintain clarity and intention in the system.

"store more than one of these if you look carefully at the slide you might notice we have a slight problem the code isn't quite right the total is wrong what happens to me fixing this bug I've got to b..."

26
42:22 - 43:11
0:49 duration150 words

The Importance of Storing Both Event Types

Fowler elaborates on the necessity of storing both input and output events in event-driven systems. He reflects on his experiences with accounting entries as a way to manage event sourcing effectively. This segment underscores the value of maintaining a pipeline of events to ensure that all changes are tracked and can be replayed when necessary.

"worked in um the the canonical style that I that I saw back in the '90s when doing this was we would store the external event and then actually all the changes to the application state would be accoun..."

27
43:11 - 44:30
1:19 duration227 words

Introduction to CQRS

In this segment, Fowler introduces Command Query Responsibility Segregation (CQRS), a pattern that separates the components responsible for reading and writing to a data store. He explains the benefits of having distinct models for commands and queries, emphasizing the importance of understanding when to apply this pattern effectively to avoid complications.

"to go part good part of the discussion we had at this Workshop was this question of what's more important the internal or the input event um and as I said I do think it's it's certainly important to b..."

28
44:30 - 46:01
1:30 duration281 words

Cautions with CQRS Implementation

Fowler discusses the potential pitfalls of implementing CQRS, cautioning that while it can be beneficial, it may also lead to confusion if not applied correctly. He reflects on the historical context of separating read and write models and stresses the importance of understanding the implications of using CQRS in software architecture.

"use the command component command model when you're making an update you always read using something else I mean you might do some read in the middle of processing the command uh will do some reads bu..."

29
46:01 - 48:07
2:06 duration323 words

The Value of Precise Terminology in EDA

In this concluding segment, Fowler emphasizes the importance of precise terminology when discussing event-driven architecture (EDA). He contrasts vague terms like 'event-driven' with more specific patterns, advocating for clarity to avoid misunderstandings. Fowler aims to equip the audience with a better understanding of EDA patterns and their implications in software development.

"a bit confused because I've heard people say well I we think cqrs should be used everywhere because it's really useful to have different uh models for reading things and populating different models bu..."