These are chat archives for akkadotnet/akka.net

29th
Jun 2016
Aaron Stannard
@Aaronontheweb
Jun 29 2016 02:56
@gamemachine it shouldn't
what exceptions is it swallowing where?
Bart de Boer
@boekabart
Jun 29 2016 04:47
Well, by default you don't feel the exceptions happening in the actor under test, directly
Only by noticing missing response/side effect or explicitly deathwatching you do
Arsene Tochemey GANDOTE
@Tochemey
Jun 29 2016 06:56
Hello please what is the advantage of using Receive vs ReceiveAsync?
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 07:16
@Tochemey receive is faster and more lightweight.
Arsene Tochemey GANDOTE
@Tochemey
Jun 29 2016 07:26
I just discovered that Receive is obsolete and it will be removed in near future rather we shd use ReceiveAsync
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 07:27
I thought, you were talking about synchronous Receive vs asynchronous ReceiveAsync
Arsene Tochemey GANDOTE
@Tochemey
Jun 29 2016 07:27
Oh sorry
Also please can I do something like this:
            ReceiveAsync<Messages.StepCompleted<T>>(async completed => {
                await CompleteAuthorization(completed.Message).ContinueWith(task => {
                    nextFilterActorRef.Tell(new Messages.StepCompleted<T>(completed.Message));
                });                
            });
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 08:29
yes you can. Also you don't need ContinueWith here
            ReceiveAsync<Messages.StepCompleted<T>>(async completed => {
                await CompleteAuthorization(completed.Message);
                nextFilterActorRef.Tell(new Messages.StepCompleted<T>(completed.Message));
            });
vacuumstate
@vacuumstate
Jun 29 2016 08:31
Hi! For remoting, are fully qualified domain hostnames supported? I seem to have trouble using them.
Arsene Tochemey GANDOTE
@Tochemey
Jun 29 2016 08:34
@Horusiath Thanks
Bart de Boer
@boekabart
Jun 29 2016 08:44
@vacuumstate that should work if you set them up as public-hostname (not hostname)
vacuumstate
@vacuumstate
Jun 29 2016 09:03
Thanks! Have locate the docs section for this
Arsene Tochemey GANDOTE
@Tochemey
Jun 29 2016 09:28

Hello Shoud we use

return Task.CompletedTask;

in a ReceiveAsync method. Also I would like to know how to handle within an Actor an exception. Thank you.

Bartosz Sypytkowski
@Horusiath
Jun 29 2016 09:52
@Tochemey if you need to return such task, you probably don't need ReceiveAsync in the first place. When it comes to fault handling, Akka (and Erlang) actor model use supervision for that, and if you need to handle a particular case when actor restarts as a reaction to exception, you have PreRestart and PostRestart methods in each actor, which you can override.
vacuumstate
@vacuumstate
Jun 29 2016 10:14
Should remoting HOCON 'hostname' work for IP addresses? If I try and use an IP address I get "Akka.Remote.EndpointWriter|Dropping message [Akka.Actor.ActorSelectionMessage] for non-local recipient"
Ismael Hamed
@ismaelhamed
Jun 29 2016 10:56
I'm reviewing the WebCrawler sample to get some ideas, and I've noticed the CommandProcessor in the web project is actually a single actor. In a more high throughput scenario (in which you may be getting hundreds of requests per second), wouldn’t it be more beneficial to make the CommandProcessor a router?
Arjen Smits
@Danthar
Jun 29 2016 13:55
@ismaelhamed depends on what your actor does. If all it does is forward it to workers. You won't need to. Message throughput in local actors systems is pretty high. As in, in the millions.
Ismael Hamed
@ismaelhamed
Jun 29 2016 14:03
@Danthar, thanks. Yep, it will pretty much forward the message to a pool of actors in the cluster.
wdspider
@wdspider
Jun 29 2016 14:07
Would it be possible for someone to provide some sample code on how to programmically declare the deployment section of the following hocon when I'm defining the props? I have to programmically generate a unique name for the router, so I'm under the impression that I then need to programmically declare the options rather than being able to use the hocon.
akka {
   actor{
      provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
      deployment {
        /api/myClusterPoolRouter {
          router = round-robin-pool # routing strategy
          nr-of-instances = 10 # max number of total routees
          cluster {
             enabled = on
             allow-local-routees = on
             use-role = crawler
             max-nr-of-instances-per-node = 1
          }
        }
      }
   }
}
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 14:42
@wdspider something like this:
Props.Create(() => new MyActor(), name).WithRouter(new ClusterRouterPool(
                local: new RoundRobinPool(10),
                settings: new ClusterRouterPoolSettings(
                    totalInstances: 30,
                    allowLocalRoutees: true,
                    useRole: null,
                    maxInstancesPerNode: 10)))
wdspider
@wdspider
Jun 29 2016 14:45
thanks. I was able to discover that path after diving into the code a bit; however, it might be helpful for others if it was listed as an example on http://getakka.net/docs/clustering/cluster-routing#cluster-router-config
Pavel Knorr
@knorrus
Jun 29 2016 14:52
Hi all, @question: does Akka.NET port of HOCON support inlcude directive, https://github.com/typesafehub/config/blob/master/HOCON.md#includes ?
Damian Reeves
@DamianReeves
Jun 29 2016 15:35
Does anyone know of a Persistence implementation that leverages Marten?
If not would I be correct in thinking the EventStore persistence provider might be the best place to start with a new implementation
Alex Valuyskiy
@alexvaluyskiy
Jun 29 2016 16:58
Could anyone help me to translate this line from scala?
https://github.com/akka/akka/blob/4acc1cca6a27be0ff80f801de3640f91343dce94/akka-cluster/src/main/scala/akka/cluster/ClusterHeartbeat.scala#L302
What did they mean by nodeRing.to(sender) ?
And how to do some filtration on Iterator?
Or iterator in Scala is not the same, as Enumerator in C#?
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 18:46
@alexvaluyskiy nodeRing.to(sender) means that in sorted set you want to iterate over range of values up to sender. nodeRing.from means taking iterator starting from some point in sorted set
and yes iterator is basically equivalent of .NET IEnumerator
Bartosz Sypytkowski
@Horusiath
Jun 29 2016 18:50
I don't know what are inclusiveness rules is scala
Alex Achinfiev
@aachinfiev
Jun 29 2016 22:17
Has anyone tried running akka systems in docker containers? Was it done using existing mono? It seems that currently dotnetcore is not supported. Are there plans in that direction? Thanks
qwoz
@qwoz
Jun 29 2016 22:35
if an actor crashes and is restarted, are any stored IActorRef values in other actors still valid? When does one need to implement death watch logic for this, if at all?