Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process manager #177

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Eventuous.sln
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eventuous.Tests.Diagnostics
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eventuous.Tests.Application", "src\Core\test\Eventuous.Tests.Application\Eventuous.Tests.Application.csproj", "{2C44A145-81E5-4F43-9C9A-AB3CF822AF82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eventuous.Process", "src\Experimental\src\Eventuous.Process\Eventuous.Process.csproj", "{C5FA2821-4565-4C63-9FC8-4A667329A66F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -361,6 +363,10 @@ Global
{2C44A145-81E5-4F43-9C9A-AB3CF822AF82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C44A145-81E5-4F43-9C9A-AB3CF822AF82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C44A145-81E5-4F43-9C9A-AB3CF822AF82}.Release|Any CPU.Build.0 = Release|Any CPU
{C5FA2821-4565-4C63-9FC8-4A667329A66F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5FA2821-4565-4C63-9FC8-4A667329A66F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5FA2821-4565-4C63-9FC8-4A667329A66F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5FA2821-4565-4C63-9FC8-4A667329A66F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -436,6 +442,7 @@ Global
{3743969A-4635-40DE-B45C-46F80CBB5733} = {7BBD9F8E-EB6A-4E2D-84A9-AF15C1784401}
{EAB7C8CC-FD8D-437B-ADB5-FA02FC62AAF9} = {0ED6785B-60EF-46B4-B938-EF04189FC8BC}
{2C44A145-81E5-4F43-9C9A-AB3CF822AF82} = {0ED6785B-60EF-46B4-B938-EF04189FC8BC}
{C5FA2821-4565-4C63-9FC8-4A667329A66F} = {0E2520E7-B4A6-47E7-AED8-662C88441A84}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0691467B-C257-46DB-BC4F-88EB7CD615B8}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Eventuous.Application/ApplicationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Eventuous;
// [PublicAPI]
public abstract class ApplicationService<TAggregate, TState, TId>
: IApplicationService<TAggregate, TState, TId>, IApplicationService<TAggregate>
where TAggregate : Aggregate<TState>, new()
where TAggregate : Aggregate<TState>
where TState : State<TState>, new()
where TId : AggregateId {
protected IAggregateStore Store { get; }
Expand Down
13 changes: 2 additions & 11 deletions src/Core/src/Eventuous.Application/Eventuous.Application.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Eventuous</RootNamespace>
<IncludeExtensions>true</IncludeExtensions>
<IncludeDiagName>true</IncludeDiagName>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Eventuous.Domain\Eventuous.Domain.csproj" />
<ProjectReference Include="..\Eventuous.Persistence\Eventuous.Persistence.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Eventuous.Diagnostics\DiagnosticName.cs">
<Link>Diagnostics\DiagnosticName.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Exceptions\ExceptionMessages.restext">
<LogicalName>Eventuous.ExceptionMessages.resources</LogicalName>
Expand Down
13 changes: 2 additions & 11 deletions src/Core/src/Eventuous.Persistence/Eventuous.Persistence.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Eventuous</RootNamespace>
<IncludeExtensions>true</IncludeExtensions>
<IncludeDiagName>true</IncludeDiagName>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Eventuous.Diagnostics\DiagnosticName.cs">
<Link>Diagnostics\DiagnosticName.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Eventuous.Diagnostics\Eventuous.Diagnostics.csproj" />
<ProjectReference Include="..\Eventuous.Domain\Eventuous.Domain.csproj" />
Expand Down
15 changes: 4 additions & 11 deletions src/Core/src/Eventuous.Producers/Eventuous.Producers.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeExtensions>true</IncludeExtensions>
<IncludeDiagName>true</IncludeDiagName>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Eventuous.Diagnostics\Eventuous.Diagnostics.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Eventuous.Diagnostics\DiagnosticName.cs">
<Link>Diagnostics\DiagnosticName.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeExtensions>true</IncludeExtensions>
<IncludeDiagName>true</IncludeDiagName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
Expand All @@ -15,15 +17,6 @@
<None Remove="Eventuous.Subscriptions.csproj.DotSettings" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Eventuous.Diagnostics\DiagnosticName.cs">
<Link>Diagnostics\DiagnosticName.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="..\Eventuous.Shared\Tools\TypeExtensions.cs">
<Link>Tools\TypeExtensions.cs</Link>
</Compile>
Expand Down
13 changes: 13 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@
<ItemGroup Condition="'$(IncludeTestHelpers)' == 'true'">
<ProjectReference Include="$(RepoRoot)\test\Eventuous.TestHelpers\Eventuous.TestHelpers.csproj"/>
</ItemGroup>
<ItemGroup Condition="'$(IncludeExtensions)' == 'true'">
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(IncludeDiagName)' == 'true'">
<Compile Include="$(CoreRoot)\Eventuous.Diagnostics\DiagnosticName.cs">
<Link>Diagnostics\DiagnosticName.cs</Link>
</Compile>
</ItemGroup>

<Target Name="CustomVersion" AfterTargets="MinVer">
<PropertyGroup>
Expand Down
31 changes: 13 additions & 18 deletions src/EventStore/src/Eventuous.EventStore/Eventuous.EventStore.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EventStore.Client.Grpc.PersistentSubscriptions" />
<PackageReference Include="EventStore.Client.Grpc.Streams" />
<PackageReference Include="EventStore.Client.Grpc.PersistentSubscriptions"/>
<PackageReference Include="EventStore.Client.Grpc.Streams"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Persistence\Eventuous.Persistence.csproj" />
<ProjectReference Include="$(ExtRoot)\Eventuous.AspNetCore\Eventuous.AspNetCore.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj"/>
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj"/>
<ProjectReference Include="$(CoreRoot)\Eventuous.Persistence\Eventuous.Persistence.csproj"/>
<ProjectReference Include="$(ExtRoot)\Eventuous.AspNetCore\Eventuous.AspNetCore.csproj"/>
</ItemGroup>
<ItemGroup>
<Using Include="EventStore.Client" />
<Using Include="Eventuous.Subscriptions" />
<Using Include="Microsoft.Extensions.Logging" />
<Using Include="EventStore.Client"/>
<Using Include="Eventuous.Subscriptions"/>
<Using Include="Microsoft.Extensions.Logging"/>
</ItemGroup>
<ItemGroup>
<None Remove="Eventuous.EventStore.csproj.DotSettings" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<None Remove="Eventuous.EventStore.csproj.DotSettings"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NEST" />
<PackageReference Include="Polly" />
Expand All @@ -8,12 +11,4 @@
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Persistence\Eventuous.Persistence.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/Experimental/src/Eventuous.Process/Eventuous.Process.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Application\Eventuous.Application.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Domain\Eventuous.Domain.csproj" />
</ItemGroup>
</Project>
12 changes: 12 additions & 0 deletions src/Experimental/src/Eventuous.Process/Process.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (C) Ubiquitous AS. All rights reserved
// Licensed under the Apache License, Version 2.0.

namespace Eventuous.Process;

public abstract record ProcessId : AggregateId {
protected ProcessId(string value) : base(value) { }
}

public abstract record ProcessState<T> : State<T> where T : ProcessState<T> { }

public abstract class Process<TState> : Aggregate<TState> where TState : ProcessState<TState>, new() { }
14 changes: 14 additions & 0 deletions src/Experimental/src/Eventuous.Process/ProcessManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (C) Ubiquitous AS. All rights reserved
// Licensed under the Apache License, Version 2.0.

namespace Eventuous.Process;

public abstract class ProcessManager<T, TState, TId> : ApplicationService<T, TState, TId>
where T : Process<TState> where TState : ProcessState<TState>, new() where TId : ProcessId {
protected ProcessManager(
IAggregateStore store,
AggregateFactoryRegistry? factoryRegistry = null,
StreamNameMap? streamNameMap = null,
TypeMapper? typeMap = null
) : base(store, factoryRegistry, streamNameMap, typeMap) { }
}
18 changes: 8 additions & 10 deletions src/Gateway/src/Eventuous.Gateway/Eventuous.Gateway.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj"/>
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj"/>
</ItemGroup>
<ItemGroup>
<Using Include="Eventuous.Producers" />
<Using Include="Eventuous.Subscriptions" />
<Using Include="Eventuous.Producers"/>
<Using Include="Eventuous.Subscriptions"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Cloud.PubSub.V1" />
<PackageReference Include="Google.Cloud.PubSub.V1"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj"/>
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj"/>
</ItemGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<Using Include="Google.Cloud.PubSub.V1" />
<Using Include="Google.Protobuf" />
<Using Include="Microsoft.Extensions.Logging" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<Using Include="Google.Cloud.PubSub.V1"/>
<Using Include="Google.Protobuf"/>
<Using Include="Microsoft.Extensions.Logging"/>
</ItemGroup>
</Project>
19 changes: 6 additions & 13 deletions src/Kafka/src/Eventuous.Kafka/Eventuous.Kafka.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Producers\Eventuous.Producers.csproj"/>
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj"/>
</ItemGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Confluent.Kafka" />
<PackageReference Include="Confluent.Kafka"/>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Eventuous.Tests.Kafka" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<InternalsVisibleTo Include="Eventuous.Tests.Kafka"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeExtensions>true</IncludeExtensions>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MongoDB.Driver" />
<PackageReference Include="System.Reactive" />
<PackageReference Include="MongoDB.Driver"/>
<PackageReference Include="System.Reactive"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj" />
<ProjectReference Include="$(CoreRoot)\Eventuous.Subscriptions\Eventuous.Subscriptions.csproj"/>
</ItemGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
<None Remove="Eventuous.Projections.MongoDB.csproj.DotSettings" />
<None Include="README.md" Pack="true" PackagePath="\"/>
<None Remove="Eventuous.Projections.MongoDB.csproj.DotSettings"/>
</ItemGroup>
<ItemGroup>
<Using Include="MongoDB.Driver" />
<Using Include="Eventuous.Subscriptions" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\TaskExtensions.cs">
<Link>Tools\TaskExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreRoot)\Eventuous.Shared\Tools\Ensure.cs">
<Link>Tools\Ensure.cs</Link>
</Compile>
<Using Include="MongoDB.Driver"/>
<Using Include="Eventuous.Subscriptions"/>
</ItemGroup>
</Project>
Loading