Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:53
    Aaronontheweb synchronize #4238
  • 01:20
    Aaronontheweb synchronize #4211
  • 01:05
    Aaronontheweb synchronize #4212
  • 00:57

    Aaronontheweb on dev

    Racy specs: Akka.Streams (#4209… (compare)

  • 00:57
    Aaronontheweb closed #4209
  • 00:48
    Aaronontheweb labeled #4255
  • 00:48
    Aaronontheweb labeled #4255
  • 00:48
    Aaronontheweb opened #4255
  • 00:39
    Aaronontheweb synchronize #4209
  • 00:38
    Aaronontheweb milestoned #4254
  • 00:38
    Aaronontheweb labeled #4254
  • 00:38
    Aaronontheweb labeled #4254
  • 00:38
    Aaronontheweb assigned #4254
  • 00:38
    Aaronontheweb opened #4254
  • 00:23
    Aaronontheweb synchronize #4209
  • 00:11

    Aaronontheweb on dev

    close #3879 - disable buffer po… (compare)

  • 00:11
    Aaronontheweb closed #4252
  • 00:11
    Aaronontheweb closed #4244
  • 00:11
    Aaronontheweb closed #3273
  • 00:11
    Aaronontheweb closed #3879
Havret
@Havret
image.png
Peter Shrosbree
@pshrosbree
I see TypedActor is marked as obsolete in Akka 1.3.8. What is the replacement?
image.png
Oh, ignore me. Long day...
:)
Ismael Hamed
@ismaelhamed
@Havret eeeuuuu!
Shukhrat Nekbaev
@snekbaev
say I have some actor X, it receives the message "Msg", does some processing and replies. When it receives it, it puts it into internal dictionary for the correlation purposes, then asks some other actors, collects the information and before replying removes the entry from the dictionary. I'd like to test that during each internal step dictionary is being correctly updated. What would be the proper approach to test this?
Marc Piechura
@marcpiechura
@snekbaev That the actor stores messages in a dictionary should be an implementation detail and as such shouldn’t be tested explicitly, try to find a test case that tests the logic behind it, e.g. if the actor receives the same message twice before the first has been processed, the second one should be ignored or the actor should respond with a special message.
AndreSteenbergen
@AndreSteenbergen
@snekbaev try reading up on Behaviour Driven Development. Your actors are "black boxes" behaving is some manor. You could approach actor testing a lot like BDD, given a set of already processed events, when command x is raised, then you will expect some outcome. Main focus is actors behave like you need on the outside.
Vagif Abilov
@object
I have a question about Petabridge.Cmd. Currently it runs in a Powershell console. Are there plans to expose its functionality as an API so it can be integrated in customised cluster monitoring tools? /cc @Aaronontheweb
Vasily Kirichenko
@vasily-kirichenko
Vasily Kirichenko
@vasily-kirichenko
Is Lighthouse mandatory to be used? What if I just deploy 5 nodes, 2 of which are seeds?
AndreSteenbergen
@AndreSteenbergen
No not mandatory, it's just so you have two well known nodes you can always and easily find
I guess that's where the comes from as well
Check the code, it is a cluster node, without any functional parts, except hosting an akkasystem.
Vasily Kirichenko
@vasily-kirichenko
ok, thanks
Vagif Abilov
@object
@vasily-kirichenko It's not mandatory but we found it convenient for CI process - we always have our Lighthouses running, no need to redeploy them. And other components are updated all the time.
But didn't you experiment with Consul? You can even replace LH with your own discovery tools.
Vasily Kirichenko
@vasily-kirichenko
yes, we use Consul discovery on prod, but on a small (~10 nodes) cluster. When I tried to use it on a ~200 nodes cluster, there was an exceptions storm and I rolled back it quickly.
so if I were asked what problem I have with akka, I'd say - consul.
Vasily Kirichenko
@vasily-kirichenko
I am just not confident that the current solution can scale. not good. So I'm gonna try Lighthouse for the new project.
Must Lighthouse nodes be updated when I update akka packages?
Shukhrat Nekbaev
@snekbaev
@marcpiechura @AndreSteenbergen thank you
Vagif Abilov
@object
@vasily-kirichenko AFAIK only when underlying comminication format changes.
AndreSteenbergen
@AndreSteenbergen
dot netty was upgraded recently, 1.3.8 has a newer dotnetty, so I would recommend updating, if you are using 1.3.8 remote someplace, I would recommend upgrading.
Arjen Smits
@Danthar
@vasily-kirichenko lately every update to Akka contains some form of improvements to the cluster system. Which means that updating your lighthouse instances as well, is strongly recommended.
Roger Martinez
@regormz_twitter
Hello everybody!!. I wonder if Akka is able to manage an overflow exception occurred in an actor. It closes the application and it does not execute the supervisor strategy.
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko would you like to describe this as an issue of github? It's a note worth tracking.
Vagif Abilov
@object
@regormz_twitter newer versions of NET don't allow catching StackOverflowException in a try-catch block. This is something you have to resolve outside Akka.
Shukhrat Nekbaev
@snekbaev
what is the recommended approach to mocking child actors, say, I have actor X which internally creates A and B. I'd like to test only X and would like to substitute A and B with test probes and probably autopilot(?). However, because X does Context.ActorOf it doesn't seem possible, unless, of course, there's way to hook into some Context.ActorOf test callback if one exists. Another approach I've found is to pass a dependency into X which is responsible for creating children and substitute it when testing. Or... maybe just extend the static Props actor creator for X and make it receive a lambda which takes in the Context
Arsene
@Tochemey
Hello
How can I best load test my actors?
Stijn Herreman
@stijnherreman
I'm considering rewriting my unit tests for an FSM because they often unnecessarily break when changing implementation details of the FSM. https://www.planetgeek.ch/2011/05/17/how-to-unit-test-finite-state-machines/ advises against calling a method like SetState in the unit test, and advises testing for side-effects external from the FSM. That certainly sounds like it could reduce test breakage. Anyone here experienced with testing FSMs? What do you recommend?
Bartosz Sypytkowski
@Horusiath
@snekbaev actors can promote a bit different approach to unit testing. Since a single application feature can be result of work of multiple actors, testing them in isolation sometimes just doesn't make sense. Actors work together in systems, and sometimes it's best to test them as such.
@stijnherreman from my experience in any message based system the best way of working is to have a collection of inputs that you wan to test (they also are responsible for moving state machine to a desired state) and then just assert outputs and side effect. In practice internal state and implementation doesn't really matter as long as FSM reacts with world around it as designed.
Bartosz Sypytkowski
@Horusiath
@Tochemey what do you mean by that? There are plenty of ways to perform load tests, but everything starts with what is this test supposed to answer?
Shukhrat Nekbaev
@snekbaev
@Horusiath I've test covered the child actors individually (they don't have their own children), but I'd like to test the orchestration logic for their parent, for example, that it stashes correctly, takes certain actions depending on what children reply. Of course I could leave as is, but in this case will have to mock a lot of things and I don't really feel like I need to do that in this specific case. What I'm trying to do now: I created a nested class for the parent which inherits in interface for creation of Props for A and B. Then I added one more static Props methods in to X for its own creation, one overload takes IChildCreator. Now I'm trying to mock this interface and return a test probe with autopilot and see it this even works :)
Shukhrat Nekbaev
@snekbaev
heh, it seems to work, but will test further. If somebody needs to pass a probe and return Props - a dummy wrapper seems to do the trick (found online):
public sealed class TestProbeWrapper : UntypedActor
        {
            private readonly IActorRef _target;

            public TestProbeWrapper(IActorRef target)
            {
                _target = target ?? throw new ArgumentNullException( nameof( target ) );
            }

            protected override void OnReceive( object message )
            {
                _target.Forward( message );
            }
        }
