Releases: akkadotnet/akka.net
Akka.NET v1.0.8 Stable Release
1.0.8 April 26 2016
Maintenance release for Akka.NET v1.0.7
Fixes an issue with the 1.0.7 release where the default settings for Akka.Persistence changed and caused potential breaking changes for Akka.Persistence users. Those changes have been reverted back to the same values as previous versions.
General fixes:
- Recovered default journal & snapshot store to default config
- EndpointRegistry fixes
- eliminated allocations with StandardOutWriter
- ClusterSingletonManager - settings update
- Implement spec for standard mailbox combinations in Akka.NET
Commit Stats for v1.0.8
COMMITS | LOC+ | LOC- | AUTHOR |
---|---|---|---|
4 | 240 | 59 | Aaron Stannard |
3 | 268 | 1 | Danthar |
3 | 189 | 2810 | Silv3rcircl3 |
2 | 204 | 4 | Willem Meints |
2 | 161 | 108 | Bartosz Sypytkowski |
2 | 101 | 24 | Sean Gilliam |
1 | 25 | 16 | zbynek001 |
Akka.NET v1.0.7 Stable Release
1.0.7 April 4 2016
Maintenance release for Akka.NET v1.0.6
The biggest changes in Akka.NET 1.0.7 have been made to Akka.Persistence, which is now designed to match the final stable release version in JVM Akka 2.4. Akka.Persistence is on-target to exit beta and become a fully mature module as of Akka.NET 1.5, due in May/June timeframe.
A quick note about 1.5 - JSON.NET will be replaced by Wire as the default serializer going forward, so if you want to be forward-compatible with 1.5 you will need to switch to using Wire today. Learn how to switch to using Wire as the default Akka.NET serializer.
If you install 1.0.7 you may see the following warning appear:
NewtonSoftJsonSerializer has been detected as a default serializer.
It will be obsoleted in Akka.NET starting from version 1.5 in the favor of Wire
for more info visit: http://getakka.net/docs/Serialization#how-to-setup-wire-as-default-serializer
If you want to suppress this message set HOCON{configPath}
config flag to on.
This release also fixes some issues with the Cluster.Tools and Cluster.Sharding NuGet packages, which weren't versioned correctly in previous releases.
Fixes & Changes - Akka.NET Core
- #1667
- Akka IO: ByteIterator and ByteStringbuilder bug fixes
- Hocon Tripple quoted text - Fixes #1687
- Downgrade System.Collections.Immutable to 1.1.36
- Unify immutable collections - Akka.NET core now depends on System.Collections.Immutable.
- #1694 Added safe check in InboxActor when receive timeout is already expired
- Bugfix: DeadLetter filter with Type parameter should call IsInstanceOfType with the correct argument
- Akka.IO bind failed must notify bindCommander of failure
- ReceiveActor: Replaced Receive(Func<T, Task> handler) by ReceiveAsync(...)
- External ActorSystem for Testkit event filters.
- Fixed the ScatterGatherFirstCompleted router logic
- Issue #1766 - Lazy evaluation of ChildrenContainer.Children and ChildrenContainer.Stats
- [Dispatch] Support for 'mailbox-requirement' and 'mailbox-type' in dispatcher config
- Fixed within timeout for routers in default configuration
- Default MailboxType optimization
- Warning about JSON.NET obsolete in v1.5
- Issue #1828 Implemented NobodySurrogate
Fixes & Changes - Akka.Remote, Akka.Cluster, Et al
- Add the default cluster singleton config as a top-level fallback.
- Change ShardState to a class
- Cluster.Sharding: Take snapshots when configured
- added remote metrics
- Added a new argument to the MultiNodeTestRunner to filter specs
- close #1758 made Akka.Cluster.Tools and Akka.Cluster.Sharding use correct assembly version info and nuget dependencies
- Akka.Remote EndpointWriter backoff bugfix
- Akka.Cluster.TestKit (internal use only)
- Cluster.Tools.Singleton: Member.UpNumber fix
Fixes & Changes - Akka.Persistence
- Made JournalEntry.Payload an object and AtLeastOnceDeliverySemantic public
- Akka.Persistence - update code base to akka JVM v2.4
- Ensure internal stash is unstashed on writes after recovery
- Wrap user stash to avoid confusion between PersistentActor.UnstashAll and PersistentActor.Stash.UnstashAll
- Fixes initialization of LocalSnapshotStore directory
- Fixed global ActorContext in SqlJournal
Commit Stats for v1.0.7
COMMITS | LOC+ | LOC- | AUTHOR |
---|---|---|---|
12 | 1718 | 2213 | Aaron Stannard |
11 | 2187 | 2167 | Silv3rcircl3 |
7 | 433 | 75 | JeffCyr |
6 | 2 | 1127 | Danthar |
6 | 10383 | 3054 | Chris Constantin |
3 | 510 | 25 | maxim.salamatko |
3 | 5 | 3 | Christopher Martin |
2 | 53 | 65 | rogeralsing |
2 | 50 | 1 | mukulsinghsaini |
2 | 2738 | 2035 | Sean Gilliam |
2 | 25 | 4 | Bartosz Sypytkowski |
2 | 2 | 2 | utcnow |
2 | 14 | 13 | zbynek001 |
2 | 130 | 126 | annymsMthd |
1 | 58 | 0 | Denis Kostikov |
1 | 48 | 43 | voltcode |
1 | 213 | 66 | Alex Koshelev |
1 | 2 | 2 | Tamas Vajk |
1 | 2 | 2 | Marc Piechura |
1 | 2 | 1 | Juergen Hoetzel |
1 | 19 | 8 | tstojecki |
1 | 13 | 13 | Willie Ferguson |
1 | 1 | 1 | ravengerUA |
Akka.NET v1.0.6 Stable Release
1.0.6 January 18 2016
Maintenance release for Akka.NET v1.0.5
This patch consists of many bug fixes, performance improvements, as well as the addition of two brand new alpha modules for Akka.Cluster users.
Akka.Cluster.Tools and Akka.Cluster.Sharding
The biggest part of this release is the addition of Akka.Cluster.Tools and Akka.Cluster.Sharding, both of which are available now as pre-release packages on NuGet.
PM> Install-Package Akka.Cluster.Tools -pre
and
PM> Install-Package Akka.Cluster.Sharding -pre
Respectively, these two packages extend Akka.Cluster to do the following:
- Distributed pub/sub (Akka.Cluster.Tools)
ClusterClient
- subscribe to changes in cluster availability without actually being part of the cluster itself. (Akka.Cluster.Tools)ClusterSingleton
- guarantee a single instance of a specific actor throughout the cluster. (Akka.Cluster.Tools)- Sharding - partition data into durable stores (built on top of Akka.Persistence) in a manner that is fault-tolerant and recoverable across thecluster. (Akka.Cluster.Sharding)
Check out the documentation for more details!
- http://getakka.net/docs/clustering/cluster-tools
- http://getakka.net/docs/clustering/cluster-sharding
Fixes & Changes - Akka.NET Core
- Fix incorrect serialization of Unicode characters in NewtonSoftJsonSerializer
- Fixed: Supervisorstrategy does not preserve stacktrace
- added initial performance specs using NBench
- Add wire back as contrib package + Serialization TestKit
- Implemented the RegisterOnTermination feature.
- Increased performance of DedicatedThreadPool
- #1605 updated Google.ProtocolBuffers to 2.4.1.555
- Clear current message - fixes #1609
- Rewrite of the AtomicReference
- Implemented WhenTerminated and Terminate
- Implemented StartTime and Uptime
- API Diff with fixed Approval file
- Fixed: NullReferenceException in Akka.Util.Internal.Collections.ImmutableAvlTreeBase`2.RotateLeft
Fixes & Changes - Akka.Remote & Akka.Cluster
It should be noted that we've improved the throughput from Akka.NET v1.0.5 to 1.0.6 by a factor of 8
- Akka.Cluster.Tools & Akka.Cluster.Sharding with tests and examples
- Added UntrustedSpec
- Akka.Remote Performance - String.Format logging perf fix
- Remoting system upgrade
- PublicHostname defaults to IPAddress.Any when hostname is blank
- Removes code that overrides OFF log level with WARNING.
- fixes issue with Helios message ordering
- Fixed: Actor does not receive "Terminated" message if remoting is used and it is not monitored actor's parent
Fixes & Changes - Akka.Persistence
- Fixed racing conditions on sql-based snapshot stores
- Fix for race conditions in presistence plugins
- Fix #1522 Ensure extensions and persistence plugins are only registered/created once
A special thanks to all of our contributors for making this happen!
18 contributors since release v1.0.5
COMMITS | LOC+ | LOC- | AUTHOR |
---|---|---|---|
22 | 3564 | 28087 | Aaron Stannard |
15 | 1710 | 1303 | rogeralsing |
6 | 569 | 95 | Silv3rcircl3 |
6 | 53594 | 4417 | Bartosz Sypytkowski |
5 | 1786 | 345 | Sean Gilliam |
3 | 786 | 159 | maxim.salamatko |
2 | 765 | 277 | JeffCyr |
2 | 44 | 53 | Chris Constantin |
2 | 14 | 2 | Simon Anderson |
1 | 84 | 4 | Bart de Boer |
1 | 6051 | 27 | danielmarbach |
1 | 6 | 2 | tstojecki |
1 | 3 | 5 | Ralf1108 |
1 | 27 | 0 | Andrew Skotzko |
1 | 2 | 2 | easuter |
1 | 2 | 1 | Danthar |
1 | 182 | 0 | derwasp |
1 | 179 | 0 | Onat Yiğit Mercan |
Akka.NET v1.0.5 Stable Release
1.0.5 December 3 2015
Maintenance release for Akka.NET v1.0.4
This release is a collection of bug fixes, performance enhancements, and general improvements contributed by 29 individual contributors.
Fixes & Changes - Akka.NET Core
- Bugfix: Make the Put on the SimpleDnsCache idempotent
- Add CircuitBreaker Initial based on akka 2.0.5
- Fix for receive timeout in async await actor
- akka-io: fixed High CPU load using the Akka.IO TCP server
- akka-io: Stop select loop on idle
- Serialization fixes
- Fix issue #1301 - inprecise resizing of resizable routers
- Stashing now checks message equality by reference
- rewrote ActorPath.TryParseAddrss to now test Uris by try / catch and use Uri.TryCreate instead
- Port EventBusUnsubscribers
- Add optional PipeTo completion handlers
- Akka context props output to Serilog
Fixes & Changes - Akka.Remote, Akka.Cluster
- MultiNode tests can now be skipped by specifying a SkipReason
- Akka.Remote: Discard msg if payload size > max allowed.
- Throw
TypeLoadException
when an actor type or dependency cannot be found in a remote actor deploy scenario - MultiNode Test Visualizer
- Fix for Akka.Cluster.Routing.ClusterRouterGroupSettings Mono Linux issue
- Added RemoteDeploymentWatcher
- Akka IO Transport: framing support
- #1443 fix for cluster shutdown
Fixes & Changes - Akka.Persistence
- Fixes the NullReferenceException in #1235 and appears to adhere to the practice of including an addres with the serialized binary.
- Port Finite State Machine DSL to Akka.Persistence
- Become and BecomeStacked for ReceivePersistentActor
- Persistent actor stops on recovery failures
- Fixed: data races inside sql journal engine
- fix sqlite.conf and readme
- #1416 created ReceiveActor implementation of AtLeastOnceDeliveryActor base class
A special thanks to all of our contributors, organized below by the number of changes made:
23369 5258 18111 Aaron Stannard
18827 16329 2498 Bartosz Sypytkowski
11994 9496 2498 Steffen Forkmann
6031 4637 1394 maxim.salamatko
1987 1667 320 Graeme Bradbury
1556 1149 407 Sean Gilliam
1118 1118 0 moliver
706 370 336 rogeralsing
616 576 40 Marek Kadek
501 5 496 Alex Koshelev
377 269 108 Jeff Cyr
280 208 72 willieferguson
150 98 52 Christian Palmstierna
85 63 22 Willie Ferguson
77 71 6 Emil Ingerslev
66 61 5 Grover Jackson
60 39 21 Alexander Pantyukhin
56 33 23 Uladzimir Makarau
55 54 1 rdavisau
51 18 33 alex-kondrashov
42 26 16 Silv3rcircl3
36 30 6 evertmulder
33 19 14 Filip Malachowicz
13 11 2 Suhas Chatekar
7 6 1 tintoy
4 2 2 Jonathan
2 1 1 neekgreen
2 1 1 Christopher Martin
2 1 1 Artem Borzilov
Akka.NET v1.0.4 Stable Release
1.0.4 August 07 2015
Maintenance release for Akka.NET v1.0.3
Akka.IO
This release introduces some major new features to Akka.NET, including Akka.IO - a new set of capabilities built directly into the Akka NuGet package that allow you to communicate with your actors directly via TCP and UDP sockets from external (non-actor) systems.
If you want to see a really cool example of Akka.IO in action, look at this sample that shows off how to use the Telnet commandline to interact directly with Akka.NET actors.
Akka.Persistence.MongoDb and Akka.Persistence.Sqlite
Two new flavors of Akka.Persistence support are now available. You can install them via the commandline!
PM> Install-Package Akka.Persistence.MongoDb -pre
and
PM> Install-Package Akka.Persistence.Sqlite -pre
Fixes & Changes - Akka.NET Core
- F# API - problem with discriminated union serialization
- Fix Null Sender issue
- Outdated FsPickler version in Akka.FSharp can lead to runtime errors when other FsPickler-dependent packages are installed
- Add default Ask timeout to HOCON configuration
- Remote watching is repeated
- RemoteDaemon bug, not removing children
- HOCON include support
- Replace SystemNanoTime with MonotonicClock
Akka.DI.StructureMap
We now have support for the StructureMap dependency injection framework out of the box. You can install it here!
PM> Install-Package Akka.DI.StructureMap
Akka.NET v1.0.3 Stable Release
Bugfix release for Akka.NET v1.0.2.
This release addresses an issue with Akka.Persistence.SqlServer and Akka.Persistence.PostgreSql where both packages were missing a reference to Akka.Persistence.Sql.Common.
In Akka.NET v1.0.3 we've packaged Akka.Persistence.Sql.Common into its own NuGet package and referenced it in the affected packages.
Akka.NET v1.0.2 Stable Release
1.0.2 June 2 2015
Bugfix release for Akka.NET v1.0.1.
Fixes & Changes - Akka.NET Core
- Routers seem ignore supervision strategy
- Replaced DateTime.Now with DateTime.UtcNow/MonotonicClock
- DedicatedThreadScheduler
- Add ability to specify scheduler implementation in configuration
- Added generic extensions to EventStream subscribe/unsubscribe.
- Convert null to NoSender.
- Supervisor strategy bad timeouts
- Updated Pigeon.conf throughput values
- Add PipeTo for non-generic Tasks for exception handling
Fixes & Changes - Akka.NET Dependency Injection
- Added Extensions methods to ActorSystem and ActorContext to make DI more accessible
- DIActorProducer fixes
- closes akkadotnet/akka.net#1020 structuremap dependency injection
Fixes & Changes - Akka.Remote and Akka.Cluster
- Fixing up cluster rejoin behavior
- Added dispatcher fixes for remote and cluster
- Fixes to ClusterRouterGroup
- Two actors are created by remote deploy using Props.WithDeploy
Fixes & Changes - Akka.Persistence
- Renamed GuaranteedDelivery classes to AtLeastOnceDelivery
- Changes in Akka.Persistence SQL backend
- PostgreSQL persistence plugin for both event journal and snapshot store
- Cassandra persistence plugin
New Features:
Akka.TestKit.XUnit2
Akka.NET now has support for XUnit 2.0! You can install Akka.TestKit.XUnit2 via the NuGet commandline:
PM> Install-Package Akka.TestKit.XUnit2
Akka.Persistence.PostgreSql and Akka.Persistence.Cassandra
Akka.Persistence now has two additional concrete implementations for PostgreSQL and Cassandra! You can install either of the packages using the following commandline:
Akka.Persistence.PostgreSql Configuration Docs
PM> Install-Package Akka.Persistence.PostgreSql
Akka.Persistence.Cassandra Configuration Docs
PM> Install-Package Akka.Persistence.Cassandra
Akka.DI.StructureMap
Akka.NET's dependency injection system now supports StructureMap! You can install Akka.DI.StructureMap via the NuGet commandline:
PM> Install-Package Akka.DI.StructureMap
Akka.NET v1.0.1 Stable Release
Bugfix release for Akka.NET v1.0.
Fixes:
- v1.0 F# scheduling API not sending any scheduled messages
- PinnedDispatcher - uses single thread for all actors instead of creating persanal thread for every actor
- Hotfix async await when awaiting IO completion port based tasks
- Fix for async await suspend-resume mechanics
- Nested Ask async await causes null-pointer exception in ActorTaskScheduler
- Akka.Remote: can't reply back remotely to child of Pool router
- Context.DI().ActorOf shouldn't require a parameterless constructor
- DIActorContextAdapter uses typeof().Name instead of AssemblyQualifiedName
- IndexOutOfRangeException with RoundRobinRoutingLogic & SmallestMailboxRoutingLogic
New Features:
Akka.TestKit.NUnit
Akka.NET now has support for NUnit inside its TestKit. You can install Akka.TestKit.NUnit via the NuGet commandline:
PM> Install-Package Akka.TestKit.NUnit
Akka.Persistence.SqlServer
The first full implementation of Akka.Persistence is now available for SQL Server.
Read the full instructions for working with Akka.Persistence.SQLServer here.
Akka.NET v1.0 Stable Release
1.0.0 Apr 09 2015
Akka.NET is officially no longer in beta status. The APIs introduced in Akka.NET v1.0 will enjoy long-term support from the Akka.NET development team and all of its professional support partners.
Many breaking changes were introduced between v0.8 and v1.0 in order to provide better future extensibility and flexibility for Akka.NET, and we will outline the major changes in detail in these release notes.
However, if you want full API documentation we recommend going to the following:
Updated Packages with 1.0 Stable Release
All of the following NuGet packages have been upgraded to 1.0 for stable release:
- Akka.NET Core
- Akka.FSharp
- Akka.Remote
- Akka.TestKit
- Akka.DI (dependency injection)
- Akka.Loggers (logging)
The following packages (and modules dependent on them) are still in pre-release status:
- Akka.Cluster
- Akka.Persistence
Introducing Full Mono Support for Akka.NET
One of the biggest changes in Akka.NET v1.0 is the introduction of full Mono support across all modules; we even have Raspberry PI machines talking to laptops over Akka.Remote!
We've tested everything using Mono v3.12.1 across OS X and Ubuntu.
Please let us know how well Akka.NET + Mono runs on your environment!
API Changes in v1.0
All methods returning an ActorRef
now return IActorRef
This is the most significant breaking change introduced in AKka.NET v1.0. Rather than returning the ActorRef
abstract base class from all of the ActorOf
, Sender
and other methods we now return an instance of the IActorRef
interface instead.
This was done in order to guarantee greater future extensibility without additional breaking changes, so we decided to pay off that technical debt now that we're supporting these APIs long-term.
Here's the set of breaking changes you need to be aware of:
- Renamed:
ActorRef
-->IActorRef
ActorRef.Nobody
-->ActorRefs.Nobody
ActorRef.NoSender
-->ActorRefs.NoSender
ActorRef
's operators==
and!=
has been removed. This means all expressions likeactorRef1 == actorRef2
must be replaced withEquals(actorRef1, actorRef2)
Tell(object message)
, i.e. the implicit sender overload, has been moved
to an extension method, and requiresusing Akka.Actor;
to be accessible.- Implicit cast from
ActorRef
toRoutee
has been replaced withRoutee.FromActorRef(actorRef)
async
/ await
Support
ReceiveActor
s now support Async/Await out of the box.
public class MyActor : ReceiveActor
{
public MyActor()
{
Receive<SomeMessage>(async some => {
//we can now safely use await inside this receive handler
await SomeAsyncIO(some.Data);
Sender.Tell(new EverythingIsAllOK());
});
}
}
It is also possible to specify the behavior for the async handler, using AsyncBehavior.Suspend
and AsyncBehavior.Reentrant
as the first argument.
When using Suspend
the normal actor semantics will be preserved, the actor will not be able to process any new messages until the current async operation is completed.
While using Reentrant
will allow the actor to multiplex messages during the await
period.
This does not mean that messages are processed in parallel, we still stay true to "one message at a time", but each await continuation will be piped back to the actor as a message and continue under the actors concurrency constraint.
However, PipeTo
pattern is still the preferred way to perform async operations inside an actor, as it is more explicit and clearly states what is going on.
Switchable Behaviors
In order to make the switchable behavior APIs more understandable for both UntypedActor
and ReceiveActor
we've updated the methods to the following:
Become(newHandler); // become newHandler, without adding previous behavior to the stack (default)
BecomeStacked(newHandler); // become newHandler, without adding previous behavior to the stack (default)
UnbecomeStacked(); //revert to the previous behavior in the stack
The underlying behavior-switching implementation hasn't changed at all - only the names of the methods.
Scheduler APIs
The Context.System.Scheduler
API has been overhauled to be both more extensible and understandable going forward. All of the previous capabilities for the Scheduler
are still available, only in different packaging than they were before.
Here are the new APIs:
Context.System.Scheduler
.ScheduleTellOnce(TimeSpan delay, ICanTell receiver, object message, ActorRef sender);
.ScheduleTellOnce(TimeSpan delay, ICanTell receiver, object message, ActorRef sender, ICancelable cancelable);
.ScheduleTellRepeatedly(TimeSpan initialDelay, TimeSpan interval, ICanTell receiver, object message, ActorRef sender);
.ScheduleTellRepeatedly(TimeSpan initialDelay, TimeSpan interval, ICanTell receiver, object message, ActorRef sender, ICancelable cancelable);
Context.System.Scheduler.Advanced
.ScheduleOnce(TimeSpan delay, Action action);
.ScheduleOnce(TimeSpan delay, Action action, ICancelable cancelable);
.ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, Action action);
.ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, Action action, ICancelable cancelable);
There's also a set of extension methods for specifying delays and intervals in milliseconds as well as methods for all four variants (ScheduleTellOnceCancelable
, ScheduleTellRepeatedlyCancelable
, ScheduleOnceCancelable
, ScheduleRepeatedlyCancelable
) that creates a cancelable, schedules, and returns the cancelable.
Akka.NET Config
now loaded automatically from App.config and Web.config
In previous versions Akka.NET users had to do the following to load Akka.NET HOCON configuration sections from App.config or Web.config:
var section = (AkkaConfigurationSection)ConfigurationManager.GetSection("akka");
var config = section.AkkaConfig;
var actorSystem = ActorSystem.Create("MySystem", config);
As of Akka.NET v1.0 this is now done for you automatically:
var actorSystem = ActorSystem.Create("MySystem"); //automatically loads App/Web.config, if any
Dispatchers
Akka.NET v1.0 introduces the ForkJoinDispatcher
as well as general purpose dispatcher re-use.
Using ForkJoinDispatcher
ForkJoinDispatcher is special - it uses Helios.Concurrency.DedicatedThreadPool
to create a dedicated set of threads for the exclusive use of the actors configured to use a particular ForkJoinDispatcher
instance. All of the remoting actors depend on the default-remote-dispatcher
for instance.
Here's how you can create your own ForkJoinDispatcher instances via Config:
myapp{
my-forkjoin-dispatcher{
type = ForkJoinDispatcher
throughput = 100
dedicated-thread-pool{ #settings for Helios.DedicatedThreadPool
thread-count = 3 #number of threads
#deadlock-timeout = 3s #optional timeout for deadlock detection
threadtype = background #values can be "background" or "foreground"
}
}
}
}
You can then use this specific ForkJoinDispatcher
instance by configuring specific actors to use it, whether it's via config or the fluent interface on Props
:
Config
akka.actor.deploy{
/myActor1{
dispatcher = myapp.my-forkjoin-dispatcher
}
}
Props
var actor = Sys.ActorOf(Props.Create<Foo>().WithDispatcher("myapp.my-forkjoin-dispatcher"));
FluentConfiguration [REMOVED]
FluentConfig
has been removed as we've decided to standardize on HOCON configuration, but if you still want to use the old FluentConfig bits you can find them here: https://github.com/rogeralsing/Akka.FluentConfig
F# API
The F# API has changed to reflect the other C# interface changes, as well as unique additions specific to F#.
In addition to updating the F# API, we've also fixed a long-standing bug with being able to serialize discriminated unions over the wire. This has been resolved.
Interface Renames
In order to comply with .NET naming conventions and standards, all of the following interfaces have been renamed with the I{InterfaceName}
prefix.
The following interfaces have all been renamed to include the I
prefix:
-
Akka.Actor.ActorRefProvider, Akka
(Public) -
Akka.Actor.ActorRefScope, Akka
(Public) -
Akka.Actor.AutoReceivedMessage, Akka
(Public) -
Akka.Actor.Cell, Akka
(Public) -
Akka.Actor.Inboxable, Akka
(Public) -
Akka.Actor.IndirectActorProducer, Akka
(Public) -
Akka.Actor.Internal.ChildrenContainer, Akka
(Public) -
Akka.Actor.Internal.ChildStats, Akka
(Public) -
Akka.Actor.Internal.InternalSupportsTestFSMRef
2, Akka` (Public) -
Akka.Actor.Internal.SuspendReason+WaitingForChildren, Akka
-
Akka.Actor.Internals.InitializableActor, Akka
(Public) -
Akka.Actor.LocalRef, Akka
-
Akka.Actor.LoggingFSM, Akka
(Public) -
Akka.Actor.NoSerializationVerificationNeeded, Akka
(Public) -
Akka.Actor.PossiblyHarmful, Akka
(Public) -
Akka.Actor.RepointableRef, Akka
(Public) -
Akka.Actor.WithBoundedStash, Akka
(Public) -
Akka.Actor.WithUnboundedStash, Akka
(Public) -
Akka.Dispatch.BlockingMessageQueueSemantics, Akka
(Public) -
Akka.Dispatch.BoundedDequeBasedMessageQueueSemantics, Akka
(Public) -
Akka.Dispatch.BoundedMessageQueueSemantics, Akka
(Public) -
Akka.Dispatch.DequeBasedMailbox, Akka
(Public) -
Akka.Dispatch.DequeBasedMessageQueueSemantics, Akka
(Public) - `Akka.Dispatch.MessageQueues.MessageQueu...
Akka.NET v0.8 Stable Release
0.8.0 Feb 11 2015
Dependency Injection support for Ninject, Castle Windsor, and AutoFac. Thanks to some amazing effort from individual contributor (@jcwrequests), Akka.NET now has direct dependency injection support for Ninject, Castle Windsor, and AutoFac.
Here's an example using Ninject, for instance:
// Create and build your container
var container = new Ninject.StandardKernel();
container.Bind().To(typeof(TypedWorker));
container.Bind().To(typeof(WorkerService));
// Create the ActorSystem and Dependency Resolver
var system = ActorSystem.Create("MySystem");
var propsResolver = new NinjectDependencyResolver(container,system);
//Create some actors who need Ninject
var worker1 = system.ActorOf(propsResolver.Create<TypedWorker>(), "Worker1");
var worker2 = system.ActorOf(propsResolver.Create<TypedWorker>(), "Worker2");
//send them messages
worker1.Tell("hi!");
You can install these DI plugins for Akka.NET via NuGet - here's how:
- Ninject -
install-package Akka.DI.Ninject
- Castle Windsor -
install-package Akka.DI.CastleWindsor
- AutoFac -
install-package Akka.DI.AutoFac
Read the full Dependency Injection with Akka.NET documentation here.
Persistent Actors with Akka.Persistence (Alpha). Core contributor @Horusiath ported the majority of Akka's Akka.Persistence and Akka.Persistence.TestKit modules.
Even in the core Akka project these modules are considered to be "experimental," but the goal is to provide actors with a way of automatically saving and recovering their internal state to a configurable durable store - such as a database or filesystem.
Akka.Persistence also introduces the notion of reliable delivery of messages, achieved through the GuaranteedDeliveryActor
.
Akka.Persistence also ships with an FSharp API out of the box, so while this package is in beta you can start playing with it either F# or C# from day one.
If you want to play with Akka.Persistence, please install any one of the following packages:
- Akka.Persistence -
install-package Akka.Persistence -pre
- Akka.Persistence.FSharp -
install-package Akka.Persistence.FSharp -pre
- Akka.Persistence.TestKit -
install-package Akka.Persistence.TestKit -pre
Read the full Persistent Actors with Akka.NET documentation here.
Remote Deployment of Routers and Routees. You can now remotely deploy routers and routees via configuration, like so:
Deploying routees remotely via Config
:
actor.deployment {
/blub {
router = round-robin-pool
nr-of-instances = 2
target.nodes = [""akka.tcp://${sysName}@localhost:${port}""]
}
}
var router = masterActorSystem.ActorOf(new RoundRobinPool(2).Props(Props.Create<Echo>()), "blub");
When deploying a router via configuration, just specify the target.nodes
property with a list of Address
instances for each node you want to deploy your routees.
NOTE: Remote deployment of routees only works for
Pool
routers.
Deploying routers remotely via Config
:
actor.deployment {
/blub {
router = round-robin-pool
nr-of-instances = 2
remote = ""akka.tcp://${sysName}@localhost:${port}""
}
}
var router = masterActorSystem.ActorOf(Props.Create<Echo>().WithRouter(FromConfig.Instance), "blub");
Works just like remote deployment of actors.
If you want to deploy a router remotely via explicit configuration, you can do it in code like this via the RemoteScope
and RemoteRouterConfig
:
Deploying routees remotely via explicit configuration:
var intendedRemoteAddress = Address.Parse("akka.tcp://${sysName}@localhost:${port}"
.Replace("${sysName}", sysName)
.Replace("${port}", port.ToString()));
var router = myActorSystem.ActorOf(new RoundRobinPool(2).Props(Props.Create<Echo>())
.WithDeploy(new Deploy(
new RemoteScope(intendedRemoteAddress.Copy()))), "myRemoteRouter");
Deploying routers remotely via explicit configuration:
var intendedRemoteAddress = Address.Parse("akka.tcp://${sysName}@localhost:${port}"
.Replace("${sysName}", sysName)
.Replace("${port}", port.ToString()));
var router = myActorSystem.ActorOf(
new RemoteRouterConfig(
new RoundRobinPool(2), new[] { new Address("akka.tcp", sysName, "localhost", port) })
.Props(Props.Create<Echo>()), "blub2");
Improved Serialization and Remote Deployment Support. All internals related to serialization and remote deployment have undergone vast improvements in order to support the other work that went into this release.
Pluggable Actor Creation Pipeline. We reworked the plumbing that's used to provide automatic Stash
support and exposed it as a pluggable actor creation pipeline for local actors.
This release adds the ActorProducerPipeline
, which is accessible from ExtendedActorSystem
(to be able to configure by plugins) and allows you to inject custom hooks satisfying following interface:
interface IActorProducerPlugin
{
bool CanBeAppliedTo(Type actorType);
void AfterIncarnated(ActorBase actor, IActorContext context);
void BeforeIncarnated(ActorBase actor, IActorContext context);
}
- CanBeAppliedTo determines if plugin can be applied to specific actor instance.
- AfterIncarnated is applied to actor after it has been instantiated by an
ActorCell
and beforeInitializableActor.Init
method will (optionally) be invoked. - BeforeIncarnated is applied before actor terminates and before
IDisposable.Dispose
method will be invoked (for disposable actors) - auto handling disposable actors is second feature of this commit.
For common use it's better to create custom classes inheriting from ActorProducerPluginBase
and ActorProducerPluginBase<TActor>
classes.
Pipeline itself provides following interface:
class ActorProducerPipeline : IEnumerable<IActorProducerPlugin> {
int Count { get; } // current plugins count - 1 by default (ActorStashPlugin)
bool Register(IActorProducerPlugin plugin)
bool Unregister(IActorProducerPlugin plugin)
bool IsRegistered(IActorProducerPlugin plugin)
bool Insert(int index, IActorProducerPlugin plugin)
}
- Register - registers a plugin if no other plugin of the same type has been registered already (plugins with generic types are counted separately). Returns true if plugin has been registered.
- Insert - same as register, but plugin will be placed in specific place inside the pipeline - useful if any plugins precedence is required.
- Unregister - unregisters specified plugin if it has been found. Returns true if plugin was found and unregistered.
- IsRegistered - checks if plugin has been already registered.
By default pipeline is filled with one already used plugin - ActorStashPlugin
, which replaces stash initialization/unstashing mechanism used up to this moment.
MultiNodeTestRunner and Akka.Remote.TestKit. The MultiNodeTestRunner and the Multi Node TestKit (Akka.Remote.TestKit) underwent some drastic changes in this update. They're still not quite ready for public use yet, but if you want to see what the experience is like you can clone the Akka.NET Github repository and run the following command:
C:\akkadotnet> .\build.cmd MultiNodeTests
This will automatically launch all MultiNodeSpec
instances found inside Akka.Cluster.Tests
. We'll need to make this more flexible to be able to run other assemblies that require multinode tests in the future.
These tests are not enabled by default in normal build runs, but they will at some point in the future.
Here's a sample of the output from the console, to give you a sense of what the reporting looks like:
The MultiNodeTestRunner uses XUnit internally and will dynamically deploy as many processes are needed to satisfy any individual test. Has been tested with up to 6 processes.