These are chat archives for akkadotnet/akka.net

14th
Apr 2016
Hyungho Ko
@hhko
Apr 14 2016 06:58
Hi. @Horusiath Akka.NET 1.0.7 supports SupervisorStrategyConfigurator class for user guardian.
this is sample hocon.
      akka {
        actor {
          guardian-supervisor-strategy = "UserSupervisorExample.UserSupervisorStrategy"
        }
      }

namespace UserSupervisorExample
{
public class UserSupervisorStrategy : SupervisorStrategyConfigurator
{
public UserSupervisorStrategy()
{

    }

    public override SupervisorStrategy Create()
    {
        return new OneForOneStrategy((excep) =>
            {
                int x = 3;
                x = 6;

                return Directive.Restart;
            });
    }
}

}

however, Exception occurs in ActorSystem
Hyungho Ko
@hhko
Apr 14 2016 07:08
blob
Marc Piechura
@marcpiechura
Apr 14 2016 07:24
@hhko you need to provide the full qualified name, see the specs for an example
Hyungho Ko
@hhko
Apr 14 2016 07:26
@Silv3rcircl3 thank you... I solve it. below
akka {
actor {
guardian-supervisor-strategy = "HelloWorldUserSupervisor.UserSupervisorStrategy, HelloWorldUserSupervisor"
}
}
i forget dll name. ^^;;
Andrea Balducci
@andreabalducci
Apr 14 2016 07:45
@cconstantin @Horusiath if so I think JournalDbEngine (reference implementation) is buggy. should stop on first failure, now has a ContinueWhenAll so the stream can be corrupted rather than incomplete
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 07:46
@andreabalducci can you set an issue for that with some description?
Andrea Balducci
@andreabalducci
Apr 14 2016 08:39
@Horusiath #1883 , I'm new to akka.net but have some background on EventSourcing / stream persistence. thank you for you help
Thomas Lazar
@thomaslazar
Apr 14 2016 08:49
anyone got anything on my problem? i have a remote actor that i send a message to via a client. and as soon as that remote actor does anything that generates an exception that gets caught and handled in the remote actor the connection gets disassociated and the thing basically dies. what am i doing wrong here?
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 08:53
@thomaslazar can you provide some stack trace? It's unusual for random exception to cause disassociation
Thomas Lazar
@thomaslazar
Apr 14 2016 09:39
cannot get any kind of relevant stacktrace. only what the log shows with the disassociation messages.
i will build a test solution and try if i get the same error there and if i do i'll up it on github
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 09:40
I know that the issue sometimes arises, when you have errors while trying to serialize/deserialize message
Zetanova
@Zetanova
Apr 14 2016 09:40
@Horusiath For the snapsot generation algo. there is beside event-count an other possibility. When each event has a timestamp and it is assumed that the application is pushing constantly events to the event-stream, then it is highly plausible that events in a short time frame are loaded faster then events over an longer timeframe. If the the events are over a long period >24h not snapshotted it can be done, even with only 2 events.
Thomas Lazar
@thomaslazar
Apr 14 2016 10:03
@Horusiath it happens after i caught the exception. in the exception handler i basically just put that exception into a message and send it off to the sender and then exit the processing. and after the receive handler is left the connection dies.
but as i said i'll try to make a test program that "hopefully" has the same problem
Arjen Smits
@Danthar
Apr 14 2016 10:04
You passing along a custom Exception class ? Could it be your Exception type is not serializable ?
Thomas Lazar
@thomaslazar
Apr 14 2016 10:06
yeah. but nothing that shouldn't work. and in fact in not akka.remote tests it's working just fine.
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 10:07
@thomaslazar the more it points to serialization issue
Thomas Lazar
@thomaslazar
Apr 14 2016 10:07
and i specifically have tests written that trigger said exceptions and the message returns just fine
and one exception that gets passed back is a TargetParameterCountException
and that doesn't work either
Thomas Lazar
@thomaslazar
Apr 14 2016 11:18
ok guys. you were absolutely right. was a serialization issue.
switching to wire in my testsolution fixed the problem.
and i am stoopid as usual. was all there. nice and clean in the log file... stuff just didn't got output to the stdout
Arjen Smits
@Danthar
Apr 14 2016 11:24
heh. No problem. It happens.
Kris Schepers
@schepersk
Apr 14 2016 11:46

Question: I've got a sharded entity actor. It creates a child actor to perform some duty. When this child gets stopped by the entity actor, the following log entry appears:

Akka.Actor.LocalActorRef: Message DeathWatchNotification from akka://bm2cluster/user/sharding/LoonbonVerwerking/3/d8c52c1e-4843-4092-9cc4-43ec8f774737/lbvverrijking to akka://bm2cluster/user/sharding/LoonbonVerwerking/3/d8c52c1e-4843-4092-9cc4-43ec8f774737/lbvverrijking was not delivered. 5 dead letters encountered.

Before implementing sharding, this message didn't get logged.. Any idea's?

