Microservices Patterns by Chris Richardson Chapter 6 Developing business logic with event sourcing
Event sourcing is a different way of structuring the business logic and persisting aggregates. It persists an aggregate as a sequence of events. Each event represents a state change of the aggregate. An application recreates the current state of an aggregate by replaying the events. Traditional applications usually use RDB and ORM approach for data persistence. But it has several drawbacks and limitations:Object-Relational impedance mismatch.Lack of aggregate history.Implementing audit loggin...
Microservices Patterns by Chris Richardson Chapter 6 Developing business logic with event sourcing
Event sourcing is a different way of structuring the business logic and persisting aggregates. It persists an aggregate as a sequence of events. Each event represents a state change of the aggregate. An application recreates the current state of an aggregate by replaying the events. Traditional applications usually use RDB and ORM approach for data persistence. But it has several drawbacks and limitations:Object-Relational impedance mismatch.Lack of aggregate history.Implementing audit loggin...
Microservices Patterns by Chris Richardson Chapter 5 Designing business logic in a microservice architecture
In traditional object-oriented design, a domain model is a collection of classes and relationships between classes. The classes are usually organized into packages. But interestingly, the explicit boundaries of each business object are missing from this kind of traditional domain model. This lack of boundaries can sometimes cause problems, especially in microservice architecture.Aggregates have explicit boundariesAn aggregate is a cluster of domain objects within a boundary that can be treate...
Microservices Patterns by Chris Richardson Chapter 5 Designing business logic in a microservice architecture
In traditional object-oriented design, a domain model is a collection of classes and relationships between classes. The classes are usually organized into packages. But interestingly, the explicit boundaries of each business object are missing from this kind of traditional domain model. This lack of boundaries can sometimes cause problems, especially in microservice architecture.Aggregates have explicit boundariesAn aggregate is a cluster of domain objects within a boundary that can be treate...
Microservices Patterns by Chris Richardson Chapter 4 Managing transactions with sagas
My personal short notes after reading the book. In reality, even monolithic applications typically don’t use textbook ACID transactions. For example, many applications use a lower transaction isolation level in order to improve performance. Also, many important business processes, such as transferring money between accounts at different banks, are eventually consistent. The traditional approach to maintaining data consistency across multiple services, databases, or message brokers is to use d...
Microservices Patterns by Chris Richardson Chapter 4 Managing transactions with sagas
My personal short notes after reading the book. In reality, even monolithic applications typically don’t use textbook ACID transactions. For example, many applications use a lower transaction isolation level in order to improve performance. Also, many important business processes, such as transferring money between accounts at different banks, are eventually consistent. The traditional approach to maintaining data consistency across multiple services, databases, or message brokers is to use d...
Microservices Patterns by Chris Richardson Chapter 3 Interprocess communication in a microservice architecture
My personal short notes after reading the book.Overview of interprocess communication in a microservice architectureSynchronous request/response-based communicationRESTBinary gRPC or AvroOther JSON/XML RPCAsynchronous, message-based communicationAMQPSTOMPInteraction stylesOne-to-one (Request/response, Asynchronous request/response, One-way notifications)One-to-many (Publish/subscribe, Publish/async responses)API-first design is essential – review the interface definition with the client devel...
Microservices Patterns by Chris Richardson Chapter 3 Interprocess communication in a microservice architecture
My personal short notes after reading the book.Overview of interprocess communication in a microservice architectureSynchronous request/response-based communicationRESTBinary gRPC or AvroOther JSON/XML RPCAsynchronous, message-based communicationAMQPSTOMPInteraction stylesOne-to-one (Request/response, Asynchronous request/response, One-way notifications)One-to-many (Publish/subscribe, Publish/async responses)API-first design is essential – review the interface definition with the client devel...
Microservices Patterns by Chris Richardson Chapter 2 Decomposition strategies
I've found the book "Microservices Patterns" by Chris Richardson mind blowing clear, structural and useful. Some notes which I was doing for myself while was reading the book:What is an architecture?The 4+1 View Model of Software ArchitectureLogical view – classes and packagesImplementation view – modules/packagesProcess view – processes at runtime and IPC (interprocess communication)Deployment – how the processes are mapped to machines+1 – that animate views. Each scenario describes how...
Microservices Patterns by Chris Richardson Chapter 2 Decomposition strategies
I've found the book "Microservices Patterns" by Chris Richardson mind blowing clear, structural and useful. Some notes which I was doing for myself while was reading the book:What is an architecture?The 4+1 View Model of Software ArchitectureLogical view – classes and packagesImplementation view – modules/packagesProcess view – processes at runtime and IPC (interprocess communication)Deployment – how the processes are mapped to machines+1 – that animate views. Each scenario describes how...