An event-driven architecture uses events to communicate and coordinate between decoupled services. Applications built using event-driven principles can be highly scalable, resilient, and extensible - essential qualities for large modern applications. These architectures also align with and take advantage of the capabilities of modern cloud providers.
This course gives architects, designers, and software engineers a foundation in event-driven architecture so they can determine when, why, and how to design effective event-driven applications. The course is technology-neutral, so students will be able to understand and apply what they learn regardless of their technology platform. A focus on Kafka exposes students to a popular platform for event-driven architectures. Through illustrations and workshops, students practice what is taught so they can start to design their own event-driven solutions.
Prerequisites
This course is aimed at solution architects, software engineers, and developers. Students should have a general knowledge of application architecture or design. Prior experience with RESTful APIs, messaging, or development using asynchronous/multithreaded applications is useful but not required. The course is technology-neutral and does not assume knowledge of any particular development technology. Workshops are paper exercises and do not involve coding.
Outline
Chapter 1: Introduction to Event-Driven Architectures
- Event-driven thinking and motivation for event-driven architectures
- Characteristics of event-driven architectures and high-level parts
- Benefits, challenges, and use cases
- Relationship between microservices and event-driven architectures
Chapter 2: The Fundamentals of an Event-Driven Architecture
- Foundational definitions
- Event types and the event structures that support them
- Producers, consumers, and server events
- Kinds of event consumers - simple, complex, and streaming.
Illustration - UberBeats 0.1
- Throughout the course an example - the hypothetical UberBeats application - is developed to illustrate the concepts discussed and show in practical terms how each section builds on the previous material.
Workshop 1 - An Event-Driven architecture
- Working in groups, students develop an event-driven architecture. Workshops present a problem and guide students towards a solution while given groups creative freedom to exercise their understanding of the material and develop their own solutions. Workshops are taken up as a class so groups see different solutions and learn from each other.
Chapter 3: Event Brokers
- Role of event broker in event-driven architectures
- Queuing and pub/sub
- Overview of Kafka.
Chapter 4: Data Schema Management
- Contracts in event-driven architectures
- Explicit and implicit contracts, pros and cons
- Role of a schema in formalizing data format and meaning
- Data representations - JSON, Protocol Buffers, Avro, and CML
- Motivation for schema evolution and strategies
- Principles of event modelling.
- Illustration - UberBeats 0.2
- Workshop 2 - Data contracts
Chapter 5: Integration patterns
- Common integration patterns - change data capture, event sourcing, and Kafka streams
- The CAP theorem and implications for distributed systems
- Good practices to manage consistency concerns
- Managing schema dependency concerns
- Single and multiple consumers, consumer groups, and Kafka Connect.
Chapter 6: Streaming services
- Role of streaming services in event-driven architectures
- Pros, cons, and use cases
- Components to implement a streaming service
- Good practices.
- Illustration - UberBeats 0.3
Chapter 7: Microservices
- Definition and characteristics of microservices
- Relationship between microservices and event-driven architectures
- Integration concerns with services not designed for event-driven architectures.
Chapter 8: Implementing Event-Driven Workflows
- Definition and characteristics of a workflow
- Challenges with workflows and long-running transactions
- Orchestration patterns
- Role and pros/cons of compensating transactions
- Good practices.
- Illustration - UberBeats 0.4
Chapter 9: Event Reprocessing and Deterministic Behaviour
- Event stream concepts, motivation for event reprocessing (what problems does it solve)
- Illustrative use cases
- Requirements - immutability, idempotence
- Managing changes to history (retroactive events)
- Challenges and good practices
- Managing interactions with other systems.