kariem-ali
@kariem-ali
Apr 14 2016 11:47
Hi Guys. It seems that soft delete was removed form akka.persistence Eventsourced.DeleteMessages in 1.0.7. Is there any alternative?
Kris Schepers
@schepersk
Apr 14 2016 12:29
The problem above only occurs when a child actor of the entity actor creates a child actor of its own. Maybe that can help?
Chris G. Stevens
@cgstevens
Apr 14 2016 12:32
@Aaronontheweb Thanks! I will take a look today. I got pulled off my project for a couple of months and now I am back on it.
I see I need to catch up on Cluster.Tools and the Persistence. I am still having cluster issues where if I deploy my Web Apps things get wonky...
Bad thing is that my web apps are my monitoring tools hence the reason for the need for Cluster Tools.
Kris Schepers
@schepersk
Apr 14 2016 12:41
And when I manually stop this child of the child, the DeathWatchNotification log doesn't appear.. Is this common practice?
Chris G. Stevens
@cgstevens
Apr 14 2016 12:59
Not sure if anyone goes to www.CodeStock.org in Knoxville but this July I submitted my 1 hour talk.
Plan on doing a similar talk like at the Akka.Net Virtual Meetup and now I want to dive deeper into the details about Akka.Net.
So if you want to take a minute and go vote that would be awesome and thank you!
http://my.codestock.org/#/app/sessionlisting/user/6477
Hyungho Ko
@hhko
Apr 14 2016 13:04
Hi... Could you introduce same good examples for FSM class
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 13:17
@schepersk from your log it seems that entity's child was trying to send some message to itself. Maybe you're using scheduler at some point and didn't cancelled a scheduled message?
Kris Schepers
@schepersk
Apr 14 2016 13:20
@Horusiath I think it was the grandchild trying to send a message to the child notifying it of terminating. But the child wasn't alive anymore because of being stopped by the entity..
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 13:22
@schepersk in case of hierarchical termination chains you may see some dead notifications not delivered (same scenario with actor system shutdown) - this is just a nature of the async communication
Kris Schepers
@schepersk
Apr 14 2016 13:32
@Horusiath Indeed, I figured as much..
@Horusiath About the sharding persistence.. Can the journal and snapshot data be deleted at some point?
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 13:36
yes, in few scenarios. Most likelly, when you have confirmed, that snapshot has been made for some persistent actor, you may delete all events and snapshots before that snapshot, and still be able to recover that actor.
Kris Schepers
@schepersk
Apr 14 2016 13:39
I wasn't really referring to standard persistent actors. I would like to know if the events and snapshots generated by sharding can be deleted after some period of time?
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 13:40
yes, deleting snapshots and events is basically sending a message - you just need to know what values that message should have
kariem-ali
@kariem-ali
Apr 14 2016 13:52
Hi, I have a question. I am using Akka.Persistence and it seems that SaveSnapshot fails frequently with: "Collection was modified; enumeration operation may not execute." is this normal, can it be avoided?
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 13:53
@kariem-ali I guess, you are passing mutable data when saving a snapshot
kariem-ali
@kariem-ali
Apr 14 2016 13:54
I am saving a List<T> that is being modified through List<T>.Add()
Can this be mitigated somehow?
Arjen Smits
@Danthar
Apr 14 2016 14:00
Use immutable collections. Or pass a copy to the savesnaphot state
kariem-ali
@kariem-ali
Apr 14 2016 14:01
Thanks
Chris G. Stevens
@cgstevens
Apr 14 2016 14:50
@Aaronontheweb I just want to give a big thanks to whom ever did the Akka.Cluster.Tools!
Trying to monitor my cluster I had to be part of the cluster... and now I can get the cluster state and do commands to manage it without having to be part of the cluster.
My problem is when connecting to our Dev environment my tool or other nodes would freak out due to network packets dropping and just things start to become unreachable.
So moving the monitor to a website solved that issue except when my websites are unavailable... then what??
Once I have my internal tool working I will port it over to the Akka.Cluster.Monitor on github for anyone else to take advantage.
Ralf
@Ralf1108
Apr 14 2016 15:31
is it possible to get an identity message from all running actors in a system? maybe via ActorSelection -> like:
'var messageId = Guid.NewGuid();
_topActors.System.ActorSelection("user/*").Tell(new Identify(messageId));
but how to collect the responses? there is only the "ResolveOne()" method. I also discovered the "Inbox" class but couldn't figure out to combine both
Ralf
@Ralf1108
Apr 14 2016 15:37
I think i can use the inbox as the sender of the identity message...so all responses will be collected in the inbox
Zetanova
@Zetanova
Apr 14 2016 15:39
@Ralf1108 yes create an inbox and use it as the sender, it will receive all responses.
but i dont know it the "user/*" + identity is a good practice
Ralf
@Ralf1108
Apr 14 2016 15:41
it is only for debuggging.. so i can look into a productive system when its running as last resort
Chris G. Stevens
@cgstevens
Apr 14 2016 20:17
I was able to update my app to be able to get the cluster state and have the ability to force a member to leave the cluster without being part of it now. Very nice.
Bart de Boer
@boekabart
Apr 14 2016 21:01
I've encountered the following a number of times now: fact that a message can't be (de)serialized when using remoting. Now I'm trying to add unit tests that verify that each 'message' class (every class in certain namespaces in my project) can be pulled through JsonConvert.
The problem however is whenever I use real ActorRefs here, I get an exception about a loop: property Provider that's self-referencing.
any idea's how to test this, then?
Bartosz Sypytkowski
@Horusiath
Apr 14 2016 21:15
@boekabart if you want to test serialization, do that using true akka serializer. You can use actorSystem.Serialization.FindSerializerFor(message) to get the serializer for choosen type
Bart de Boer
@boekabart
Apr 14 2016 21:27
Let me try that.
should I be able to use that serializer to go back and forth for 1 message instance?
Bart de Boer
@boekabart
Apr 14 2016 21:41
Yep, that works like a charm!
Is it known and/or by design that Exceptions don't serialize?
(they did through jsonconvert & back, but losing their specific type. through 'serializer' they don't pass at all)