Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:41
    peirens-bart opened #4095
  • 08:37
    Aaronontheweb synchronize #4071
  • 08:13
    jiyeongj opened #4094
  • Dec 12 15:42
    Aaronontheweb synchronize #4086
  • Dec 12 15:42
    Aaronontheweb closed #4083
  • Dec 12 15:42

    Aaronontheweb on dev

    Fix #4083 - Endpoint receive bu… (compare)

  • Dec 12 15:42
    Aaronontheweb closed #4089
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb opened #4093
  • Dec 12 14:20
    Aaronontheweb commented #4092
  • Dec 12 14:14
    Aaronontheweb labeled #4089
  • Dec 12 14:14
    Aaronontheweb labeled #4089
  • Dec 12 14:11
    Aaronontheweb synchronize #4089
  • Dec 12 14:10
    Aaronontheweb synchronize #4086
  • Dec 12 14:09

    Aaronontheweb on dev

    Convert to ImmutableHashSet for… (compare)

  • Dec 12 14:09
    Aaronontheweb closed #4090
  • Dec 12 12:04
    nagytech synchronize #4092
  • Dec 12 11:53
    nagytech synchronize #4092
PinkyBrain
@PinkyBrain_gitlab
yes
AndreSteenbergen
@AndreSteenbergen
You can create the numbers of actors up front, as large as your pool - better yet: just create them when you receive the messages to process
everytime a message comes back, you can hand it one of the messages from your queue
I guess it isn't actually a lot different from this code, you would give it IEnumerable<object>, instead of IActorf ref
the ctor can be, int numberOfWorkers, and a method to create the actor (Props)
the initial receive would be the IEnumerable<object> (your message), you create your batch of actors in the Receive
enqueue all messages you can't process yet
and change state in Receiving using Become
AndreSteenbergen
@AndreSteenbergen
every time you receive something, you can send the parent actor the result, and give the actor which gave the result a message
when done, kill off the actr
ReceiveAny in the constructor would be Receive<ObjectHoldingAllMessagesToProcess>
I hope I make sense
AndreSteenbergen
@AndreSteenbergen
The actor creating this intermediate actor Watch it using intermediate.WatchWith(new DoneProcessingLotsOfMessages()), which will raise DoneProcessingLotsOfMessages
PinkyBrain
@PinkyBrain_gitlab
How about this: the throttledmessenger receives a message with the batch, it would first put the items in the batch into a queue, then dequeue parallelWorkers many items and create an actor for each and Tell them those items, then become a new state, where on each message received it Dequeues another item, creates another actor, and sends it that item, until the queue is empty
then I dont need to keep track of the workerPool or create all my actors up front
AndreSteenbergen
@AndreSteenbergen
That's what I meant with my first line ;) better yet: just create them when you receive the messages to process
Yuo don't need to create a new actor
the actor which processed the previous messages, can process a new one
PinkyBrain
@PinkyBrain_gitlab
the throttledmessenger can compile the results of all its children, so I would have just one originalSender.Tell in the case where the queue is empty, right? so the actor that wants the batch processed sends ThrottledMessenger an Ask, would that work?
ah right, so I would have at most parallelWorkers actors
AndreSteenbergen
@AndreSteenbergen
Yes, that would work
PinkyBrain
@PinkyBrain_gitlab
This sounds like an implementation of the roundrobin router :P
AndreSteenbergen
@AndreSteenbergen
I was just typing that... it is the router
PinkyBrain
@PinkyBrain_gitlab
hah, cool! i will give this a go, thanks for the help
AndreSteenbergen
@AndreSteenbergen
you can alse go for the router
;)
the throttler is an adoptation from the aggregator discussed: https://bartoszsypytkowski.com/dont-ask-tell-2/
PinkyBrain
@PinkyBrain_gitlab
I need to create the throttling actor from inside a method on a static class, would I have to pass that method the context in order to create the child?
or is there a way to pass the actor ref and create it from that?
AndreSteenbergen
@AndreSteenbergen
You can pass IActorRefs everywhere, that's the location transparency
You can create the when you have a context, actorsystem, or actor itself
Context.ActorOf, or actorSystem.ActorOf
PinkyBrain
@PinkyBrain_gitlab
the context can only be accessed from within the actor class though
if I'm in a static class method I can't see the Context, right?
and I don't have the system either
I guess I should create that child actor outside the static method and just pass it that actorref
Shukhrat Nekbaev
@snekbaev
https://github.com/petabridge/akkadotnet-code-samples/tree/master/TestKit#how-do-i-change-the-configuration-of-the-testactorsystem
is it possible to use App.config for that or is it not recommended? Tried, but it seems to be ignored by default, however, managed to make it work via:
public SomeActor() : base(ConfigurationFactory.Load())
{
}
AndreSteenbergen
@AndreSteenbergen
Hey guys, are there some benchmarks about persistence? I am trying to find out which persistance layer is best for my need, I am trying to store high numbers of actor journals. I can't keep it all in memory, so I need some disc persistence. But I also need it to be fast.
Jessie Wadman
@JessieWadman

I'm having a bit of trouble after updating to latest Akka 1.3.8 and Hyperion 0.9.8. I'm getting deserialization errors where before I didn't have any with 1.3.2 and 0.9.6.

The exception happens when one cluster node sends a message to another, with a message that consists of a Guid, string and a byte[]

It looks like Hyperion is not picking the correct value serializer for the message content.
Has anyone else seen this?

The exception I'm getting is:

Association with remote system akka.tcp://... has failed; address is now gated for 5000 ms. Reason is: [System.InvalidCastException: Unable to cast object of type 'System.Byte[]' to type 'System.String'.
at lambda_method(Closure , Stream , DeserializerSession )
at lambda_method(Closure , Stream , DeserializerSession )
at Hyperion.Serializer.DeserializeT
at Akka.Serialization.HyperionSerializer.FromBinary(Byte[] bytes, Type type)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Akka.Remote.Serialization.MessageContainerSerializer.FromBinary(Byte[] bytes, Type type)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, Payload message, IActorRef senderOption)

Shukhrat Nekbaev
@snekbaev
say, actor sends three messages and I'm interested only in testing the third one. Is my understanding correct that to be able to test the third message I can't just "cherry pick it from all response messages", but rather I need to either:
a) add ExpectMsg<MessageOne>, ExpectMsg<MsgTwo> to basically skip over the ones I'm not interested and then do one more ExpectMsg<MessageThree> and assert against the result
b) add IgnoreMessages with a predicate of everything but MessageThree and then add ExpectMsg<MessageThree> and assert the result
Shukhrat Nekbaev
@snekbaev
what is the recommended way to test stashing in the actor?
Andrey Leskov
@andreyleskov
Hey all, seems like DI-ed props still cannot be sent over the wire in cluster environment, is it true ? akkadotnet/Akka.DI.AutoFac#14
Arjen Smits
@Danthar
yes
our focus has been on other stuff.
Sean Killeen
@SeanKilleen

Hey all, I'm seeing some different behavior in an Akka .NET demo app after upgrading packages. Wondering if some behavior changed that I missed. I'm not confident enough to say that it's an actual issue but I've ruled out everything except the package upgrades I think.

After upgrading from Akka 1.0.8 to 1.3.8, it appears that Sender.Path is unexpectedly identified as deadLetters for an actor that's just receiving text and writing it to the console. In the older version, the path is showing as expected.

I've got repo with a branch that you can pull side by side and compare the upgrades and demos. As far I can tell, the packages are the only things that were updated, and I updated each to the latest stable.

Questions:

  • Is it worth filing a bug in the Akka repo?
  • Am I missing something?
Sean Killeen
@SeanKilleen

Update: yes of course I was missing something. :laughing: I was sending messages to actors from within a console app directly instead of another actor. So of course there's no reference to the sender. The difference is that in the old implementation, the Sender was defaulted to akka://all-systems/ which didn't quite alert me to the issue.

So I approve of the current behavior! :thumbsup:

Arjen Smits
@Danthar
:+1:
Arsene
@Tochemey

Hello I am getting this error from withing ReceiveAsync :

There is no active ActorContext, this is most likely due to use of async operations from within this actor.Complete

Please assist

Arjen Smits
@Danthar
how are you using ReceiveAsync ?
im using it alot in some of my projects. but incidentally async await is used in every occasion