Creations, Inc. CTO of J-Tech Japan, Inc. Developer of the Sekiban - Event Sourcing and CQRS Framework. Located at Long Beach CA, USA. • X : @tomohisa • Github : @tomohisa • Linkedin : tomohisatakaoka Designing my own 3D printed trackball as Hobby.
Application Development Framework • ASP .NET Core , Modern C# 7, 8 + • Open Sourced in December 2023 with Apache 2.0 ◦ No paid version as for now. • Multiple Event Store Storage Option Available ◦ Azure Cosmos DB (No SQL) ◦ AWS Dynamo DB ◦ PostgreSQL (Azure Cosmos DB Postgres Compatible) • Sponsored by Japan Technical Software
is... Instead of storing just the current state of the data in a domain, use an append-only store to record the full series of actions taken on that data. The store acts as the system of record and can be used to materialize the domain objects. This can simplify tasks in complex domains, by avoiding the need to synchronize the data model and the business domain, while improving performance, scalability, and responsiveness. It can also provide consistency for transactional data, and maintain full audit trails and history that can enable compensating actions. https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing
- Coffee 1 Add 1 Coffee - Coffee 1 - Orange 1 - Coffee 1 - Orange 1 - Tea 1 - Coffee 1 - Tea 1 Add 1 Orange Add 1 Tea Remove 1 Orange 1. Usually state removes records when its deleted. 2. If we save history for every records, it is so many data and hard to find reason for the deletion. (Not saved reason for the event)
that is happened. Add 1 Coffee Add 1 Orange Add 1 Tea Remove 1 Orange 1 Coffee Added 1 Coffee Added 1 Orange Added 1 Coffee Added 1 Orange Added 1 Tea Added 1 Coffee Added 1 Orange Added 1 Tea Added 1 Orange Removed 1. Can use removed data for the data analysis or adding features. 2. Can track histories of the data - audit and debug capabilities.
to make all features for each projects. • Replay Aggregate Events to get State • Snapshots • Optimistic Version Check • Single Thread for each aggregate. • Multiple Aggregate Projection • Event Versions • Multiple Database Support • Testing Framework • Tenant Projections • Web API Integration • Multiple Projections Snapshot • Auto Generate Snapshot in background process. • Event Subscription... Etc...
those feature, Developer don’t need to implement and test each feature, just need to learn how to use it. • Replay Aggregate Events to get State • Snapshots • Optimistic Version Check • Single Thread for each aggregate. • Multiple Aggregate Projection • Event Versions • Multiple Database Support • Testing Framework • Tenant Projections • Web API Integration • Multiple Projections Snapshot • Auto Generate Snapshot in background process. • Event Subscription... Etc...
has power to handle Sekiban’s capability and help us make great applications. • Multi-Region Scalability and Huge Data Availability. ◦ Azure Cosmos DB takes care of the all distributional capabilities. ▪ Partitioning - logical partitions and physical partitions. ▪ Replication ▪ Indexing ▪ Caching ▪ Global Distribution etc...
has power to handle Sekiban’s capability and help us make great applications. • JSON Flexibility ◦ Capable of storing polymorphic data easily. [JsonDerivedType] in C#
has power to handle Sekiban’s capability and help us make great applications. • Hierarchical Partition Key. ◦ Sekiban use Hierarchical Partition Key. ▪ Multi Tenant Data ▪ Aggregate Type ▪ Partition Id for each Aggregate.
focus Small and Medium Enterprise application, we aim to develop more scalablility feature. • Materialized view support. ◦ Even now, developer can build materialized view from event using change feed from Azure Cosmos DB. • More microservices or functions support. ◦ Proxy and shading support for Command and Query side etc...
Create Containers (events, items) in Azure. • Put connection strings and set Database Name on appSettings.json (or secret) • Define Domain Code with Sekiban • WebAPI project can set for infrastructure and API connecting to Domain.
Use Aspire Starter template • easily add Azure Cosmos DB Containers, Postgres Containers. • Inject connection string to the WebAPI project. • Run and test application ※NOTE※ Azure Cosmos DB Container launch slow and before finish initialization, it returns error. You might choose to provide container with docker compose and keep it up while you are in development.
can use power of Azure Cosmos DB with easily develop complex business model using Event Sourcing. • Event Sourcing is a pattern, that needs some understanding and knowledge to getting used to, still very powerful for data usage and audit capabilities. • It will be great tool in your toolbox to easily develop event sourcing application, using framework like Sekiban.
Landing page https://www.sekiban.dev Sekiban GitHub https://github.com/J-Tech-Japan/Sekiban Sekiban Developer Tech Blog in English (new) https://tomohisa.hashnode.dev #NextbeatTechBar