Event-driven systems present challenges but offer durability, autonomy, and flexibility. The podcast explores event-driven architecture, its problems and solutions. Topics include choreography vs orchestration, event sourcing, CQRS, and cloud-based workflow solutions. The speakers discuss autonomy and loose coupling in event-driven systems, design trade-offs, changing implementations, and the importance of organizational structure in software development.
Event-driven architecture allows services to react to events and perform actions based on them, solving problems in distributed operations.
Choreography and orchestration are two approaches in event-driven architecture, with choreography promoting loose coupling and autonomy, and orchestration providing explicit control and visibility.
Event-driven systems help organize data mutations in microservices-based systems, improving scalability, resilience, and latency while maintaining autonomy.
Deep dives
Event-driven architecture and its definition
Event-driven architecture is a system or application where different parts of the application communicate or collaborate using events. Events represent things that occur within a given domain, such as an account being created or a flight departing. This architecture solves problems by allowing services to react to events and perform actions based on them.
Choreography and orchestration in event-driven systems
Choreography is an asynchronous approach where services react to events independently, resembling real-world processes. Orchestration involves a centralized orchestrator that directs the sequence of events and commands across services. Choreography promotes loose coupling and autonomy, while orchestration provides explicit control and visibility into the process.
Benefits of event-driven systems for microservices
Event-driven systems help organize the mutations of data in microservices-based systems. For distributed operations that span multiple services, events can be used to coordinate transactions and ensure consistency. By using choreography or orchestration, services can communicate asynchronously, improving scalability, resilience, and latency while maintaining autonomy.
Implementing event-driven systems
Implementations of event-driven systems can vary depending on the specific requirements and technologies used. Some popular libraries and frameworks, such as NServiceBus, MassTransit, and Watermill, provide abstractions and tools for handling events and managing message delivery. It's important to consider infrastructure challenges, such as data consistency and message ordering, and make use of patterns like transaction outbox and item potent consumers.
Evolving and adapting event-driven systems
Event-driven systems should be designed to evolve and adapt as business needs and requirements change over time. Continuous improvement and reassessment of the architecture, as well as open-mindedness towards adjusting implementation choices, are crucial. This mindset allows organizations to better align their systems with evolving business needs and leverage the flexibility and scalability benefits provided by event-driven architectures.
Event-driven systems may not be the go-to solution for everyone because of the challenges they can add. While the system reacting to events published in other parts of the system seem elegant, some of the complexities they bring can be challenging. However, they do offer durability, autonomy & flexibility.
In this episode, we’ll define event-driven architecture, discuss the problems it solves, challenges it poses & potential solutions.
Changelog++ members save 1 minute on this episode because they made the ads disappear. Join today!
Sponsors:
Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com
Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs.
Typesense – Lightning fast, globally distributed Search-as-a-Service that runs in memory. You literally can’t get any faster!