Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 26 18:23

    Aaronontheweb on dev

    Akka.DependencyInjection.Servic… (compare)

  • Jan 26 18:23
    Aaronontheweb closed #4745
  • Jan 26 17:38
    Arkatufus synchronize #4745
  • Jan 26 17:38
    Aaronontheweb milestoned #4745
  • Jan 26 17:38
    Aaronontheweb labeled #4745
  • Jan 26 17:34
    Arkatufus commented #4745
  • Jan 26 15:15
    Aaronontheweb commented #4745
  • Jan 26 15:09
    Arkatufus review_requested #4745
  • Jan 26 15:08
    Arkatufus opened #4745
  • Jan 26 05:54
    ClockGet commented #4744
  • Jan 26 02:29
    ClockGet edited #4744
  • Jan 26 02:28
    ClockGet edited #4744
  • Jan 26 02:27
    ClockGet edited #4744
  • Jan 26 02:25
    ClockGet edited #4744
  • Jan 26 02:25
    ClockGet opened #4744
  • Jan 25 21:02

    Aaronontheweb on 1.4.16

    (compare)

  • Jan 25 21:01

    Aaronontheweb on master

    Bump AkkaVersion from 1.4.14 to… Correct warning on circuit too … Added v1.4.16 release notes (#1… and 1 more (compare)

  • Jan 25 21:01
    Aaronontheweb closed #194
  • Jan 25 21:00
    Aaronontheweb opened #194
  • Jan 25 14:35

    Aaronontheweb on 1.4.16

    (compare)

evaldast
@evaldast
Using Akka.DI with netcore Microsoft Dependency Injection. Was wondering whether there's a way to create an actor using Akka.DI while still being able to pass arguments into constructor from creating actor
Currently, I'm creating child using DI, and then, from the child, Ask()'ing parent for props. This means that I have to sprinkle Receive<> blocks all over parent actor as it's a state machine with multiple Become()s
mrxrsd
@mrxrsd
@evaldast, there are some hacks to achieve this... but u should wait the next release. All DI core will be updated.
to11mtm
@to11mtm

@object I peeked at some of your issues akkadotnet/akka.net#4265 and akkadotnet/Akka.Persistence.SqlServer#190

  • You may or may not want to try logging some threadpool metrics to see whether there's some form of contention going on. This helped us trobleshoot issues where a misconfigured grafana dependency was causing pool explosions when actors would start up/shut down
     ThreadPool.GetAvailableThreads(out int avWt, out int avIot);
     ThreadPool.GetMaxThreads(out int maxWt, out int maxIot);
     var (workerThreads,ioThreads)= (maxWt - avWt,maxIot-avIot); //log this every second
  • If you can enable MVCC (i.e. Enable snapshot Isolation and default isolation level READ_COMMITTED_SNAPSHOT) that could help

  • Might be worth logging the SQL executed in the chunk

  • Mayyyybe try adding some code in the batching process so that if there's only READ commands in the batch, a transaction isn't used.

  • If you're feeling adventurous, you may want to try (it is technically prerelease state) the Linq2db plugin which is based on akka-persistence-jdbc. Code is the branch in akkadotnet/Akka.Persistence.Linq2Db#10 and I have it as a nuget package here. Configuring for 'compatibility mode' (Where it should be both backward and forward compatible with Existing Journal/snapshot) is exampled here. I've been running the journal in not-quite-prod (i.e. syncing data with old system) for a few months now with great success

Vagif Abilov
@object
Thank you @to11mtm. I will paste your suggestions to the original issue, so they won't get buried here. I will definitely continue my investigation.
Gustavo
@sainzg
@Aaronontheweb, how is the connectionstring to be formed for snapshot store when using azure blobs that are setup to run with DefaultAzureCredential ? I can access it from outside akka.persistance but not when I use this.
Cristiano Degiorgis
@crixo
We tried to use Test configuration grab form here https://getakka.net/articles/configuration/akka.testkit.html and it broke up our test suite. Main difference compared to our previous configuration is
scheduler {
implementation = "Akka.TestKit.TestScheduler, Akka.TestKit"
}
and yes we are using a standard scheduler within one our of Actors that due to the new configuration stop sending scheduled messages.
The tests that fail are testing the entire app. IOW they are simulating the execution kicked in the main but using a Testing System created via TestKit.
Aaron Stannard
@Aaronontheweb
next Akka.NET Community Standup will be tomorrow at 1:00pm CST https://www.youtube.com/watch?v=blLK8lH_MQ0
will have some updates on Akka.NET v1.4.15, the new DI system, and more
@sainzg hmmm
not sure off the top of my head
we're using an older version of the Azure Storage Client because the new Cosmos Db one isn't compatible with Azureite petabridge/Akka.Persistence.Azure#125
would you mind opening an issue here? https://github.com/petabridge/Akka.Persistence.Azure/issues
@crixo yeah the TestScheduler has to be manually advanced
won't run automatically
that's designed, ironically in this case, for deterministic testing purposes
were you able to fix your tests?
Gustavo
@sainzg
@Aaronontheweb , here you go let me know if more detail is needed petabridge/Akka.Persistence.Azure#140
mike-ammer
@mike-ammer

Hi! I've a general question to you...

How do you document your messageflow? Is UML your weapon of choice? Have you any other tool?
Would be nice to hear some suggestions.

thx
Michael

Aaron Stannard
@Aaronontheweb
thanks @sainzg - I appreciate it
Aaron Stannard
@Aaronontheweb
@/all Akka.NET v1.4.15 is now live on NuGet: https://twitter.com/AkkaDotNET/status/1351939117303681028
which includes our new Akka.DependencyInjection package
and we would love to get some feedback on that in the real world
Aaron Stannard
@Aaronontheweb
@mike-ammer I usually do a flowchart
for diagramming the message flow specifications
for charting the live messaging of running systems I tend to rely on distributed tracing for that
we're relying on Azure Application Insights for that today
but we're going to move off of it because it is ludicrously expensive
we'll probably adopt Jaeger instead
Aaron Stannard
@Aaronontheweb
@/all going live with our community standup now https://www.youtube.com/watch?v=blLK8lH_MQ0
fscavo
@fscavo
Hell all,
Is it possible to broadcast a message to all entities in the same shard? For instance, I want to send one message to all entities that live in the shard customerupdated
/user/sharding/customer/customerupdated/123
/user/sharding/customer/customerupdated/567
Cristiano Degiorgis
@crixo
@Aaronontheweb regarding the TestScheduler, thanks for the hint but now I'm confused... how should I use it then within a test scenario? should I invoke it explicitly from outside the actor/test?
mrxrsd
@mrxrsd
@Aaronontheweb awesome news! I'll try on the weekend!!
joelwilkins
@joelwilkins
Has anyone had any luck getting an automated instrumentation utility, NewRelic in my situation, to trace execution within the Akka runtime?
fscavo
@fscavo
Hello,
I'm getting the error "When using remember-entities the shard id extractor must handle ShardRegion.StartEntity(id)" even though the StartEntity is handled in the message extractor. Am I missing something? Hope someone will have time to answer me ;-)
public class CustomMessageExtractor : HashCodeMessageExtractor
    {
        public CustomMessageExtractor() : base(maxNumberOfShards: 100) { }

        public override string EntityId(object message)
        {
            return message switch
            {
                NotificationActor.Subscribe sub => sub.ConnectionId,
                ShardRegion.StartEntity start => start.EntityId,
                _ => null
            };
        }

        public override string ShardId(object message)
        {
            if (message is NotificationActor.Subscribe sub)
            {
                return sub.EventName;
            }

            return null;
        }
    }
Ismael Hamed
@ismaelhamed
@fscavo ShardRegion.StartEntity needs to be handled in the ShardId extractor, not the EntityId
fscavo
@fscavo
Thanks @ismaelhamed
I think the example in "Remembering entities" is wrong
https://getakka.net/articles/clustering/cluster-sharding.html
to11mtm
@to11mtm
@fscavo Ummm I think you might be accidentally misusing HashcodeMessageExtractor
b/c normally you should not override string ShardId(object message) from that class. I wonder if it should be sealed...
to11mtm
@to11mtm
For your case, if you want shards to be off eventname like you show, you probably should just implement IMessageExtractor instead of inheriting HashCodeMessageExtractor
From a docs standpoint, it probably would help to provide an example with IMessageExtractor and StartEntity being handled, so users can see the difference

Is it possible to broadcast a message to all entities in the same shard? For instance, I want to send one message to all entities that live in the shard

Ummm I feel like there's a way to do that, let me think

to11mtm
@to11mtm
.... I mean, I have no clue whether this works or would do what you need, but you could try an ActorSelection like /system/sharding/customer/customerupdated/* <-- Maybe it should be /user/ but I think it's /system/
fscavo
@fscavo

.... I mean, I have no clue whether this works or would do what you need, but you could try an ActorSelection like /system/sharding/customer/customerupdated/* <-- Maybe it should be /user/ but I think it's /system/

It is indeed system

.... I mean, I have no clue whether this works or would do what you need, but you could try an ActorSelection like /system/sharding/customer/customerupdated/* <-- Maybe it should be /user/ but I think it's /system/

Thanks a lot @to11mtm
It is no longer needed because I went in a different direction but it is worth to try :-)
One more question, is it possible to configure the shard actor's supervision or even better tell akka sharding to use a custom shard actor?

mrxrsd
@mrxrsd
I've just updated my project to the new DI package. It was very straightforward to get everything running again. Now I'm refactoring some actors to receive non-di parameters by constructor instead by message. Thanks @Aaronontheweb !
Farewell "initializing" phase! =D
Keith Emanuel
@KeithEmanuel

Hey everyone. I started up a project using Akka.NET after a few years of doing the tutorial and some small projects. Right now, it's mostly just pulling stock data and inserting into a Timescale database. Probably a pretty common use case :)

Anyways, I was wondering what the recommended approach might be to creating many singleton actors. A common case will be a simple ETL style pipeline. So, some sort of coordinator/conductor actors specifying what to download and when, then a extractor actor, possibly an actor to handle api rate limiting, then a loader actor to insert the data into the database.

I have a few of these created, but right now I just have everything initialized in the main method and passed through the constructors, which is pretty ugly, so I want to fix these before I create too many more of these pipelines.

A few (well, lots of) questions:

  • It seems like some DI packages specifically for Akka.NET recently came out. Guessing I should be using this?
  • Should I create a conductor (Is there a better name for this?) actor for each pipeline? And should the messages flow through the pipeline actors directly, or should they all be relayed through the conductor? It seems like could possibly make error handling easier, but message routing might be a little more awkward.
  • Should I define the pipelines in code, or in the database and create them at runtime?
  • For situations where I am loading data into a table, I will have a loader for each table working serially. Should I use async/await on the database call, or PipeTo? Since I want to do this serially (at least for now, since I am just using a single staging table truncated between requests and repopulated with postgres copy command), I'm thinking I should use async/await.
  • How much do I have to worry about message size if I am using a single machine on my home server? (Ryzen 3600 6 cores, 12 threads, 32 GB ECC ram, SDDs). Right now, I am putting entire files/streams in messages to load with the copy command, which is a efficient way to load data into postgres.

Sorry for the wall of text of questions.

Jevgeni Tarasov
@devjev
Hi everyone! Quick question about the project: is there F#-specific documentation? Because all I can find is archived. Is Akka.FSharp still a thing?