Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:32
    Aaronontheweb synchronize #4057
  • 00:32

    Aaronontheweb on dev

    Fix actor terminated exception … (compare)

  • 00:32
    Aaronontheweb closed #4058
  • Nov 22 20:55
    dependabot-preview[bot] synchronize #4021
  • Nov 22 20:55
    dependabot-preview[bot] synchronize #3985
  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump Mono.Cecil from 0.9.6.4 to… (compare)

  • Nov 22 20:55
    dependabot-preview[bot] synchronize #4051
  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • Nov 22 20:55
    dependabot-preview[bot] synchronize #4046
  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump ApprovalTests from 3.0.10 … (compare)

  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump FSharp.Core from 4.5.0 to … (compare)

  • Nov 22 20:55
    dependabot-preview[bot] synchronize #3986
  • Nov 22 20:55
    dependabot-preview[bot] synchronize #4050
  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump NUnit from 3.6.1 to 3.12.0… (compare)

  • Nov 22 20:55
    dependabot-preview[bot] synchronize #3989
  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump ApprovalUtilities from 3.0… (compare)

  • Nov 22 20:55

    dependabot-preview[bot] on nuget

    Bump ApiApprover from 3.0.1 to … (compare)

  • Nov 22 20:55
    dependabot-preview[bot] edited #4021
  • Nov 22 20:55
    dependabot-preview[bot] edited #3985
  • Nov 22 20:55
    dependabot-preview[bot] edited #4051
