Skip to content

eyazici90/OrderContext-EventSourcing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrderContext-EventSourcing

enter image description here

This repository is practical EventSourcing implementation on Azure. It mostly aims to implement CQRS, EventSourcing basics towards Serverless way on Azure. ImGalaxy is used for the purpose of providing to use Azure Cosmos DB as stream based EventStore and whole concepts of DDD, CQRS, EventSourcing needs. Change Feed is being used for projecting events from EventStore.

Prerequisites

  • .Net Core 2.2
  • Azure Cosmos DB Instance (You can use Emulator for testing purpose)

Libraries

Big Picture

enter image description here

Requests processing CQRS

Command and Query model are separated by applying CQRS (Command Query Responsibility Segregation) technic.

enter image description here

Solution Description

Command Side

  • OrderContext.Application - Commands and CommandHandlers are within this layer. It basicly handles commands and call that related behavoir in the domain model.
  • OrderContext.Command.API - REST API application. Very thin, hosting Asp.Net Core application.

Query Side

  • OrderContext.Projections- Azure function which is connected to Azure Cosmos DB Change feed. It listens the change feed & project events for real model.
  • OrderContext.Query.API- REST API application. Builds InMemory read model for OrderContext also includes query handler for client needs.

Shared

  • OrderContext.Domain- Domain model around Order bounded context.
  • OrderContext.Domain.Messages- Domain events that can be happen in the Order context.
  • OrderContext.Integration.Events- Events which are getting published to EventBus to communicate with other bounded contexts.

Background Functions

They act as async processes which are connected to Azure CosmosDB Change Feed

  • OrderContext.Integration.Publisher- Azure function which is connected to Azure Cosmos DB Change feed. It tends to publish essential integration events to EventBus.
  • OrderContext.Snapshotter- Azure function which is connected to Azure Cosmos DB Change feed. It takes snapshots of domain model as the snapshot strategy is defined.

Deploy

....

Licence

The project is under MIT license.

About

Practical EventSourcing on Azure around Order Bounded Context

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages