
Students will learn the basics about microservices and best practices that should be followed.
This lecture will provide students with a clear understanding of CQRS.
This lecture will provide students with a clear understanding of Event Sourcing.
Students will be provided with an architectural overview of the microservices that they are going to create.
Students will be introduced to Apache Kafka.
This video provides an introduction to the Setup & Structure section.
This lecture details all the prerequisites that should be installed before we can start to create our microservices.
Students will learn how to run Apache Kafka in Docker, using Docker Compose.
Students will learn how to run MongoDB in Docker.
Students will learn how to run Microsoft SQL in Docker.
Students will learn how to do the basic project setup for their microservices.
Students will learn how to add project references to each of their respective microservices projects using CLI.
Students are going to add the required NuGet Packages to each of their respective microservices projects.
Students are going to learn how to setup debug configurations for .NET applications in VS Code.
Students will learn what a command message is, and what it is used for.
In this lecture students will create all the social media command objects.
Students will learn what an event message is, and what it is used for.
In this lecture students will create all the social media event objects.
Students will learn how the mediator pattern can be used to implement the Command dispatching mechanism in a CQRS based application.
Students will create the ICommandDispatcher interface.
Students are going to implement the CommandDispatcher class, which will dispatch a given command to its relevant command handler method.
Students are provided with a definition of an aggregate.
Students are going to create the AggregateRoot class, which is the entity within the AccountAggregate, that is responsible for keeping it in a consistent state.
Students are going to implement part 1 of the PostAggregate.
Students are going to implement part 2 of the PostAggregate.
Students will be provided with a definition of an Event Store, and be presented with key aspects that need to be considered when creating an event store.
Students are going to create the EventModel that represents the schema of the event records / documents that will be stored to the event store.
Students are going to create the IEventStoreRepository which will provide an interface abstraction for interacting with the event store / write database.
Students are going to implement the EventStoreRepository class.
Students will create the IEventStore interface, which is an interface abstraction for accessing the event store business logic.
Students are going to implement the EventStore.
Students are going to create the IEventSourcingHandler interface.
Students are going to implement the EventSourcingHandler class.
Students are presented with a UML class diagram again, to illustrate that the CommandHandler interface and implementation, as the abstract and concrete colleagues, are the last parts that need to be developed to complete the mediator pattern for the command dispatching mechanism of the CQRS architecture.
Students will create the ICommandHandler interface.
Students are going to implement the CommandHandler class.
Students are going to register all the command handlers.
Students will be introduced to important Kafka concepts by means of Kafka architecture diagrams.
Students are going to create the IEventProducer interface and implement the EventProducer, through which they will produce the event messages to Kafka.
Students will learn how to produce an event from the EventStore business logic code once an event has been successfully persisted to the Event Store.
In this lecture, students will be introduced to a few key Domain-Driven Design concepts to ensure that they understand how to implement the domain-layer correctly.
Students are going create the PostEntity and the CommentEntity, each representing a table in MS SQL.
Students are going to define the IPostRepository interface, which will provide an interface abstraction through which the read database can be queried.
Students are going to define the ICommentRepository interface, which will provide an interface abstraction through which the read database can be queried.
This lecture provides an introduction to the read database section.
Students are going to create the DatabaseContext which will enable them to define the read database context, and to execute Entity Framework Core queries against the read database.
Students will learn how they can programmatically create the database and tables through the DatabaseContext (once off) on startup.
Students are going to implement the PostRepository, which is based on the repository pattern, to interact with the read database, and to insert, update and remove posts.
Students are going to implement the CommentRepository, which is based on the repository pattern, to interact with the read database, and to insert, update and remove comments.
In this course, you will learn how to create .NET microservices that comply with the CQRS and Event Sourcing patterns.
You will not use any CQRS framework, but you will write every line of code that is required to effectively create your own CQRS and Event Sourcing framework using C# and Apache Kafka. While this might sound a little daunting, you will be carefully guided step by step, and gain all the know-how and confidence to become an expert in CQRS and Event Sourcing.
By the end of this course, you will know how to:
Handle commands and raise events.
Use the mediator pattern to implement command and query dispatchers.
Create and change the state of an aggregate with event messages.
Implement an event store / write database in MongoDB.
Create a read database in MS SQL.
Apply event versioning.
Implement optimistic concurrency control.
Produce events to Apache Kafka.
Consume events from Apache Kafka to populate and alter records in the read database.
Replay the event store and recreate the state of the aggregate.
Separate read and write concerns.
Structure your code using Domain-Driven-Design best practices.
Replay the event store to recreate the entire read database.
Replay the event store to recreate the entire read database into a different database type - PostgreSQL.
The ultimate goal of this course is to take a deep-dive into the world of CQRS and Event Sourcing to enable you to create microservices that are super decoupled and extremely scalable.