Props.Create( () => new TestProbeWrapper( getActorProbe ) )
Vasily Kirichenko
@vasily-kirichenko

@Horusiath what is a more typed way to make an Ask?

let loop (ctx: Actor<Msg>) (state: State) = function
    | GetConfiguration ->
         ctx.Sender() <! (Ok state.Configuration : Result<Configuration, string>)
         ignored()

here if I remove the type hint it's inferred as Result<Configuration, obj> which results with disasters.
It's an entry point to the actor system, so I cannot pass an IActorRef<>.

Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko popular option is to use replyTo pattern (add a field to a message, usually called ReplyTo), which contains an actor to which you may want respond to. Then in code instead of sending reply to Sender, send it to msg.ReplyTo. This could work with ask via Ask overload - tbh. I'm not sure if this method is already published.
Jay DeBoer
@jaydeboer
Is it possible to have an actor not restart its children when it encounters an exception and restarts?
lujunjie
@LosCaesar_gitlab
I want to know how to implement some actors to form a ring and make multiple rounds of messaging?Thanks
Vasily Kirichenko
@vasily-kirichenko
@Horusiath I need to "ask" an actor outside actor system (it's a call from Fable.Remoting). I have only IActorRef<'a> on which I can call <?, but it's untyped. You suggest to pass an IActorRef<> to receive response, but where can I get one?
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko this is what ask overload I give you a link to is all about (instead of message it takes message factory which takes temporary callback address as a param). But it's not exposed directly in Akkling yet
Vasily Kirichenko
@vasily-kirichenko
@Horusiath thanks. We need to add it to Akkling.
Stijn Herreman
@stijnherreman
When actor A sends a message to actor B, and B is supposed to reply to A with some data, how do I inform A of a failure in one of B's children? This cannot be done with a supervisor strategy it seems? The goal is to let A know it should stop its process and shut down, logging a failure somewhere.
Stijn Herreman
@stijnherreman
Maybe I need to clarify a bit. B is a supervisor that Forwards messages to children. Failure in children is escalated to B, so I'm looking for a way to have B Tell A about the failure.
Vasily Kirichenko
@vasily-kirichenko
@stijnherreman You can watch an actor.