Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 18:08
    Aaronontheweb commented #3937
  • 17:27
    Aaronontheweb commented #90
  • 17:26
    Aaronontheweb commented #90
  • 17:25
    Aaronontheweb assigned #90
  • 17:16

    Aaronontheweb on dev

    Provide static GetRoutees.Insta… (compare)

  • 17:16
    Aaronontheweb closed #3974
  • 17:16
    Aaronontheweb milestoned #3974
  • 16:05
    jackowild opened #90
  • 15:08
    Aaronontheweb commented #3974
  • 15:08
    Aaronontheweb commented #3974
  • Oct 13 14:40
    cptjazz synchronize #3974
  • Oct 13 14:07
    cptjazz opened #3974
  • Oct 13 08:30
    ismaelhamed commented #3937
  • Oct 12 15:50
    IrvinDominin opened #127
  • Oct 11 18:21
    Aaronontheweb commented #3973
  • Oct 11 18:20
    Aaronontheweb commented #3937
  • Oct 11 18:16
    Zetanova commented #3937
  • Oct 11 18:11
    Zetanova commented #3937
  • Oct 11 15:09
    Aaronontheweb commented #3937
  • Oct 11 15:08
    Aaronontheweb commented #3937
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
nathvi
@nathvi
true
GodOfPlayersActor?
Arjen Smits
@Danthar
I wouldn't name it PlayerGodActor for instance. Because i would think its somekind of special PlayerActor
And it would not instantly convey "im the actor responsible for managing playeractors"
PlayerRegistryActor is also an option
nathvi
@nathvi
That's so boring though
lol
Arjen Smits
@Danthar
hahaha true
nathvi
@nathvi
PlayerMasterActor
LordOfPlayerActors
Arjen Smits
@Danthar
^^
PlayerUniverse
nathvi
@nathvi
I would think the actor system itself would be the player universe
GrandWizardOfPlayerActors
Manager is too weak in my opinion. Managers manage existing people. They don't create them instantly or make them vanish.
Arjen Smits
@Danthar
It can do whatever you want it to do :)
gl though ;) gtg
nathvi
@nathvi
aiight
me-slove
@me-slove
Like PlayerController or PlayerManager