Skip to content

Commit

Permalink
Merge pull request #3508 from Aaronontheweb/v1.4-rebase
Browse files Browse the repository at this point in the history
V1.4 rebase
  • Loading branch information
Aaronontheweb committed Jun 14, 2018
2 parents d6f55fe + d732274 commit 69f4481
Show file tree
Hide file tree
Showing 1,716 changed files with 9,102 additions and 8,910 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ git push origin --delete my-new-branch-123

## Code guidelines

See our [Contributor Guidelines](http://getakka.net/docs/Contributor%20guidelines) for more information on following the project's conventions.
See our [Contributor Guidelines](http://getakka.net/community/contributor-guidelines.html) for more information on following the project's conventions.

---
Props to [NancyFX](https://github.com/NancyFx/Nancy) from which we've "borrowed" some of this text.
129 changes: 127 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,130 @@
#### 1.3.5 February 1 2018 ####
Placeholder for nightlies
#### 1.3.9 June 04 2018 ####
Placeholder for nightlies.

#### 1.3.8 June 04 2018 ####
**Maintenance Release for Akka.NET 1.3**

Akka.NET v1.3.8 is a minor patch consisting mostly of bug fixes as well as an upgrade to DotNetty v0.4.8.

**DotNetty v0.4.8 Upgrade**
You can [read the release notes for DotNetty v0.4.8 here](https://github.com/Azure/DotNetty/blob/5eee925b7597c6b07689f25f328966e330ff58f9/RELEASE_NOTES.md) - but here are the major improvements as they pertain to Akka.NET:

1. DotNetty length-frame decoding is now fully-supported on .NET Core on Linux and
2. Socket shutdown code has been improved, which fixes a potential "port exhaustion" issue reported by Akka.Remote users.

If you've been affected by either of these issues, we strongly encourage that you upgrade your applications to Akka.NET v1.3.8 as soon as possible.

**Updates and Additions**
1. [Akka.Streams: add PreMaterialize support for Sources](https://github.com/akkadotnet/akka.net/pull/3476)
2. [Akka.Streams: add PreMaterialize support for Sinks](https://github.com/akkadotnet/akka.net/pull/3477)
3. [Akka.Streams:
Port Pulse, DelayFlow and Valve streams-contrib stages](https://github.com/akkadotnet/akka.net/pull/3421)
4. [Akka.FSharp: Unit test Akka.FSharp.System.create with extensions](https://github.com/akkadotnet/akka.net/pull/3407)

Relevant documentation for Akka.Streams pre-materialization, for those who are interested: http://getakka.net/articles/streams/basics.html#source-pre-materialization

**Bugfixes**
1. [Akka.Remote: ActorSelection fails for ActorPath from remotely deployed actors](https://github.com/akkadotnet/akka.net/issues/1544)
2. [Akka.Remote: WilcardCard ActorSelections that fail to match any actors don't deliver messages into DeadLetters](https://github.com/akkadotnet/akka.net/issues/3420)
3. [Akka.Cluster: SplitBrainResolver logs "network partition detected" after change in cluster membership, even when no unreachable nodes](https://github.com/akkadotnet/akka.net/issues/3450)
4. [Akka: SynchronizationLockException in user-defined mailboxes](https://github.com/akkadotnet/akka.net/issues/3459)
5. [Akka: UnhandledMessageForwarder crashes and restarted every time the app is starting](https://github.com/akkadotnet/akka.net/issues/3267)

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 17 | 498 | 171 | Aaron Stannard |
| 4 | 1054 | 23 | Bartosz Sypytkowski |
| 2 | 2 | 2 | Fábio Beirão |
| 2 | 16 | 2 | Aaron Palmer |
| 1 | 1063 | 4 | Oleksandr Bogomaz |
| 1 | 1 | 1 | Ismael Hamed |
| 1 | 1 | 1 | Gauthier Segay |

#### 1.3.7 May 15 2018 ####
**Maintenance Release for Akka.NET 1.3**

Akka.NET v1.3.7 is a minor patch consisting mostly of bug fixes.

**DotNetty stabilization**
We've had a number of issues related to DotNetty issues over recent weeks, and we've resolved those in this patch by doing the following:

* [Locking down the version of DotNetty to v0.4.6 until further notice](https://github.com/akkadotnet/akka.net/pull/3410)
* [Resolving memory leaks introduced with DotNetty in v1.3.6](https://github.com/akkadotnet/akka.net/pull/3436)

We will be upgrading to DotNetty v0.4.8 in a near future release, but in the meantime this patch fixes critical issues introduced in v1.3.6.

**Bugfixes**
1. [Akka.Persistence.Sql: Slow reading of big snapshots](https://github.com/akkadotnet/akka.net/issues/3422) - this will require a recompilation of all Akka.Persistence.Sql-type Akka.Persistence plugins.
2. [Akka.Fsharp: spawning an actor results in Exception in 1.3.6 release](https://github.com/akkadotnet/akka.net/issues/3402)

See [the full list of fixes for Akka.NET v1.3.7 here](https://github.com/akkadotnet/akka.net/milestone/25).

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 5 | 130 | 180 | Aaron Stannard |
| 3 | 7 | 1 | chrisjhoare |
| 2 | 3 | 1 | ivog |
| 1 | 70 | 17 | TietoOliverKurowski |
| 1 | 41 | 4 | Bart de Boer |
| 1 | 11 | 3 | Oleksandr Bogomaz |
| 1 | 1 | 1 | Vasily Kirichenko |

#### 1.3.6 April 17 2018 ####
**Maintenance Release for Akka.NET 1.3**

Akka.NET v1.3.6 is a minor patch consisting mostly of bug fixes.

**Akka.FSharp on .NET Standard**
The biggest change in this release is [the availability of Akka.FSharp on .NET Standard and .NET Core](https://github.com/akkadotnet/akka.net/issues/2826)!

Akka.FSharp runs on .NET Standard 2.0 as of 1.3.6 (it doesn't support .NET Standard 1.6 like the rest of Akka.NET due to FSharp-specific, downstream dependencies.)

**Updates and Additions**
1. [Akka.Streams: Port 4 "streams contrib" stages - AccumulateWhileUnchanged, LastElement, PartitionWith, Sample](https://github.com/akkadotnet/akka.net/pull/3375)
2. [Akka.Remote: Add `public-port` setting to allow for port aliasing inside environments like Docker, PCF](https://github.com/akkadotnet/akka.net/issues/3357)

**Bugfixes**
1. [Akka.Cluster.Sharding: Removing string.GetHashCode usage from distributed classes](https://github.com/akkadotnet/akka.net/pull/3363)
2. [Akka.Cluster.Sharding: HashCodeMessageExtractor can create inconsistent ShardId's](https://github.com/akkadotnet/akka.net/issues/3361)
3. [Akka.Remote:
Error while decoding incoming Akka PDU Exception when communicating between Remote Actors with a large number of messages on Linux](https://github.com/akkadotnet/akka.net/issues/3370)
4. [Akka.Cluster.Sharding: DData: Cannot create a shard proxy on a cluster node that is not in the same role as the proxied shard entity](https://github.com/akkadotnet/akka.net/issues/3352)
5. [Akka.Streams: Fix GroupedWithin allocation of new buffer after emit.](https://github.com/akkadotnet/akka.net/pull/3382)
6. [Akka.Persistence: Add missing ReturnRecoveryPermit](https://github.com/akkadotnet/akka.net/pull/3372)

You can see [the full set of changes for Akka.NET v1.3.6 here](hhttps://github.com/akkadotnet/akka.net/milestone/24).

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 7 | 261 | 38 | Aaron Stannard |
| 6 | 28 | 28 | cimryan |
| 5 | 53 | 20 | Tomasz Jaskula |
| 2 | 7 | 4 | Ondrej Pialek |
| 2 | 20 | 10 | Ismael Hamed |
| 1 | 739 | 0 | Oleksandr Bogomaz |
| 1 | 64 | 6 | Robert |
| 1 | 23 | 29 | nathvi |
| 1 | 2 | 1 | Sebastien Bacquet |
| 1 | 1 | 2 | Ondřej Piálek |
| 1 | 1 | 1 | Steffen Skov |
| 1 | 1 | 1 | Sean Gilliam |
| 1 | 1 | 1 | Matthew Herman |
| 1 | 1 | 1 | Jan Pluskal |

#### 1.3.5 February 21 2018 ####
**Maintenance Release for Akka.NET 1.3**

Akka.NET v1.3.5 is a minor patch containing only bugfixes.

**Updates and Bugfixes**
1. [Akka.Cluster.Tools: DistributedPubSub Fix premature pruning of topics](https://github.com/akkadotnet/akka.net/pull/3322)

You can see [the full set of changes for Akka.NET v1.3.4 here](https://github.com/akkadotnet/akka.net/milestone/23).

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 4 | 4405 | 4284 | Aaron Stannard |
| 1 | 4 | 4 | Joshua Garnett |

#### 1.3.4 February 1 2018 ####
**Maintenance Release for Akka.NET 1.3**
Expand Down
31 changes: 19 additions & 12 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,17 @@ Target "NBench" <| fun _ ->
info.FileName <- nbenchTestPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName nbenchTestPath))
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "NBench.Runner failed. %s %s" nbenchTestPath args

nbenchTestAssemblies |> Seq.iter runNBench
if result <> 0 then failwithf "%s %s \nexited with code %i" nbenchTestPath args result

let failedRuns =
nbenchTestAssemblies
|> Seq.map (fun asm -> try runNBench asm; None with e -> Some(e.ToString()))
|> Seq.filter Option.isSome
|> Seq.map Option.get
|> Seq.mapi (fun i s -> sprintf "%i: \"%s\"" (i + 1) s)
|> Seq.toArray
if failedRuns.Length > 0 then
failwithf "NBench.Runner failed for %i run(s):\n%s\n\n" failedRuns.Length (String.concat "\n\n" failedRuns)

//--------------------------------------------------------------------------------
// Nuget targets
Expand All @@ -300,10 +308,10 @@ let overrideVersionSuffix (project:string) =
| _ -> versionSuffix

Target "CreateNuget" (fun _ ->
let projects = !! "src/**/*.csproj"
-- "src/**/*.Tests*.csproj"
-- "src/benchmark/**/*.csproj"
-- "src/examples/**/*.csproj"
let projects = !! "src/**/*.*sproj"
-- "src/**/*.Tests*.*sproj"
-- "src/benchmark/**/*.*sproj"
-- "src/examples/**/*.*sproj"
-- "src/**/*.MultiNodeTestRunner.csproj"
-- "src/**/*.MultiNodeTestRunner.Shared.csproj"
-- "src/**/*.NodeTestRunner.csproj"
Expand Down Expand Up @@ -430,9 +438,9 @@ Target "PublishNuget" (fun _ ->
Target "Protobuf" <| fun _ ->

let protocPath =
if isWindows then findToolInSubPath "protoc.exe" "src/packages/Google.Protobuf.Tools/tools/windows_x64"
elif isMacOS then findToolInSubPath "protoc" "src/packages/Google.Protobuf.Tools/tools/macosx_x64"
else findToolInSubPath "protoc" "src/packages/Google.Protobuf.Tools/tools/linux_x64"
if isWindows then findToolInSubPath "protoc.exe" "tools/Google.Protobuf.Tools/tools/windows_x64"
elif isMacOS then findToolInSubPath "protoc" "tools/Google.Protobuf.Tools/tools/macosx_x64"
else findToolInSubPath "protoc" "tools/Google.Protobuf.Tools/tools/linux_x64"

let protoFiles = [
("WireFormats.proto", "/src/core/Akka.Remote/Serialization/Proto/");
Expand All @@ -444,8 +452,7 @@ Target "Protobuf" <| fun _ ->
("DistributedPubSubMessages.proto", "/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Serialization/Proto/");
("ClusterShardingMessages.proto", "/src/contrib/cluster/Akka.Cluster.Sharding/Serialization/Proto/");
("TestConductorProtocol.proto", "/src/core/Akka.Remote.TestKit/Proto/");
("Persistence.proto", "/src/core/Akka.Persistence/Serialization/Proto/");
("StreamRefMessages.proto", "/src/core/Akka.Streams/Serialization/Proto/")]
("Persistence.proto", "/src/core/Akka.Persistence/Serialization/Proto/") ]

printfn "Using proto.exe: %s" protocPath

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NUGET_URL=https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe
FAKE_VERSION=4.63.0
FAKE_EXE=$TOOLS_DIR/FAKE/tools/FAKE.exe
DOTNET_EXE=$SCRIPT_DIR/.dotnet/dotnet
DOTNET_VERSION=2.0.0
DOTNET_VERSION=1.1.0
DOTNET_INSTALLER_URL=https://raw.githubusercontent.com/dotnet/cli/v$DOTNET_VERSION/scripts/obtain/dotnet-install.sh
PROTOBUF_VERSION=3.4.0

Expand Down
1 change: 1 addition & 0 deletions buildIncremental.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module IncrementalTests =

let getUnitTestProjects runtime =
let allTestProjects = !! "./**/core/**/*.Tests.csproj"
++ "./**/core/**/*.Tests.fsproj"
++ "./**/contrib/**/*.Tests.csproj"
-- "./**/serializers/**/*Wire*.csproj"
allTestProjects
Expand Down
52 changes: 23 additions & 29 deletions docs/articles/actors/receive-actor-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,41 +66,35 @@ public class DemoActor : ReceiveActor
system.ActorOf(DemoActor.Props(42), "demo");
```

Another good practice is to declare what messages an `Actor` can receive in the companion object of the `Actor`, which makes easier to know what it can receive:
Another good practice is to declare local messages (messages that are sent in process) within the Actor, which makes it easier to know what messages are generally being sent over the wire vs in process.:
```csharp
public class DemoMessagesActor : ReceiveActor
public class DemoActor : UntypedActor
{
public class Greeting
protected override void OnReceive(object message)
{
public Greeting(string from)
switch (message)
{
From = from;
}

public string From { get; }
}

public class Goodbye
{
public static Goodbye Instance = new Goodbye();

private Goodbye() {}
}

private ILoggingAdapter log = Context.GetLogger();
case DemoActorLocalMessages.DemoActorLocalMessage1 msg1:
// Handle message here...
break;
case DemoActorLocalMessages.DemoActorLocalMessage2 msg2:
// Handle message here...
break;
default:
break;
}
}

public DemoMessagesActor()
{
Receive<Greeting>(greeting =>
class DemoActorLocalMessages
{
Sender.Tell($"I was greeted by {greeting.From}", Self);
});
public class DemoActorLocalMessage1
{
}

Receive<Goodbye>(_ =>
{
log.Info("Someone said goodbye to me.");
});
}
public class DemoActorLocalMessage2
{
}
}
}
```

Expand Down Expand Up @@ -919,4 +913,4 @@ public class Service : ReceiveActor
If the actor may receive messages before it has been initialized, a useful tool can be the `Stash` to save messages until the initialization finishes, and replaying them after the actor became initialized.

> [!WARNING]
> This pattern should be used with care, and applied only when none of the patterns above are applicable. One of the potential issues is that messages might be lost when sent to remote actors. Also, publishing an `IActorRef` in an uninitialized state might lead to the condition that it receives a user message before the initialization has been done.
> This pattern should be used with care, and applied only when none of the patterns above are applicable. One of the potential issues is that messages might be lost when sent to remote actors. Also, publishing an `IActorRef` in an uninitialized state might lead to the condition that it receives a user message before the initialization has been done.
2 changes: 1 addition & 1 deletion docs/articles/clustering/cluster-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A `ClusterEvent.MemberUp` message will cause the cluster to add a new routee (al

## Types of Clustered Routers
### Clustered `Group` Routers
The first type of router we're going to look at at clustered `Group` routers.
The first type of router we're going to look at is clustered `Group` routers.

![Akka.Cluster group routers in action](/images/akka-cluster-routers.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/clustering/distributed-publish-subscribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If all the subscribed actors have different group names, then this works like no
> Note that if the group id is used it is part of the topic identifier. Messages published with `SendOneMessageToEachGroup=false` will not be delivered to subscribers that subscribed with a group id. Messages published with `SendOneMessageToEachGroup=true` will not be delivered to subscribers that subscribed without a group id.
## Send
This is a point-to-point mode where each message is delivered to one destination, but you still does not have to know where the destination is located. A typical usage of this mode is private chat to one other user in an instant messaging application. It can also be used for distributing tasks to registered workers, like a cluster aware router where the routees dynamically can register themselves.
This is a point-to-point mode where each message is delivered to one destination, but you still do not have to know where the destination is located. A typical usage of this mode is private chat to one other user in an instant messaging application. It can also be used for distributing tasks to registered workers, like a cluster aware router where the routees dynamically can register themselves.

The message will be delivered to one recipient with a matching path, if any such exists in the registry. If several entries match the path because it has been registered on several nodes the message will be sent via the supplied `RoutingLogic` (default random) to one destination. The sender() of the message can specify that local affinity is preferred, i.e. the message is sent to an actor in the same local actor system as the used mediator actor, if any such exists, otherwise route to any other matching entry.

Expand Down
4 changes: 4 additions & 0 deletions docs/articles/configuration/akka.cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Akka.Cluster Configuration
Below is the default HOCON configuration for the base `Akka.Cluster` package.

[!code[Akka.Cluster.dll HOCON Configuration](../../../src/core/Akka.Cluster/Configuration/Cluster.conf)]
4 changes: 4 additions & 0 deletions docs/articles/configuration/akka.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Akka Configuration
Below is the default HOCON configuration for the base `Akka` package.

[!code[Akka.dll HOCON Configuration](../../../src/core/Akka/Configuration/Pigeon.conf)]
4 changes: 4 additions & 0 deletions docs/articles/configuration/akka.persistence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Akka.Persistence Configuration
Below is the default HOCON configuration for the base `Akka.Persistence` package.

[!code[Akka.Persistence.dll HOCON Configuration](../../../src/core/Akka.Persistence/persistence.conf)]
4 changes: 4 additions & 0 deletions docs/articles/configuration/akka.remote.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Akka.Remote Configuration
Below is the default HOCON configuration for the base `Akka.Remote` package.

[!code[Akka.Remote.dll HOCON Configuration](../../../src/core/Akka.Remote/Configuration/Remote.conf)]
4 changes: 4 additions & 0 deletions docs/articles/configuration/akka.streams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Akka.Streams Configuration
Below is the default HOCON configuration for the base `Akka.Steams` package.

[!code[Akka.Streams.dll HOCON Configuration](../../../src/core/Akka.Streams/reference.conf)]
8 changes: 8 additions & 0 deletions docs/articles/configuration/akka.testkit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Akka.TestKit Configuration
Below is the default HOCON configuration for the base `Akka.TestKit` package.

[!code[Akka.TestKit.dll HOCON Configuration](../../../src/core/Akka.TestKit/Internal/Reference.conf)]

Additionally, it's also possible to change the default [`IScheduler` implementation](../../api/Akka.Actor.IScheduler.yml) in the `Akka.TestKit` to use [a virtualized `TestScheduler` implementation](../../api/Akka.TestKit.TestScheduler.yml) that Akka.NET developers can use to artificially advance time forward. To swap in the `TestScheduler`, developers will want to include the HOCON below:

[!code[Akka.TestKit.dll TestScheduler HOCON Configuration](../../../src/core/Akka.TestKit/Configs/TestScheduler.conf)]
12 changes: 12 additions & 0 deletions docs/articles/configuration/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: Akka
href: akka.md
- name: Akka.Remote
href: akka.remote.md
- name: Akka.Cluster
href: akka.cluster.md
- name: Akka.Persistence
href: akka.persistence.md
- name: Akka.Streams
href: akka.streams.md
- name: Akka.TestKit
href: akka.testkit.md

0 comments on commit 69f4481

Please sign in to comment.