Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutando committed May 20, 2018
2 parents 490430f + ccc7235 commit 45e73f1
Show file tree
Hide file tree
Showing 210 changed files with 5,157 additions and 513 deletions.
24 changes: 13 additions & 11 deletions .idea/.idea.Akkatecture/.idea/contentModel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"version": "0.2.0",
"configurations": [
{
"name": "Akkatecture.Examples.UserAccount.Application",
"name": "Akkatecture.Examples.Application",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/examples/simple/Akkatecture.Examples.UserAccount.Application/bin/Debug/netcoreapp2.0/Akkatecture.Examples.UserAccount.Application.dll",
"program": "${workspaceFolder}/examples/simple/Akkatecture.Examples.Application/bin/Debug/netcoreapp2.0/Akkatecture.Examples.Application.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/simple/Akkatecture.Examples.UserAccount.Application",
"cwd": "${workspaceFolder}/examples/simple/Akkatecture.Examples.Application",
"console": "integratedTerminal",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
Expand Down
28 changes: 14 additions & 14 deletions Akkatecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akkatecture.Examples.Seed",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akkatecture.Examples.Worker", "examples\cluster\Akkatecture.Examples.Worker\Akkatecture.Examples.Worker.csproj", "{DD833121-B2AD-4F2E-A12E-B1B28714817A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akkatecture.Examples.UserAccount", "examples\simple\Akkatecture.Examples.UserAccount\Akkatecture.Examples.UserAccount.csproj", "{8D9E347F-26AA-40E6-931B-763DE99F2B01}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akkatecture.Examples.UserAccount.Application", "examples\simple\Akkatecture.Examples.UserAccount.Application\Akkatecture.Examples.UserAccount.Application.csproj", "{2D58822C-DE63-43C6-A50A-384128D22548}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akkatecture.Examples.ClusterClient", "examples\cluster\Akkatecture.Examples.ClusterClient\Akkatecture.Examples.ClusterClient.csproj", "{5513AA4C-5E65-41CC-84AF-6C6003B54F60}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "walkthrough", "walkthrough", "{114EF159-E6C3-43AC-A6C4-7248AC39B6AE}"
Expand All @@ -51,6 +47,10 @@ ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akkatecture.Examples.Application", "examples\simple\Akkatecture.Examples.Application\Akkatecture.Examples.Application.csproj", "{F4512D84-8576-44DB-9F15-E299F62EB9D3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akkatecture.Examples.Domain", "examples\simple\Akkatecture.Examples.Domain\Akkatecture.Examples.Domain.csproj", "{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -81,14 +81,6 @@ Global
{DD833121-B2AD-4F2E-A12E-B1B28714817A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD833121-B2AD-4F2E-A12E-B1B28714817A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD833121-B2AD-4F2E-A12E-B1B28714817A}.Release|Any CPU.Build.0 = Release|Any CPU
{8D9E347F-26AA-40E6-931B-763DE99F2B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D9E347F-26AA-40E6-931B-763DE99F2B01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D9E347F-26AA-40E6-931B-763DE99F2B01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D9E347F-26AA-40E6-931B-763DE99F2B01}.Release|Any CPU.Build.0 = Release|Any CPU
{2D58822C-DE63-43C6-A50A-384128D22548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D58822C-DE63-43C6-A50A-384128D22548}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D58822C-DE63-43C6-A50A-384128D22548}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D58822C-DE63-43C6-A50A-384128D22548}.Release|Any CPU.Build.0 = Release|Any CPU
{5513AA4C-5E65-41CC-84AF-6C6003B54F60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5513AA4C-5E65-41CC-84AF-6C6003B54F60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5513AA4C-5E65-41CC-84AF-6C6003B54F60}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -101,6 +93,14 @@ Global
{1349C01A-9C7F-48FA-A651-2C24F5E8A130}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1349C01A-9C7F-48FA-A651-2C24F5E8A130}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1349C01A-9C7F-48FA-A651-2C24F5E8A130}.Release|Any CPU.Build.0 = Release|Any CPU
{F4512D84-8576-44DB-9F15-E299F62EB9D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4512D84-8576-44DB-9F15-E299F62EB9D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4512D84-8576-44DB-9F15-E299F62EB9D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4512D84-8576-44DB-9F15-E299F62EB9D3}.Release|Any CPU.Build.0 = Release|Any CPU
{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -114,12 +114,12 @@ Global
{F39AA664-CAE8-4592-9173-8D03CABA1C07} = {7522402D-176E-4305-A68B-F3FFBFD38158}
{BEAC89B6-9B71-4BF6-9B3A-4193DE028F7A} = {F39AA664-CAE8-4592-9173-8D03CABA1C07}
{DD833121-B2AD-4F2E-A12E-B1B28714817A} = {F39AA664-CAE8-4592-9173-8D03CABA1C07}
{8D9E347F-26AA-40E6-931B-763DE99F2B01} = {090ECC2F-5647-4B15-ABDF-2E1B44439626}
{2D58822C-DE63-43C6-A50A-384128D22548} = {090ECC2F-5647-4B15-ABDF-2E1B44439626}
{5513AA4C-5E65-41CC-84AF-6C6003B54F60} = {F39AA664-CAE8-4592-9173-8D03CABA1C07}
{114EF159-E6C3-43AC-A6C4-7248AC39B6AE} = {7522402D-176E-4305-A68B-F3FFBFD38158}
{B9F45061-8C53-4F90-ACC3-6A03728F5D1E} = {114EF159-E6C3-43AC-A6C4-7248AC39B6AE}
{1349C01A-9C7F-48FA-A651-2C24F5E8A130} = {114EF159-E6C3-43AC-A6C4-7248AC39B6AE}
{F4512D84-8576-44DB-9F15-E299F62EB9D3} = {090ECC2F-5647-4B15-ABDF-2E1B44439626}
{C104C065-D0CE-42C0-9C43-D8F17ECEA0A0} = {090ECC2F-5647-4B15-ABDF-2E1B44439626}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5A40806-ED71-4286-A37C-BE0364FA29A6}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Akkatecture comes with a few examples on how to best use it:


**Note:** This example is part of the Akkatecture simple example project, so checkout [the
code](https://github.com/Lutando/Akkatecture/blob/master/examples/simple/Akkatecture.Examples.UserAccount.Application/Program.cs#L13) and give it a run.
code](https://github.com/Lutando/Akkatecture/blob/master/examples/simple/Akkatecture.Examples.Application/Program.cs#L13) and give it a run.
```csharp
//Create actor system
var system = ActorSystem.Create("useraccount-example");
Expand Down Expand Up @@ -72,6 +72,7 @@ akkatecture is currently missing these crucial features:
- aggregate state snapshotting.
- persisting event metadata.
- typed actor references.
- schedueled jobs.

### Contributing

Expand Down Expand Up @@ -117,7 +118,7 @@ Akka.net gives us a wealth of good APIs out of the box that can be used to build
## Acknowledgements

- [Akka.NET](https://github.com/akkadotnet/akka.net) - The project which AKkatecture builds ontop of, without akka.net, Akkatecture wouldnt exist.
- [EventFlow](https://github.com/eventflow/EventFlow) - Where Akkatecture draws most of its API surface inspiration from. A large amount of the CQRS/ES/DDD primitives come from that project, and have been adapted to work in the akka eco system.
- [EventFlow](https://github.com/eventflow/EventFlow) - Akkatecture has adapted the api surface from event flow to work in the akka actor world.
- [Nact](https://nact.io/) - For giving us basis to write our [documentation](https://akkatecture.net). Powered by [gatsbyjs](https://www.gatsbyjs.org/).

## License
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 0.1.{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
Expand All @@ -21,16 +20,13 @@
<NeutralLanguage>en-GB</NeutralLanguage>
<PackageReleaseNotes>Externally Updated</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Akkatecture.Clustering\Akkatecture.Clustering.csproj" />
<ProjectReference Include="..\..\simple\Akkatecture.Examples.UserAccount\Akkatecture.Examples.UserAccount.csproj" />
<ProjectReference Include="..\..\simple\Akkatecture.Examples.Domain\Akkatecture.Examples.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="client.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
</Project>
29 changes: 26 additions & 3 deletions examples/cluster/Akkatecture.Examples.ClusterClient/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
using System;
// The MIT License (MIT)
//
// Copyright (c) 2018 Lutando Ngqakaza
// https://github.com/Lutando/Akkatecture
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.IO;
using Akka.Actor;
using Akka.Configuration;
using Akkatecture.Clustering.Configuration;
using Akkatecture.Clustering.Core;
using Akkatecture.Examples.UserAccount.Domain.UserAccountModel;
using Akkatecture.Examples.UserAccount.Domain.UserAccountModel.Commands;
using Akkatecture.Examples.Domain.Model.UserAccount;
using Akkatecture.Examples.Domain.Model.UserAccount.Commands;

namespace Akkatecture.Examples.ClusterClient
{
Expand Down
25 changes: 24 additions & 1 deletion examples/cluster/Akkatecture.Examples.Seed/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
using System;
// The MIT License (MIT)
//
// Copyright (c) 2018 Lutando Ngqakaza
// https://github.com/Lutando/Akkatecture
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.IO;
using Akka.Actor;
using Akka.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
Expand All @@ -21,16 +20,13 @@
<NeutralLanguage>en-GB</NeutralLanguage>
<PackageReleaseNotes>Externally Updated</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Akkatecture.Clustering\Akkatecture.Clustering.csproj" />
<ProjectReference Include="..\..\simple\Akkatecture.Examples.UserAccount\Akkatecture.Examples.UserAccount.csproj" />
<ProjectReference Include="..\..\simple\Akkatecture.Examples.Domain\Akkatecture.Examples.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="worker.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
</Project>
32 changes: 27 additions & 5 deletions examples/cluster/Akkatecture.Examples.Worker/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
using System;
// The MIT License (MIT)
//
// Copyright (c) 2018 Lutando Ngqakaza
// https://github.com/Lutando/Akkatecture
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Akka.Actor;
using Akka.Cluster.Sharding;
using Akka.Configuration;
using Akkatecture.Clustering.Configuration;
using Akkatecture.Clustering.Core;
using Akkatecture.Examples.UserAccount.Domain.UserAccountModel;
using Akkatecture.Examples.Domain.Model.UserAccount;

namespace Akkatecture.Examples.Worker
{
Expand Down Expand Up @@ -62,8 +84,8 @@ public static void Main(string[] args)

public static void StartUserAccountCluster(ActorSystem actorSystem)
{
var cluster = ClusterFactory<UserAccountAggregateManager, UserAccountAggregate, UserAccountId>
.StartAggregateCluster(actorSystem);
ClusterFactory<UserAccountAggregateManager, UserAccountAggregate, UserAccountId>
.StartClusteredAggregate(actorSystem);
}

}
Expand Down
2 changes: 1 addition & 1 deletion examples/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The seed or seed node is only responsible for akka service discovery. Its only p

### Description

This sample uses the same domain model as the one found in the [simple](https://github.com/Lutando/Akkatecture/tree/master/examples/simple/Akkatecture.Examples.UserAccount) sample. Since we are using the same domain model that is used in a simple non-clustered setting, you will now see how with Akkatecture, you can design your domain once and have it scale to 1 or many nodes with just a configuration change. Thanks to actors.
This sample uses the same domain model as the one found in the [simple](https://github.com/Lutando/Akkatecture/tree/master/examples/simple/Akkatecture.Examples.Domain) sample. Since we are using the same domain model that is used in a simple non-clustered setting, you will now see how with Akkatecture, you can design your domain once and have it scale to 1 or many nodes with just a configuration change. Thanks to actors.

If you take a look at the hocon configurations for the [client](https://github.com/Lutando/Akkatecture/tree/master/examples/cluster/Akkatecture.Examples.ClusterClient/client.conf), the [worker](https://github.com/Lutando/Akkatecture/tree/master/examples/cluster/Akkatecture.Examples.Worker/worker.conf), and the [seed](https://github.com/Lutando/Akkatecture/tree/master/examples/cluster/Akkatecture.Examples.Seed/seed.conf), you will see that they all point to the same well known address (127.0.0.1:6000). This address is the seed nodes address, it tells the actor systems to use that address to initiate cluster gossip, and thus to establish the clustered network of actor systems. Each of the projects use the default akkatecture hocon configuration as a fallback configuration because this configuration has akkatecture opinionated "sane" defaults.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Title>Akkatecture.Examples.UserAccount.Application</Title>
<Title>Akkatecture.Examples.Application</Title>
<Authors>Lutando Ngqakaza</Authors>
<Company>Lutando Ngqakaza</Company>
<Copyright>Copyright (c) Lutando Ngqakaza 2018 - 2018</Copyright>
Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Akkatecture.Examples.UserAccount\Akkatecture.Examples.UserAccount.csproj" />
<ProjectReference Include="..\Akkatecture.Examples.Domain\Akkatecture.Examples.Domain.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit 45e73f1

Please sign in to comment.