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

Akka v0.7 live release #483

Merged
merged 299 commits into from
Oct 20, 2014
Merged

Akka v0.7 live release #483

merged 299 commits into from
Oct 20, 2014

Conversation

Aaronontheweb
Copy link
Member

0.7.0 Oct 16 2014

Major new changes and additions in this release, including some breaking changes...

Akka.Cluster Support (pre-release) - Akka.Cluster is now available on NuGet as a pre-release package (has a -pre suffix) and is available for testing. After installing the the Akka.Cluster module you can add take advantage of clustering via configuration, like so:

akka {
    actor {
      provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
    }

    remote {
      log-remote-lifecycle-events = DEBUG
      helios.tcp {
    hostname = "127.0.0.1"
    port = 0
      }
    }

    cluster {
      seed-nodes = [
    "akka.tcp://[email protected]:2551",
    "akka.tcp://[email protected]:2552"]

      auto-down-unreachable-after = 10s
    }
  }

And then use cluster-enabled routing on individual, named routers:

/myAppRouter {
 router = consistent-hashing-pool
  nr-of-instances = 100
  cluster {
    enabled = on
    max-nr-of-instances-per-node = 3
    allow-local-routees = off
    use-role = backend
  }
}

For more information on how clustering works, please see #400

Breaking Changes: Improved Stashing - The old WithUnboundedStash and WithBoundedStash interfaces have been slightly changed and the CurrentStash property has been renamed to Stash. Any old stashing code can be replaced with the following in order to continue working:

public IStash CurrentStash { get { return Stash; } set { Stash=value; } }

The Stash field is now automatically populated with an appropriate stash during the actor creation process and there is no need to set this field at all yourself.

Breaking Changes: Renamed Logger Namespaces - The namespaces, DLL names, and NuGet packages for all logger add-ons have been changed to Akka.Loggers.Xyz. Please install the latest NuGet package (and uninstall the old ones) and update your Akka HOCON configurations accordingly.

Serilog Support - Akka.NET now has an official Serilog logger that you can install via the Akka.Logger.Serilog package. You can register the serilog logger via your HOCON configuration like this:

 loggers=["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"]

New Feature: Priority Mailbox - The PriorityMailbox allows you to define the priority of messages handled by your actors, and this is done by creating your own subclass of either the UnboundedPriorityMailbox or BoundedPriorityMailbox class and implementing the PriorityGenerator method like so:

public class ReplayMailbox : UnboundedPriorityMailbox
{
    protected override int PriorityGenerator(object message)
    {
        if (message is HttpResponseMessage) return 1;
        if (!(message is LoggedHttpRequest)) return 2;
        return 3;
    }
}

The smaller the return value from the PriorityGenerator, the higher the priority of the message. You can then configure your actors to use this mailbox via configuration, using a fully-qualified name:

replay-mailbox {
 mailbox-type: "TrafficSimulator.PlaybackApp.Actors.ReplayMailbox,TrafficSimulator.PlaybackApp"
}

And from this point onward, any actor can be configured to use this mailbox via Props:

Context.ActorOf(Props.Create<ReplayActor>()
                    .WithRouter(new RoundRobinPool(3))
                    .WithMailbox("replay-mailbox"));

New Feature: Test Your Akka.NET Apps Using Akka.TestKit - We've refactored the testing framework used for testing Akka.NET's internals into a test-framework-agnostic NuGet package you can use for unit and integration testing your own Akka.NET apps. Right now we're scarce on documentation so you'll want to take a look at the tests inside the Akka.NET source for reference.

Right now we have Akka.TestKit adapters for both MSTest and XUnit, which you can install to your own project via the following:

MSTest:

install-package Akka.TestKit.VsTest

XUnit:

install-package Akka.TestKit.Xunit

Aaronontheweb and others added 30 commits September 3, 2014 15:10
Added release notes for Akka.NET v0.6.4
In order to get the version correct when creating new packages locally
This should have been fixed together with sha e50d9b2
These values get updated when building anyway.
Increase version in shared AssemblyInfo
Also added the ClusterSpecBase class mentioned in the comments for akkadotnet#369
Complete ClusterDaemon and port AutoDown and AutoDownSpec
HCanber and others added 24 commits October 9, 2014 10:16
Testkit changes.

The number of ExpectMsg overload have been reduced
This is a breaking change. If you get compile errors after this, just reorder the arguments according to the specification:
ExpectMessage(someSortOfSpecToTestIfCorrectMessage, timeout, hint)

Adds a new test, ExpectMsgFrom, function. Works like ExpectMsg but with an extra test that the sender is the expected one.

TestKit.ActorOf with optional name argument has been split to two separate functions
Rename LoggingAdapter to LoggingAdapterBase.
Add new interface LoggingAdapter.
The preferred way of getting a logger inside an actor is:
private readonly LoggingAdapter _log = Context.GetLogger();
The following have been changed to Akka.Loggers.Xyz
- DLL name
- Nuget package name
- Source code folder

Updated AssemblyInfo.cs to follow the standard

Fixes akkadotnet#292
It's not supposed to be public
Replace LogAdapter with ILogger
…ed-on-termination-469

ReceiveTimeout must be cancelled when actor terminates
This is to prepare for upcoming refactorings, in order to minimize merge conflicts.
No actual code changes, just moved functions to ActorCell.FaultHandling.cs in the same order as the appear in actor\dungeon\FaultHandling.scala
…hing

added nuget build support for Akka.Cluster
When building:
    build.cmd Nuget
the package name for cluster will be like this:
   Akka.Cluster.0.6.5-pre1410160612

The numbers after pre are the UTC date and time on the format "yyMMddHHmm" to get an increasing version number of the prerelease package (as long as you build the next version the minute after).

This commit also makes sure that when building pre-release versions of all packages using
    build.cmd Nuget nugetprerelease=dev
the name of Akka.Cluster package use the specified prefix. In this example the name will be:
   Akka.Cluster.0.6.5-dev1410160612
Move fault handling related functions in ActorCell to ActorCell.FaultHandling.cs
…sender-456

FIX: Actor PreRestart(): wrong message and sender akkadotnet#456
Aaronontheweb added a commit that referenced this pull request Oct 20, 2014
@Aaronontheweb Aaronontheweb merged commit af2b5de into akkadotnet:master Oct 20, 2014
@Aaronontheweb
Copy link
Member Author

Please note that Akka.Cluster is a pre-release NuGet package: http://www.nuget.org/packages/Akka.Cluster

So you'll need to use the -pre suffix when you install it:

Install-Package Akka.Cluster -Pre

@HCanber
Copy link
Contributor

HCanber commented Oct 21, 2014

@Aaronontheweb Build and publish this nuspec file: https://gist.github.com/HCanber/ef36eab814f1fd7364d3
It's a Akka.NLog v0.7 that automatically installs the new Akka.Logger.NLog package and displays a readme with instructions what the user should do to use the new package.

@Aaronontheweb
Copy link
Member Author

@HCanber sure thing Hakan - I'll take care of this today.

@Aaronontheweb
Copy link
Member Author

@HCanber done - does this look right to you?

http://www.nuget.org/packages/Akka.NLog/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants