SE Radio 654: Chris Patterson on MassTransit and Event-Driven Systems
Chris Patterson, founder and principal architect of MassTransit, joins host Jeff Doolittle to discuss MassTransit, a message bus framework for building distributed systems. The conversation begins with an exploration of message buses, their role in asynchronous and durable application design, and how frameworks like MassTransit simplify event-driven programming in .NET. Chris explains concepts like pub/sub, durable messaging, and the benefits of decoupled architectures for scaling and reliability. The discussion also delves into advanced topics such as sagas, stateful consumers for orchestrating complex processes, and how MassTransit supports patterns like outbox and routing slips for ensuring transactional consistency. Chris highlights the importance of observability in distributed systems, sharing how MassTransit integrates with tools like OpenTelemetry to provide comprehensive monitoring. The episode includes advice on adopting event-driven approaches, overcoming leadership hesitancy, and ensuring secure and efficient implementations. Chris emphasizes the balance between leveraging cutting-edge tools and addressing real-world challenges in software architecture. Brought to you by IEEE Computer Society and IEEE Software magazine.
Chris Patterson, founder and principal architect of MassTransit, joins host Jeff Doolittle to discuss MassTransit, a message bus framework for building distributed systems. The conversation begins with an exploration of message buses, their role in asynchronous and durable application design, and how frameworks like MassTransit simplify event-driven programming in .NET. Chris explains concepts like pub/sub, durable messaging, and the benefits of decoupled architectures for scaling and reliability.
The discussion also delves into advanced topics such as sagas, stateful consumers for orchestrating complex processes, and how MassTransit supports patterns like outbox and routing slips for ensuring transactional consistency. Chris highlights the importance of observability in distributed systems, sharing how MassTransit integrates with tools like OpenTelemetry to provide comprehensive monitoring. The episode includes advice on adopting event-driven approaches, overcoming leadership hesitancy, and ensuring secure and efficient implementations. Chris emphasizes the balance between leveraging cutting-edge tools and addressing real-world challenges in software architecture.
Brought to you by IEEE Computer Society and IEEE Software magazine.
Show Notes
From IEEE Computer Society
Related SE Radio Episodes
- SE Radio 539: Adam Dymitruk on Event Modeling
- SE Radio 351: Bernd Rücker on Orchestrating Microservices with Workflow Management
- SE Radio 218: Udi Dahan on CQRS (Command Query Responsibility Segregation)
- SE Radio 447: Michael Perry on Immutable Architecture
- SE Radio 487: Davide Bedin on Dapr Distributed Application Runtime
- SE Radio 470: L. Peter Deutsch on the Fallacies of Distributed Computing
Transcript
Transcript brought to you by IEEE Software magazine and IEEE Computer Society. This transcript was automatically generated. To suggest improvements in the text, please contact [email protected] and include the episode number.
Jeff Doolittle 00:00:18 Welcome to Software Engineering Radio. I’m your host, Jeff Doolittle. I’m excited to invite Chris Patterson as our guest on the show today for a conversation about MassTransit and event-driven systems. Chris is a software architect and an open-source leader with over 30 years of experience in designing, developing and deploying technology solutions. He’s the owner and consultant of Loosely Coupled LLC — a company that provides technology consulting and developer support services for MassTransit, an open-source distributed application framework for .NET. Chris is the founder and primary maintainer of MassTransit, which he has been leading since 2007. He is passionate about creating and contributing to open-source projects that enable developers to build message-based applications with ease and reliability. He regularly produces software development related content on YouTube, sharing his knowledge and expertise with the community. Chris, it’s a pleasure to have you. Welcome to the show.
Chris Patterson 00:01:13 Hey, thanks. What a good introduction. I mean, you basically covered it all.
Jeff Doolittle 00:01:18 Well that’s great. That’s my job. So let’s dive right in. I mentioned at the top of the show something about MassTransit, which basically before we get into MassTransit we have to answer a different question, which is what is a message bus and why should anybody care?
Chris Patterson 00:01:31 That’s a conversation that comes up and it’s something that has historically been a number of different things. If you go back to kind of the early software or service-oriented architectures and the concept of this enterprise service bus was floated around and it was a lot of corporate middleware, it was a lot of big vendor type things. It was generally when people of an Agile and kind of modern software development mindset hear things like enterprise service bus, they think, oh my gosh, that’s just crazy old SOA stuff and, that’s not something we want. And a message bus is probably just a different way of saying that we want to build distributed applications in a durable and reliable way. And typically we do that using message-based message brokers. So things like RabbitMQ, Azure Service Bus, Amazon has SQS, Active MQ, these are message brokers that are able to do durable, reliable delivery of messages asynchronously.
Chris Patterson 00:02:35 So with .NET, for what the past, geez it has to be eight years, we’ve had Async and Await in the task parallel library and people have really adopted that. And the whole framework, if you look at the latest ASP .NETS, everything is Async task. Everything is around doing things asynchronously and parallel concurrently. And it’s really made .NET a highly threat aware, highly scalable framework for building applications. And if you look at the benchmarks and you look at the way they built things, async has become kind of a staple of modern software development using .NET and accompaniment that needs to go along with that is it used to be in our applications, things would be somewhat synchronous. Think about it as a transaction script. I need to parse the request from the customer. I need to store that request in a database.
Chris Patterson 00:03:28 I need to insert some rows into the reporting table. I need to insert some rows into this thing. Things like SQL triggers and all of these ways of trying to build asynchronous processing into it is essentially a start to finish transaction script is how applications were built. Well now that we’re asynchronous, we want to do things like, oh well I can go update those other tables separately. I can do those asynchronously so I’m not slowing down the user response. I want to provide a fast response to the user. So instead of following that kind of transaction script programming model, we are able to use a message bus to produce events that can then asynchronously run and do those things for us. So when a synchronous process completes, such as adding a customer, I could produce an event via message bust that says, hey, a customer was added.
[...]