Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 19:34
    IgorFedchenko synchronize #3973
  • 17:53
    Aaronontheweb closed #3972
  • 17:53
    Aaronontheweb commented #3972
  • 17:53
    Aaronontheweb closed #3976
  • 17:53
    Aaronontheweb commented #3976
  • 17:40

    Aaronontheweb on dev

    cleaned up some samples to use … (compare)

  • 17:40
    Aaronontheweb closed #3975
  • 16:33
    IgorFedchenko synchronize #3973
  • 16:31
    IgorFedchenko synchronize #3973
  • 14:04
    wsvdyk opened #3976
  • Oct 14 21:02
    Aaronontheweb synchronize #3975
  • Oct 14 21:02
    Aaronontheweb opened #3975
  • Oct 14 20:11
    IgorFedchenko commented #3973
  • Oct 14 20:10
    IgorFedchenko synchronize #3973
  • Oct 14 20:06
    IgorFedchenko synchronize #3973
  • Oct 14 20:06
    IgorFedchenko synchronize #3973
  • Oct 14 19:42
    IgorFedchenko edited #3973
  • Oct 14 18:08
    Aaronontheweb commented #3937
  • Oct 14 17:27
    Aaronontheweb commented #90
  • Oct 14 17:26
    Aaronontheweb commented #90
Aaron Stannard
@Aaronontheweb
i.e. it's risky because you have no idea whether an operation started / completed when the error occurred
and re-running the operation a second time would be dangerous
chipdice
@chipdice
@Aaronontheweb I only hesitate because it will add another level of dev work to my project, which of course, is due yesterday. Thanks for the info
Aaron Stannard
@Aaronontheweb
if restarting is too risky then you can get away with many more different types of structures
from a hierarchy perspective
because the error just gets flagged wherever it happened
and presumably a human either has to go look at it or whatever
or maybe the customer just re-submits the request
trying to stick to generalities when I give advice like that
your mileage may vary
@chipdice I feel you there
Chandra Sekhar Manginipalli
@leo12chandu
I see. Restarting is not risky because its stateless and when things go wrong, we explicitly capture the error and send it back to the user as an exception. So its fine.
Aaron Stannard
@Aaronontheweb
@leo12chandu but yeah, I'd have a single parent manage everything in that case then
Chandra Sekhar Manginipalli
@leo12chandu
Thanks Aaron, will restructure all of them to have just 1 parent.
Aaron Stannard
@Aaronontheweb
and that way you can create multiple instances of that parent and scale out
underneath a router or whatever
if you want to increase the degree of parallelism
but for the time being, sounds like one parent should be sufficient
Chandra Sekhar Manginipalli
@leo12chandu
Gotcha.
Bartosz Sypytkowski
@Horusiath

@OnurGumus

Does akkling persist have a callback mechanism ?

Could you precise?

Seyedamirhossein Hesamian
@amir734jj
In Akka.Net, How to convert IActorRef to the concrete class that extended ReceiveActor?
I tried AsInstanceOf, but it does not work.
Peter Shrosbree
@pshrosbree
@amir734jj You cannot. IActorRef is not an interface that actors implement, so what you are asking does not make sense in terms of casting. The type of the actor referenced may not even be a type in your process address space, or even on your machine, so even if actors did implement the interface, you would not be able to retrieve the type. IActorRefs are just things you can send messages to.
Seyedamirhossein Hesamian
@amir734jj
@pshrosbree Makes sense, Thanks you
Maik Lathan
@mlathan
Can sombody explain to me how I can disable this warning?
********|2018-06-27 13:33:10.3538|Warn|remoting|Tried to associate with unreachable remote address [akka.tcp://****@localhost:50000]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters.
Obviously it is a remoting warning. So looked it up in https://getakka.net/articles/configuration/akka.remote.html. There is a configuration key log-remote-lifecycle-events which sounds what I'm looking for to me. But setting it to error or even off has no effect. So how can I realize it?
For the context. In my system I have to seed nodes. One at localhost:50000 and the other one at localhost:50001. Sometimes it is possible by design that localhost:50000 is offline. This state will cause the warning; which is okay to me.
nathvi
@nathvi
Is this bad design?
public void RunActorSytem()
        {
            try
            {
                var actorSystem = ActorSystem.Create("ActorSystem");
                var playerActor1 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Bob")));
                var playerActor2 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Susan")));
                var playerActor3 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Simon")));

                // All events get persisted to EventJournal Sql Server tbl.
                // When process is restarted, EventJournal replays messages to actors to restore state,
                // BEFORE messages from mailboxes can be processed.
                Task.Run(() => RunHitHealLoop(playerActor1));
                Task.Run(() => RunHitHealLoop(playerActor2));
                Task.Run(() => RunHitHealLoop(playerActor3));
            }
            catch (Exception e)
            {
                Log.Error(e.Message);
                throw e;
            }
        }
void RunHitHealLoop(IActorRef playerActor)
        {
            while (true)
            {
                playerActor.Tell(new HitMessage(3));
                playerActor.Tell(new AddHealthMessage(10));
                playerActor.Tell(new DisplayStatusMessage());
                Thread.Sleep(3000);
            }
        }
Arjen Smits
@Danthar
Besides that i would do a await Task.Delay instead of Thread.Sleep. There is not a whole lot to go on here.
What is your goal here ?
nathvi
@nathvi
To spawn some threads that send messages to actors in a cycle.
Arjen Smits
@Danthar
I get that :) But your question implies that you have some doubts concerning this particular example. Or perhaps some specific questions ?
nathvi
@nathvi
Just curious if it makes sense to do it that way.
No particular thing.
Arjen Smits
@Danthar
If it works for you. Sure. I wouldn't do it like this when inside another actor.
and when you start building out. You are probably going to want some kind of actor that manages PlayerActors
nathvi
@nathvi
A "PlayerManagerActor"
or a "PlayerGodActor"
Arjen Smits
@Danthar
depends on what problem your solving
usually your system has more then just players
so there comes a point where you will want to fetch an IActorRef to a certain playerActor
Thats where something like the PlayerManagerActor comes into play
nathvi
@nathvi
hence the PlayerGodActor
Arjen Smits
@Danthar
it would be a well known toplevel actor in your hierarchy
which the rest of your system uses to retrieve specific playeractors
and do stuff with it :)
nathvi
@nathvi
Manager sounds like something human. Only gods can create people instantly.
Arjen Smits
@Danthar
Naming things is one of the hardest things in our field ;)
and often subjective