Hi, Any sample on how to send Actor (Initiating actor in choreography) inside a meesage in Cluster environment? Thanks
For a monitoring solution for our services (not using clustering), what would be the best way to present a "list/tree" of actors of a local actorsystem. Having each actor respond to a "getchildren" message or is there a way to ask the actorsystem this? Is there a way to traverse the actor tree?
@christiansparre the get list/tree its the same as to work with system file directories. You need to ask each folder for the child-items. But i dont know if there is a system message for doing it like Akka.Actor.Identity
There is no officially supported way of doing this. But there is a hacky one.
Hi, AroundReceive for UntypedActor allways returns true and ReceiveActor inherites from UntypedActor without changing this behavior. Shouldn't ReceiveActor return false for AroundReceive if for some reason the message wasn't handled by a Receive function defined in a ReceiveActor?
@Horusiath sorry for the minimalism. I have a custom serializer (ProtoBuf.Net) for type Message. Message has (among others) IActorRef property for the initiator actor. In the samples you mentioned the default serializer is used as far as i can tell. Might be ISurrogated interface which should be surrogated? I guess the question is more is passing IActorRef around good practice? In a low-latency application what is the overhead of the resolving for each message?
@JeffCyr If I want to log handled messages (commands) to a message store in my ReceiveActor without doing it in every receive function, how would I do that? I thought I could use AroundReceive for this, guess not. Feels a bit inconsistent but I think i'm missing something.
@Lejdholt Do you expect an actor to receive a lot of unhandled messages? Why not log every messages?
@JeffCyr No but I dont want to store commands that wasn't handled. Storing commands are for followup, what command resultet in that event, through correlationids and causationids
Is there a more advanced way to control ITellScheduler? Cron-like for instance. Currently ITellScheduler provides initial delay and iterval. I want something like once at 2AM during workdays, stuff like that. Thanks
logging commands to a "normal" log is already done in the parent actor.
@eyantiful in order to serialize IActorRefs, serializer must support surrogates (both Wire and JSON.NET do), otherwise you'd need to pass it i.e. string determining path to an actor, and then resolve it by yourself.
passing IActorRef is good, if used when necessary. Also how low-latency do you mean?
@Horusiath we should support 15k concurrent msgs in under 100ms. When you say resolving do you mean ActorSelection?
@eyantiful Are you able to batch messages? Akka.Remote cannot handle 150K msg/sec
We are working on increasing the performance of Akka.Remote in v1.5
@JeffCyr are you talking from single node? the figures are for the cluster as a whole.
@JeffCyr Im currently POC to see how far can we go with minimum nodes in order to asses cluster size...
@eyantiful Yes I meant for a single node, I made a benchmark with two nodes on the same machine on loopback, I could get ~6K msg/sec
On v1.5 we were at 100K msg/sec for the same test, and there were still room for improvements
@JeffCyr Default serializer change ?
@eyantiful actor system on a single machine (8 cores) can serve around 20-27mln msg/sec - this can be ofc slowed significantly by things such as persistence, but it also points how important local affinity of actors is
also for communication between nodes, take a look at Wire - it supports everything, default akka serializer should support and has quite good performance - you can see some comparison here
I get exception while executing TakeSnapshot command for persistence actors implemented in F#: "Unable to cast object of type 'Akka.Serialization.WireSerializer' to type 'Akka.Serialization.NewtonSoftJsonSerializer'." System.InvalidCastException: Unable to cast object of type 'Akka.Serialization.WireSerializer' to type 'Akka.Serialization.NewtonSoftJsonSerializer'. at Akka.Persistence.FSharp.FunPersistentActor`3.OnCommand(Object msg) at Akka.Persistence.UntypedPersistentActor.ReceiveCommand(Object message) at Akka.Persistence.UntypedPersistentActor.Receive(Object message) at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message) at Akka.Persistence.Eventsourced.<ProcessingCommands>b__90_0(Receive receive, Object message) at Akka.Persistence.Eventsourced.AroundReceive(Receive receive, Object message) at Akka.Actor.ActorCell.ReceiveMessage(Object message) at Akka.Actor.ActorCell.Invoke(Envelope envelope)
I inspected Akka code and apparently this line fails: let serializer = UntypedActor.Context.System.Serialization.FindSerializerForType typeof<obj> :?> Akka.Serialization.NewtonSoftJsonSerializer
@object which version of Akka.FSharp are you using?