Book description
Many forces affect software today: larger datasets, geographical disparities, complex company structures, and the growing need to be fast and nimble in the face of change. Proven approaches such as service-oriented and event-driven architectures are joined by newer techniques such as microservices, reactive architectures, DevOps, and stream processing. Many of these patterns are successful by themselves, but as this practical ebook demonstrates, they provide a more holistic and compelling approach when applied together.
Author Ben Stopford explains how service-based architectures and stream processing tools such as Apache Kafka can help you build business-critical systems. You’ll learn how to apply patterns including Event Sourcing and CQRS, and how to build multi-team systems with microservices and SOA using patterns such as "inside out databases" and "event streams as a source of truth." These approaches provide a unique foundation for how these large, autonomous service ecosystems can communicate and share data.
- Learn why streaming beats request-response based architectures in complex, contemporary use cases
- Understand why replayable logs such as Kafka provide a backbone for both service communication and shared datasets
- Explore how event collaboration and event sourcing patterns increase safety and recoverability with functional, event-driven approaches
- Build service ecosystems that blend event-driven and request-driven interfaces using a replayable log and Kafka’s Streams API
- Scale beyond individual teams into larger, department- and company-sized architectures, using event streams as a source of truth
Table of contents
- Foreword
- Preface
- I. Setting the Stage
- 1. Introduction
- 2. The Origins of Streaming
- 3. Is Kafka What You Think It Is?
-
4. Beyond Messaging: An Overview of the Kafka Broker
- The Log: An Efficient Structure for Retaining and Distributing Messages
- Linear Scalability
- Segregating Load in Multiservice Ecosystems
- Maintaining Strong Ordering Guarantees
- Ensuring Messages Are Durable
- Load-Balance Services and Make Them Highly Available
- Compacted Topics
- Long-Term Data Storage
- Security
- Summary
- II. Designing Event-Driven Systems
- 5. Events: A Basis for Collaboration
- 6. Processing Events with Stateful Functions
-
7. Event Sourcing, CQRS, and Other Stateful Patterns
- Event Sourcing, Command Sourcing, and CQRS in a Nutshell
- Version Control for Your Data
- Making Events the Source of Truth
- Command Query Responsibility Segregation
- Materialized Views
- Polyglot Views
- Whole Fact or Delta?
-
Implementing Event Sourcing and CQRS with Kafka
- Build In-Process Views with Tables and State Stores in Kafka Streams
- Writing Through a Database into a Kafka Topic with Kafka Connect
- Writing Through a State Store to a Kafka Topic in Kafka Streams
- Unlocking Legacy Systems with CDC
- Query a Read-Optimized View Created in a Database
- Memory Images/Prepopulated Caches
- The Event-Sourced View
- Summary
- III. Rethinking Architecture at Company Scales
- 8. Sharing Data and Services Across an Organization
- 9. Event Streams as a Shared Source of Truth
- 10. Lean Data
- IV. Consistency, Concurrency, and Evolution
- 11. Consistency and Concurrency in Event-Driven Systems
-
12. Transactions, but Not as We Know Them
- The Duplicates Problem
- Using the Transactions API to Remove Duplicates
- Exactly Once Is Both Idempotence and Atomic Commit
- How Kafka’s Transactions Work Under the Covers
- Store State and Send Events Atomically
- Do We Need Transactions? Can We Do All This with Idempotence?
- What Can’t Transactions Do?
- Making Use of Transactions in Your Services
- Summary
- 13. Evolving Schemas and Data over Time
- V. Implementing Streaming Services with Kafka
- 14. Kafka Streams and KSQL
-
15. Building Streaming Services
- An Order Validation Ecosystem
- Join-Filter-Process
- Event-Sourced Views in Kafka Streams
- Collapsing CQRS with a Blocking Read
- Scaling Concurrent Operations in Streaming Systems
- Rekey to Join
- Repartitioning and Staged Execution
- Waiting for N Events
- Reflecting on the Design
- A More Holistic Streaming Ecosystem
- Summary
Product information
- Title: Designing Event-Driven Systems
- Author(s):
- Release date: May 2018
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492038245
You might also like
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
Designing Data-Intensive Applications, 2nd Edition
Data is at the center of many challenges in system design today. Difficult issues such as …
book
Software Architecture Patterns, 2nd Edition
The success of any software application or system depends on the architecture style you use. This …
audiobook
Software Architecture: The Hard Parts
There are no easy decisions in software architecture. Instead, there are many hard parts-difficult problems or …