Arsene T. Gandote
@Tochemey
Hello assuming I am dealing with a webservice that does blocking and I am using an Actor to interact with it. How do I go about it seeing that we do not block in an Actor system?
Alex Valuyskiy
@alexvaluyskiy
@vvreutskiy Is it possible, technically. You should create at least two workers roles. One for a seed node, and one for your default node. You also should tweak timeouts, because Cloud Services has unpredictable (for akka) lifecycle. It would be better to run Akka on Azure Service Fabric, or create your own cluster on IaaS
Valeriy Reutskiy
@vvreutskiy
@alexvaluyskiy but how will default node find seed node, if seed node have dynamic IP address?
Ricky Blankenaufulland
@ZoolWay
@Tochemey You delegate the call to the webservice to a child actor/s
@vvreutskiy @alexvaluyskiy I guess DNS (but I am not familiar with Azure)? But note that there a some bugs in 1.1 regarding DNS
Arsene T. Gandote
@Tochemey
How do I provide a generic method to create any type of actor?
Marc Piechura
@marcpiechura
@Tochemey @ZoolWay you should use a blocking IO dispatcher for that child if the webservice really doesn't provide async methods
Ricky Blankenaufulland
@ZoolWay
@Aaronontheweb Regarding the shutdown: I have posted a solution for TopShelf in the StackOverflow question and also published examples for console, ASP.NET Core and topshelf on GitHub ( https://github.com/ZoolWay/akka-net-cluster-graceful-shutdown-samples ). These samples still produce some errors and dead letters but the nodes actually leave the cluster in the end. An example for the exceptions and dead letters can be found in the gist (https://gist.github.com/ZoolWay/8092e7c2aa3a86b009981885cd4aa271) in the first comment. Not sure if they are by design. Also I am still struggling with leaving in larger apps and trying to reproduce them
Peter Bergman
@peter-bannerflow
I just saw this message in the log of one of my nodes, I guess the information is quite clear... but when is it triggered? Is there some threshold when the buffer gets too large or similar?
Akka.Remote.EndpointWriter: [481678] buffered messages in EndpointWriter for [akka.tcp://bf@10.0.0.5:5052]. You should probably implement flow control to avoid flooding the remote connection.
Peter Bergman
@peter-bannerflow
Ah, I now found where its set: https://github.com/akkadotnet/akka.net/blob/4acfa7c363bfa83ac71849a5a8487c8d6b1bbcb1/src/core/Akka.Remote/RemoteSettings.cs#L25-L34 but I haven't explicitly configuered akka.remote.log-buffer-size-exceeding so I guess it defaults to what ever GetInt gives as default , zero?
wdspider
@wdspider
@peter-bannerflow I believe the default values are the values listed in the related config file. In the specific case of akka.remote.log-buffer-size-exceeding, the value 50000 is listed here https://github.com/akkadotnet/akka.net/blob/4acfa7c363bfa83ac71849a5a8487c8d6b1bbcb1/src/core/Akka.Remote/Configuration/Remote.conf#L146
Peter Bergman
@peter-bannerflow
@wdspider Ah, ok cool, thx. Do you know the internals of that buffer? Does it buffer messages before they are sent over the network?
wdspider
@wdspider
not really, pretty new to things myself. Just happened to have stumbled across the config files while looking at some of the source :)
Peter Bergman
@peter-bannerflow
Hehe ok, I see
Arsene T. Gandote
@Tochemey
Hi Gentlemen is there a way to check the existence of an Actor?
to11mtm
@to11mtm
@Tochemey you can send the actor an Identify message. You should get an ActorIdentity back if it exists : http://getakka.net/docs/Working%20with%20actors
Aaron Stannard
@Aaronontheweb
@ZoolWay that gist 404s
might have created it as private
Jordan S. Jones
@jordansjones
@Aaronontheweb Github is currently experiencing issues
wdspider
@wdspider
Is there an example of how to add a version path to your actor hierarchy so the path looks something like /user/v1/MyRootActorPool ? Or do you have to create an actual v1 actor that then has the MyRootActorPool as a child?
Curtis Swartzentruber
@skills0
We have an interesting usage of cluster with our app: 2 Windows services running in active/passive mode for failover. Both are configured as seed nodes. In some environments we can fail over back and forth no problem. In others we get "Leader can currently not perform its duties" when one node goes down and the up node goes into a association error loop. We were seeing this before 1.1 as well and hoped it would be fixed. 1.1 did improve the association issues when the down node comes back up. That is working much better. Any ideas what is causing this? We could have something misconfigured.
Arsene T. Gandote
@Tochemey
Can I please an example of exception handling with Actors? I have read we can handle exception in the supervisor. However I want to handle some exception in the actor due to external web service calls.
Bart de Boer
@boekabart
try/catch in the Receive handler is just fine
Arsene T. Gandote
@Tochemey
@boekabart Thank you. I thought as much but I needed a recommende way.
Bart de Boer
@boekabart
but the more typical way of working would be to use a Character Actor (thay may die) to do the dangerous work
Character actor being a child actor of the actor that's supposed to do the work
Arsene T. Gandote
@Tochemey
Hello I know that an Actor handle one and only one message at a time. Let us assume that we want to handle multiple instances of the same message concurrently. Can someone tell me the recommended and best approach to this problem?
Bart de Boer
@boekabart
broadcast it to N actors. Doesn't even have to be different instances, in fact.
If you mean 'multiple instances of the same message class', the typical way is to create N instances of your handler actor with a router Props.Create<HandlingActorClass>().WithRouter(...)
Arsene T. Gandote
@Tochemey
@boekabart Thank you. I have used another approach that is to create another instance of the same actor since I m dealing with Http request. And I want to use the request handler actor to handle each request that comes. I believe it is a good approach.
Another challenge I am facing is the Fault tolerance. I could not see any reliable article on it. Even the one on the site lacks code snippets http://getakka.net/docs/Fault%20tolerance
Peter Bergman
@peter-bannerflow
If I have a bunch of actors that are supposed to be quite short lived (100 ms max) and they have control over their own lifecycle (i.e each actor knows when its no longer needed), is it then good practice for the actor to somehow "shut down" itself?
Malisa Ncube
@malisancube
C f
Bart de Boer
@boekabart
@peter-bannerflow as far as I know, yes, it should just commit suicide (eg. Self.Tell(PoisonPill.Instance); )
Arsene T. Gandote
@Tochemey

Hello I would like to know when I have this in my App.Config file

akka {  
    stdout-loglevel = DEBUG
    loglevel = DEBUG
    log-config-on-start = on        
    actor {                
        debug {  
              receive = on 
              autoreceive = on
              lifecycle = on
              event-stream = on
              unhandled = on
        }
    }

Do I need to call _log.Debug("Some message"); in my Actors? Or Akka take cares of that for me.

Peter Bergman
@peter-bannerflow
@boekabart Thanks for the info. I think that in my case I want to go with Stop() since the dying actor might have a large unprocessed mailbox that I no longer care about.
Bart de Boer
@boekabart
Context.Stop(Self) is what I use in exactly such a case
need to be 100% sure that no more messages are handled
Peter Bergman
@peter-bannerflow
Yes, exactly. Thanks :)
And by the way, do you know how subsequent messages to an IActorRef of the dead actor will be handled? Deadletters?
Bart de Boer
@boekabart
Can't imagine anything other that that, indeed
since they are letters and the actor is dead ;)
Peter Bergman
@peter-bannerflow
Yeah, pretty obvious I guess... :P
Arsene T. Gandote
@Tochemey
Also I would like to know whether it is necessary to provide a ToString method for my message POCO in case I want to log them or I can use the Seriliazation feature to do that. The best will be that Akka takes care of that. Any idea gentlemen?
Bart de Boer
@boekabart
well that depends on the verbosity you want. using serialization will produce very verbose (large) logs vs using optimized ToString per PoCo. We prefer the latter.
Bartosz Sypytkowski
@Horusiath
@Tochemey if you'll use serialization to log the content of a message, you're introducing quite a big footprint for such a simple step
Bart de Boer
@boekabart
Might be worth it only for exceptional cases (eg. errors that really aren't supposed to happen)
Ricky Blankenaufulland
@ZoolWay
@Aaronontheweb Sorry, there has a bracket splipped into the URL. Should be https://gist.github.com/ZoolWay/8092e7c2aa3a86b009981885cd4aa271 - but it is basically the same as the code in the GitHub repository which shows Cluster.Leave for three types. Interestingly the shown method for ASP.NET Core does not work in a larger project of mine, still checking on that. But the gist shows the exceptions and deadletters in its comments, though.