Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 16:48
    SeanKilleen edited #5312
  • 16:47
    SeanKilleen synchronize #5332
  • 16:45
    SeanKilleen synchronize #5330
  • 16:27
    Aaronontheweb commented #5330
  • 16:27
    Aaronontheweb commented #5332
  • 16:26

    Aaronontheweb on dev

    Markdown linting: Blockquotes (… (compare)

  • 16:26
    Aaronontheweb closed #5320
  • 14:42
    SeanKilleen synchronize #5330
  • 14:41
    SeanKilleen synchronize #5332
  • 14:40
    SeanKilleen synchronize #5320
  • 14:40
    SeanKilleen commented #5320
  • Oct 21 18:54
    peirens-bart closed #4095
  • Oct 21 18:46
    Aaronontheweb closed #5310
  • Oct 21 18:16

    Aaronontheweb on dev

    Bump Akka.MultiNode.TestAdapter… (compare)

  • Oct 21 18:16

    Aaronontheweb on nuget

    (compare)

  • Oct 21 18:16
    Aaronontheweb closed #5335
  • Oct 21 16:10

    dependabot[bot] on nuget

    (compare)

  • Oct 21 16:10
    dependabot[bot] closed #5299
  • Oct 21 16:10
    dependabot[bot] commented #5299
  • Oct 21 16:10
    dependabot[bot] labeled #5336
Robbert
@Robbert-Driven-It
Btw thanks for taking the time to respond.
Robbert
@Robbert-Driven-It
The only complicating factor I can think of is that this remaining node isn’t a seeding node, it has a dynamic port, so it isn’t in the initalcontact list either. Joins the cluster correctly by contacting the initial node and then (after a while) I shutdown the initial node.. the remaining node moves to become a leader but then the webapi clusterclient stops being able to deliver messages to the cluster, it’s like it doesn’t know the remaining node is even there.
Michael Handschuh
@mchandschuh
Is the source code available for Akka.DistributedData and Akka.DistributedData.LightningDb? If so where? I was unable to find it in the akka.net and petabridge github accounts
rlugmania
@rlugmania
image.png
Aaron Stannard
@Aaronontheweb
But once the original cluster node is down not a single clusterclient.send message gets processed. So even though there is a prefectly healthy clusternode the clusterclient isn’t able to reach it.. I think from what you are telling me my expectation that this should work is correct so perhaps There is some configuration or something that’s causing this.
what do your roles settings look like for the ClusterClientReceptionist ?
issue might be how the two halves are configured @Robbert-Driven-It
if you can post your HOCON either here or in a Github Discussion I'd be happy to help diagnose
@mchandschuh the answer @rlugmania gave you is correct - that stuff is tucked away in the /src/contrib folder
even though it's all part of "core" akka.net
guess that's a bit of legacy baggage from when those modules were still experimental years ago
Michael Handschuh
@mchandschuh
I did end up stumbling upon it :) for some reason I had never looked in that folder, lots of goodies in there!
Markus Schaber
@markusschaber
Are there any more practical examples for cluster sharding than on https://getakka.net/articles/clustering/cluster-sharding.html?
Aaron Stannard
@Aaronontheweb
(I'm in the process of updating that workshop so it can be done entirely online - it used to be part of an in-person workshop back in 2019 when we first wrote it)
Seth B Spearman
@sethspearman
I just read Aaron's How to Build Headless Akka.Net Services with IHostedService and watched the video. So does IHostedService means that you no longer need Topshelf to easily convert my console app to a windows service? Are the technologies incompatible?
I have a console app built with akka that makes httpclient calls...and was trying to make the api calls resilient using Polly (retry, circuit breaker, timeout etc) but i was not successful in setting all of this up because I could not get the HttpClientFactory into the actur through the constuctor. It is not necessary to use DI but those are the only examples I can find.
Manuel Islas
@trentcioran

@trentcioran that sounds like a great use case for Akka.Streams IMHO

Thank you @Aaronontheweb I'll take a look at Akka streams

Aaron Stannard
@Aaronontheweb
@/all Akka.NET v1.4.22 is now live on nuget - thanks to everyone who contributed to this release and to all of our users https://twitter.com/AkkaDotNET/status/1423432856114761731
Markus Schaber
@markusschaber
@Aaronontheweb Thanks a lot. looks nice!
Markus Schaber
@markusschaber
Is there any explanation of how the EntityId and ShardId are constructed?
My assumption is that EntityId is a string completely under my control, and ShardId is to be derived somehow like HashCode of EntityId, then mod number of shards?
And is there any way of which cluster members are utilized to hold shard instances? I'd like to restrain entity types to certain groups of nodes, while being able to send messages to them from other groups.
mijoki
@mijoki
You can set the ShardId manually. It can just be difficult to evenly distribute the entities over the entire cluster so people often use the consistent hashing. If you want to though you can absolutely pick and choose where entities go
1 reply
Seth B Spearman
@sethspearman
I got my app working with DI! Yeah. Still wondering if you can use Topshelf with IHostedService (or if my akka IHostedService can be easily made into a Windows Service without Topshelf). Sorry I know a little bit off-topic.
Aaron Stannard
@Aaronontheweb
@markusschaber EntityId is totally under your control - that gets extracted via the IMessageExtractor you use to configure the sharding system
ShardId can be extracted the same way - but the default implementation of Akka.Cluster.Sharding that most users adopt, the HashCodeMessageExtractor, uses a Murmur3 (consistent hashing algorithm) hash of your EntityId to determine which shard [0,n] your entity belongs to
it's possible to customize this so you can collocate shards together
which is very useful for certain types of applications, i.e. graph search where you want all related entities to be collocated together in-memory (by being in the same shard) in order to reduce latency
but 99% of Akka.NET users never really need to do this
the HashCodeMessageExtractor is usually good enough
Aaron Stannard
@Aaronontheweb
@sethspearman hi Seth, not off-topic at all
IHostedService replaces the lion's share of Topshelf's functionality IMHO
looks like they have some extension methods you can use via the System.ServiceProcess.ServiceController NuGet package
which will allow you to run the generic IHost as a Windows Service
Topshelf was a great library that I used for many years but it was finally time for Microsoft to offer a good first party solution there
Markus Schaber
@markusschaber

And is there any way of which cluster members are utilized to hold shard instances? I'd like to restrain entity types to certain groups of nodes, while being able to send messages to them from other groups.

Joust found the answer to this myself, there is a StartProxyAsync method which allows to access shards from "extermal" nodes.

Markus Schaber
@markusschaber
Btw, a teammate created a prototype, and sharding seems to cover our "virtual actors" use cases.
2 replies
Markus Schaber
@markusschaber
Any progress on better debugging support?
akkadotnet/akka.net#1165
Aaron Stannard
@Aaronontheweb
@markusschaber haven't tried setting that up yet - no, even though I think it could be helpful.
Tweega
@Tweega
Could someone tell me if it is supposed to be possible (in F#) to send a discriminated union as a message to an actor? I can only send objects. I can wrap a DU inside an object, which is my work-around for the moment, but just wondering if I should in theory be able to send the DU unwrapped. I am using version 1.4.23 of Akka, Akka.FSharp, and Akka.Remote, running under net5 projects for client and server.
My DU 'objects' are sent to the dead letter box
Bertie2011
@Bertie2011
A couple questions:
Regarding the communication between 2 actors, is there any advantage of a double Tell over a Ask+Tell+PipeTo? Or the other way around?
Besides the order of message processing, is there any disadvantage for the other actors on the same system when using await+Ask / await+Task compared to one of the methods above where a process is split over multiple Receive methods?
Aaron Stannard
@Aaronontheweb
@Bertie2011 Ask + PipeTo is basically two Tell operations but with extra allocations and moving parts
but you do get timeout awareness in that scenario - which you won't get with Tell
I would probably not use Ask + await for operations that are 100% local unless I was modeling a state machine where blocking on the awaits were the easier way to model the execution flow versus using actor behavior-switching
for instance - if I'm implementing an authorization flow inside an actor
Aaron Stannard
@Aaronontheweb
and I have to make the following calls:
  1. Query to see what claims resource requires
  2. Query to see what claims requestor has
  3. Request access token
I think it's much easier to model that inside an actor's ReceiveAsync method