Skip to content

Commit

Permalink
Moved MeetingsManagement sample from workshops to the Sample folder
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed May 8, 2021
1 parent 796430c commit 72e22cc
Show file tree
Hide file tree
Showing 171 changed files with 406 additions and 315 deletions.
256 changes: 149 additions & 107 deletions EventSourcing.NetCore.sln

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,24 +488,24 @@ I prepared the self-paced training Kit for the Event Sourcing. See more in the [

It's split into two parts:

**Event Sourcing basics** - it teaches the event store basics by showing how to build your Event Store on Relational Database. It starts with the tables setup, goes through appending events, aggregations, projections, snapshots, and finishes with the `Marten` basics. See more in [here](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/).

1. [Streams Table](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/01-CreateStreamsTable)
2. [Events Table](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/02-CreateEventsTable)
3. [Appending Events](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/03-CreateAppendEventFunction)
4. [Optimistic Concurrency Handling](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/03-OptimisticConcurrency)
5. [Event Store Methods](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/04-EventStoreMethods)
6. [Stream Aggregation](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/05-StreamAggregation)
7. [Time Travelling](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/06-TimeTraveling)
8. [Aggregate and Repositories](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/07-AggregateAndRepository)
9. [Snapshots](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/08-Snapshots)
10. [Projections](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/09-Projections)
11. [Projections With Marten](./Workshops/BuildYourOwnEventStore/01-EventStoreBasics/10-ProjectionsWithMarten)
**Event Sourcing basics** - it teaches the event store basics by showing how to build your Event Store on Relational Database. It starts with the tables setup, goes through appending events, aggregations, projections, snapshots, and finishes with the `Marten` basics. See more in [here](./Workshops/BuildYourOwnEventStore/).

1. [Streams Table](./Workshops/BuildYourOwnEventStore/01-CreateStreamsTable)
2. [Events Table](./Workshops/BuildYourOwnEventStore/02-CreateEventsTable)
3. [Appending Events](./Workshops/BuildYourOwnEventStore/03-CreateAppendEventFunction)
4. [Optimistic Concurrency Handling](./Workshops/BuildYourOwnEventStore/03-OptimisticConcurrency)
5. [Event Store Methods](./Workshops/BuildYourOwnEventStore/04-EventStoreMethods)
6. [Stream Aggregation](./Workshops/BuildYourOwnEventStore/05-StreamAggregation)
7. [Time Travelling](./Workshops/BuildYourOwnEventStore/06-TimeTraveling)
8. [Aggregate and Repositories](./Workshops/BuildYourOwnEventStore/07-AggregateAndRepository)
9. [Snapshots](./Workshops/BuildYourOwnEventStore/08-Snapshots)
10. [Projections](./Workshops/BuildYourOwnEventStore/09-Projections)
11. [Projections With Marten](./Workshops/BuildYourOwnEventStore/10-ProjectionsWithMarten)

**Event Sourcing advanced topics** - it's a real-world sample of the microservices written in Event-Driven design. It explains the topics of modularity, eventual consistency. Shows practical usage of WebApi, Marten as Event Store, Kafka as Event bus and ElasticSearch as one of the read stores. See more in [here](./Workshops/BuildYourOwnEventStore/02-EventSourcingAdvanced/).

1. [Meetings Management Module](./Workshops/BuildYourOwnEventStore/02-EventSourcingAdvanced/MeetingsManagement) - the module responsible for creating, updating meeting details. Written in `Marten` in **Event Sourcing** pattern. Provides both write model (with Event Sourced aggregates) and read model with projections.
2. [Meetings Search Module](./Workshops/BuildYourOwnEventStore/02-EventSourcingAdvanced/MeetingsSearch) - responsible for searching and advanced filtering. Uses `ElasticSearch` as storage (because of its advanced searching capabilities). It's a read module that's listening for the events published by the Meetings Management Module.
1. [Meetings Management Module](./Workshops/Sample/MeetingsManagement) - the module responsible for creating, updating meeting details. Written in `Marten` in **Event Sourcing** pattern. Provides both write model (with Event Sourced aggregates) and read model with projections.
2. [Meetings Search Module](./Workshops/Sample/MeetingsSearch) - responsible for searching and advanced filtering. Uses `ElasticSearch` as storage (because of its advanced searching capabilities). It's a read module that's listening for the events published by the Meetings Management Module.

## 11. NuGet packages to help you get started.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core.Streaming.Kafka\Core.Streaming.Kafka.csproj" />
<ProjectReference Include="..\..\..\Core.Streaming.Kafka\Core.Streaming.Kafka.csproj" />
<ProjectReference Include="..\MeetingsManagement\MeetingsManagement.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core.Testing\Core.Testing.csproj" />
<ProjectReference Include="..\..\..\Core.Testing\Core.Testing.csproj" />
<ProjectReference Include="..\MeetingsManagement.Api\MeetingsManagement.Api.csproj" />
<ProjectReference Include="..\MeetingsManagement\MeetingsManagement.csproj" />
</ItemGroup>
Expand Down
103 changes: 103 additions & 0 deletions Sample/MeetingsManagement/MeetingsManagement.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.438
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{F42A029E-95A2-481F-91B1-91BCEAF0663F}"
ProjectSection(SolutionItems) = preProject
..\docker\docker-compose.yml = ..\docker\docker-compose.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "postgres", "postgres", "{D1583A8B-B89F-47C5-9145-F82C7D434897}"
ProjectSection(SolutionItems) = preProject
..\docker\postgres\variables.env = ..\docker\postgres\variables.env
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{28E16DFD-5C55-4C59-9829-B77B0ABBBF55}"
ProjectSection(SolutionItems) = preProject
Readme.md = Readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "..\..\Core\Core.csproj", "{2E79E47A-7AA2-4843-ABE8-B535495DF8F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Marten", "..\..\Core.Marten\Core.Marten.csproj", "{31ABC8F7-C632-4D32-9586-65F18EDA1916}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Streaming.Kafka", "..\..\Core.Streaming.Kafka\Core.Streaming.Kafka.csproj", "{1F206BA4-8E67-48B0-8E47-5246DA6EFB7D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Streaming", "..\..\Core.Streaming\Core.Streaming.csproj", "{E936B698-88EF-42D4-A51B-F7FE3E36A1DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Testing", "..\..\Core.Testing\Core.Testing.csproj", "{4773E9E2-0F69-48DD-89A1-DFF525507FF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsManagement", "MeetingsManagement\MeetingsManagement.csproj", "{D6E09C85-AF7F-43B4-B8C8-F5D0612A78DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsManagement.Api", "MeetingsManagement.Api\MeetingsManagement.Api.csproj", "{55E6B3DA-5699-4FAE-8270-3F0F3DBDC0F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsManagement.IntegrationTests", "MeetingsManagement.IntegrationTests\MeetingsManagement.IntegrationTests.csproj", "{33DED4AA-834E-4799-8F1A-D28612B02FAC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsSearch", "MeetingsSearch\MeetingsSearch.csproj", "{2304E33A-EA72-49F3-A4ED-EBCF4F04D789}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsSearch.Api", "MeetingsSearch.Api\MeetingsSearch.Api.csproj", "{E1BF8101-C2C7-464A-A464-0840CC787188}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingsSearch.IntegrationTests", "MeetingsSearch.IntegrationTests\MeetingsSearch.IntegrationTests.csproj", "{224CAF4C-10EB-4AF7-8949-F7EE475E3B43}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2E79E47A-7AA2-4843-ABE8-B535495DF8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E79E47A-7AA2-4843-ABE8-B535495DF8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E79E47A-7AA2-4843-ABE8-B535495DF8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E79E47A-7AA2-4843-ABE8-B535495DF8F3}.Release|Any CPU.Build.0 = Release|Any CPU
{31ABC8F7-C632-4D32-9586-65F18EDA1916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31ABC8F7-C632-4D32-9586-65F18EDA1916}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31ABC8F7-C632-4D32-9586-65F18EDA1916}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31ABC8F7-C632-4D32-9586-65F18EDA1916}.Release|Any CPU.Build.0 = Release|Any CPU
{1F206BA4-8E67-48B0-8E47-5246DA6EFB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F206BA4-8E67-48B0-8E47-5246DA6EFB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F206BA4-8E67-48B0-8E47-5246DA6EFB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F206BA4-8E67-48B0-8E47-5246DA6EFB7D}.Release|Any CPU.Build.0 = Release|Any CPU
{E936B698-88EF-42D4-A51B-F7FE3E36A1DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E936B698-88EF-42D4-A51B-F7FE3E36A1DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E936B698-88EF-42D4-A51B-F7FE3E36A1DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E936B698-88EF-42D4-A51B-F7FE3E36A1DF}.Release|Any CPU.Build.0 = Release|Any CPU
{4773E9E2-0F69-48DD-89A1-DFF525507FF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4773E9E2-0F69-48DD-89A1-DFF525507FF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4773E9E2-0F69-48DD-89A1-DFF525507FF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4773E9E2-0F69-48DD-89A1-DFF525507FF3}.Release|Any CPU.Build.0 = Release|Any CPU
{D6E09C85-AF7F-43B4-B8C8-F5D0612A78DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6E09C85-AF7F-43B4-B8C8-F5D0612A78DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6E09C85-AF7F-43B4-B8C8-F5D0612A78DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6E09C85-AF7F-43B4-B8C8-F5D0612A78DA}.Release|Any CPU.Build.0 = Release|Any CPU
{55E6B3DA-5699-4FAE-8270-3F0F3DBDC0F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55E6B3DA-5699-4FAE-8270-3F0F3DBDC0F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55E6B3DA-5699-4FAE-8270-3F0F3DBDC0F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55E6B3DA-5699-4FAE-8270-3F0F3DBDC0F7}.Release|Any CPU.Build.0 = Release|Any CPU
{33DED4AA-834E-4799-8F1A-D28612B02FAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33DED4AA-834E-4799-8F1A-D28612B02FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33DED4AA-834E-4799-8F1A-D28612B02FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33DED4AA-834E-4799-8F1A-D28612B02FAC}.Release|Any CPU.Build.0 = Release|Any CPU
{2304E33A-EA72-49F3-A4ED-EBCF4F04D789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2304E33A-EA72-49F3-A4ED-EBCF4F04D789}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2304E33A-EA72-49F3-A4ED-EBCF4F04D789}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2304E33A-EA72-49F3-A4ED-EBCF4F04D789}.Release|Any CPU.Build.0 = Release|Any CPU
{E1BF8101-C2C7-464A-A464-0840CC787188}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1BF8101-C2C7-464A-A464-0840CC787188}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1BF8101-C2C7-464A-A464-0840CC787188}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1BF8101-C2C7-464A-A464-0840CC787188}.Release|Any CPU.Build.0 = Release|Any CPU
{224CAF4C-10EB-4AF7-8949-F7EE475E3B43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{224CAF4C-10EB-4AF7-8949-F7EE475E3B43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{224CAF4C-10EB-4AF7-8949-F7EE475E3B43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{224CAF4C-10EB-4AF7-8949-F7EE475E3B43}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D1583A8B-B89F-47C5-9145-F82C7D434897} = {F42A029E-95A2-481F-91B1-91BCEAF0663F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F7A7AC90-022D-4C06-91A8-29B808FA444B}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core.Marten\Core.Marten.csproj" />
<ProjectReference Include="..\..\..\..\Core\Core.csproj" />
<ProjectReference Include="..\..\..\Core.Marten\Core.Marten.csproj" />
<ProjectReference Include="..\..\..\Core\Core.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core.Streaming.Kafka\Core.Streaming.Kafka.csproj" />
<ProjectReference Include="..\..\..\Core.Streaming.Kafka\Core.Streaming.Kafka.csproj" />
<ProjectReference Include="..\MeetingsSearch\MeetingsSearch.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core.Testing\Core.Testing.csproj" />
<ProjectReference Include="..\..\..\Core.Testing\Core.Testing.csproj" />
<ProjectReference Include="..\MeetingsSearch.Api\MeetingsSearch.Api.csproj" />
<ProjectReference Include="..\MeetingsSearch\MeetingsSearch.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Core\Core.csproj" />
<ProjectReference Include="..\..\..\Core\Core.csproj" />
</ItemGroup>
</Project>
39 changes: 39 additions & 0 deletions Sample/MeetingsManagement/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Build Your Own Event Store Self-Paced Kit

## Prerequisities

1. Install git - https://git-scm.com/downloads.
2. Install .NET 5 - https://dotnet.microsoft.com/download/dotnet/5.0.
3. Install Visual Studio 2019, Rider or VSCode.
4. Install docker - https://docs.docker.com/docker-for-windows/install/.
5. Make sure that you have ~10GB disk space.
6. Create Github Account
7. Clone Project https://github.com/oskardudycz/EventSourcing.NetCore, make sure that's compiling
8. Check https://github.com/jbogard/MediatR, http://jasperfx.github.io/marten/documentation/
9. Open `MeetingsManagement.sln` solution.
10. Docker useful commands

- `docker-compose up` - start dockers
- `docker-compose kill` - to stop running dockers.
- `docker-compose down -v` - to clean stopped dockers.
- `docker ps` - for showing running dockers
- `docker ps -a` - to show all dockers (also stopped)

11. Wait until all dockers got are downloaded and running.
12. You should automatically get:

- Postgres DB running
- PG Admin - IDE for postgres. Available at: http://localhost:5050.
- Login: `admin@pgadmin.org`, Password: `admin`
- To connect to server Use host: `postgres`, user: `postgres`, password: `Password12!`
- Kafka
- Kafka ide for browsing topics. Available at: http://localhost:8000
- ElasticSearch
- Kibana for browsing ElasticSearch - http://localhost:5601

## Description

It's a real world sample of the microservices written in Event-Driven design. It explains the topics of modularity, eventual consistency. Shows practical usage of WebApi, Marten as Event Store, Kafka as Event bus and ElasticSearch as one of the read stores. See more in [here](./02-EventSourcingAdvanced/).

1. [Meetings Management Module](./MeetingsManagement) - module responsible for creating, updating meetings details. Written in `Marten` in **Event Sourcing** pattern. Provides both write model (with Event Sourced aggregates) and read model with projections.
2. [Meetings Search Module](./MeetingsSearch) - responsible for searching and advanced filtering. Uses `ElasticSearch` as a storage (because of it's advanced searching capabilities). It's a read module that's listening for the events published by Meetings Management Module.
Loading

0 comments on commit 72e22cc

Please sign in to comment.