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.NET v1.3.9 Release Notes #3574

Merged
merged 3 commits into from
Aug 23, 2018

Conversation

Aaronontheweb
Copy link
Member

1.3.9 August 22 2018

Maintenance Release for Akka.NET 1.3

Akka.NET v1.3.9 features some major changes to Akka.Cluster.Sharding, additional Akka.Streams stages, and some general bug fixes across the board.

Akka.Cluster.Sharding Improvements
The Akka.Cluster.Sharding documentation already describes some of the major changes in Akka.NET v1.3.9, but we figured it would be worth calling special attention to those changes here.

Props Factory for Entity Actors

In some cases, the actor may need to know the entityId associated with it. This can be achieved using the entityPropsFactory parameter to ClusterSharding.Start or ClusterSharding.StartAsync. The entity ID will be passed to the factory as a parameter, which can then be used in the creation of the actor.

In addition to the existing APIs we've always had for defining sharded entities via Props, Akka.NET v1.3.9 introduces a new method overload for Start and StartAsync which allows users to pass in the entityId of each entity actor as a constructor argument to those entities when they start.

For example:

var anotherCounterShard = ClusterSharding.Get(Sys).Start(
	                        typeName: "AnotherCounter",
	                        entityProps: Props.Create<AnotherCounter>(),
	                        typeName: AnotherCounter.ShardingTypeName,
	                        entityPropsFactory: entityId => AnotherCounter.Props(entityId),
	                        settings: ClusterShardingSettings.Create(Sys),
	                        extractEntityId: Counter.ExtractEntityId,
	                        extractShardId: Counter.ExtractShardId);

This will give you the opportunity to pass in the entityId for each actor as a constructor argument into the Props of your entity actor and possibly other use cases too.

Improvements to Starting and Querying Existing Shard Entity Types
Two additional major usability improvements to Cluster.Sharding come from some API additions and changes.

The first is that it's now possible to look up all of the currently registered shard types via the ClusterSharding.ShardTypeNames property. So long as a ShardRegion of that type has been started in the cluster, that entity type name will be added to the collection exposed by this property.

The other major usability improvement is a change to the ClusterSharding.Start property itself. Historically, you used to have to know whether or not the node you wanted to use sharding on was going to be hosting shards (call ClusterSharding.Start) or simply communicated with shards hosted on a different cluster role type (call ClusterSharding.StartProxy). Going forward, it's safe to call ClusterSharding.Start on any node and you will either receive an IActorRef to active ShardRegion or a ShardRegion running in "proxy only" mode; this is determined by looking at the ClusterShardingSettings and determining if the current node is in a role that is allowed to host shards of this type.

Akka.Streams Additions and Changes
In Akka.NET v1.3.9 we've added some new built-in stream stages and API methods designed to help improve developer productivity and ease of use.

Other Updates, Additions, and Bugfixes

To see the full set of changes for Akka.NET v1.3.9, click here.

COMMITS LOC+ LOC- AUTHOR
28 2448 5691 Aaron Stannard
11 1373 230 zbynek001
8 4590 577 Bartosz Sypytkowski
4 438 99 Ismael Hamed
4 230 240 Sean Gilliam
2 1438 0 Oleksandr Bogomaz
1 86 79 Nick Polideropoulos
1 78 0 v1rusw0rm
1 4 4 Joshua Garnett
1 32 17 Jarl Sveinung Flø Rasmussen
1 27 1 Sam13
1 250 220 Maxim Cherednik
1 184 124 Josh Taylor
1 14 0 Peter Shrosbree
1 1278 42 Marc Piechura
1 1 1 Vasily Kirichenko
1 1 1 Samuel Kelemen
1 1 1 Nyola Mike
1 1 1 Fábio Beirão

@Danthar
Copy link
Member

Danthar commented Aug 23, 2018

LGTM. I think you got all the important highlights.

@Aaronontheweb Aaronontheweb merged commit 9fe4e12 into akkadotnet:dev Aug 23, 2018
@Aaronontheweb Aaronontheweb deleted the v1.3.9-release-notes branch August 23, 2018 14:33
@christallire
Copy link

christallire commented May 26, 2021

In addition to the existing APIs we've always had for defining sharded entities via Props, Akka.NET v1.3.9 introduces a new method overload for Start and StartAsync which allows users to pass in the entityId of each entity actor as a constructor argument to those entities when they start.

We're missing this in the doc. I've went to Scala Akka doc and searched entire issue and just found this

edit: I mean this

@Aaronontheweb
Copy link
Member Author

@christallire ok, I'll add an issue for that

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.

None yet

3 participants