These are chat archives for akkadotnet/akka.net

7th
Apr 2018
ShalokShalom
@ShalokShalom
Apr 07 2018 00:03 UTC
Akka uses pure cooperative objects on OS threads, thus it can be locked down. In addition a fault in any of the actors can bring down the entire CLR pretty easily. Correct?
Bartosz Sypytkowski
@Horusiath
Apr 07 2018 08:55 UTC
@ShalokShalom not any kind of faults - as standard exceptions inside actors are catched and supervised - but the critical faults of .NET environment can (i.e. out of memory exception), simply because some failures in .NET cannot be revoked.
ShalokShalom
@ShalokShalom
Apr 07 2018 08:55 UTC
Yes
Thanks a lot :D
ShalokShalom
@ShalokShalom
Apr 07 2018 09:03 UTC
Can a rewrite of the CLR itself in Akka help?
Bartosz Sypytkowski
@Horusiath
Apr 07 2018 09:29 UTC
no, akka is only a library on top of CLR not a platform on itself. Some platforms like Erlang or Pony have isolated memory model that provide a higher degree of safety in terms of VM-wide failures.
AltcoinsBattle
@AltcoinsBattle_twitter
Apr 07 2018 10:47 UTC
Journal
    .EventsByPersistenceId(inventoryName, ++inventoryOffset, long.MaxValue)
    .RunForeach(HandleCharactersEvent, Materializer);

Journal
    .EventsByPersistenceId(descriptorItemsName, ++descriptorOffset, long.MaxValue)
    .RunForeach(HandleCharacterDescriptionEvent, Materializer);
Does Akka guarantee that this code will process one message at a time?
It is probably the VS debugger, but it shows the two Handle methods invoked in parallel
I see some bug in my code (from client side) and cannot catch it, looks like can be related to multithreading, that is why I'm asking :)
Marc Piechura
@marcpiechura
Apr 07 2018 10:50 UTC
RunForeach isn’t blocking, it returns a Task I think which you can await before running the second loop
Since persistence query is based on Akka.Streams you’re ending up with two actors under the hood which run the two queries in parallel
AltcoinsBattle
@AltcoinsBattle_twitter
Apr 07 2018 10:52 UTC
thank you! will try with await)
AltcoinsBattle
@AltcoinsBattle_twitter
Apr 07 2018 11:07 UTC
rewritten, at least it behaves the same as before, hope I will never see the previously mentioned bug again ;-)
@marcpiechura :+1:
Marc Piechura
@marcpiechura
Apr 07 2018 11:21 UTC

You could also handle it differently if that would help:

Return NotUsed.Instance from your handle methods

source1 = Journal.ByInventory.Select(Handle)

source2 = Journal.ByDescription.Select(Handle)

source1.Concat(source2).RunForeach(Sink.Ignore<NotUsed>())

nbparrell
@nbparrell
Apr 07 2018 15:27 UTC

Hey guys, I am having trouble using the ActorSelection method. I have just modified the helloakka.cs in the examples to test out some of the funcitonality of the akka system and was looking that the ActorSelection method. I am running into an error when running the code:
[INFO][4/7/2018 3:21:14 PM][Thread 0003][akka://MySystem/deadLetters] Message Greet from akka://MySystem/deadLetters to akka://MySystem/deadLetters was not delivered. 1 dead letters encountered.

I think it is because of how I maybe writing the path for the actor.

code is here:
        var system = ActorSystem.Create("MySystem");
        var greeter = system.ActorOf<GreetingActor>("greeter");
        var greater = system.ActorOf<ActorGreeting>("greater");

        // send a message to the actor
        greeter.Tell(new Greet("World"));
        greeter.Tell(new Greet("Nick"));
        //greater.Tell(new Freak("Fish"));

        system.ActorSelection("akka://system/user/*er").Tell(new Greet("I am greeter"));
Marc Piechura
@marcpiechura
Apr 07 2018 16:12 UTC
@nbparrel Try “akka://MySystem/user/*er”
nbparrell
@nbparrell
Apr 07 2018 16:24 UTC
That worked. Thanks :). Is MySystem the root for every compilation of akka.net or is it set by user at some point?
Marc Piechura
@marcpiechura
Apr 07 2018 16:36 UTC
Look at your first line a little bit closer 😜
Arsene T. Gandote
@Tochemey
Apr 07 2018 19:55 UTC
Hello
nbparrell
@nbparrell
Apr 07 2018 22:53 UTC
@marcpiechura Lol the perils of being new thanks for pointing that out. Makes more sense.