Re: [akka-user] Serial processing of messages by actor with Futures

2018-01-08 Thread Daniel Stoner
Akka Persistence may very well provide you some helpful ideas and insights. >From a pure perspective - it sounds as though you very much do want things to be blocking and serial. Are you aware that you can specify the execution context that actors run in and can in fact limit these so that many

Re: [akka-user] Serial processing of messages by actor with Futures

2018-01-05 Thread Martin Major
Thank you, I don't have much experience with Akka Persistence, but I'll definitely give it a shot. I always used Akka streams for true streaming things like HTTP stream of Kafka client but it is interesting idea to use it for things like this. I will sure try that. Thank you very much! Martin

Re: [akka-user] Serial processing of messages by actor with Futures

2018-01-04 Thread Brian Maso
I would consider Akka Persistence or using Akka Streams with the Flow.mapAsync function. Either one provides a way to handle your situation without unlimited threads. Using raw Actors only it will be just a lot of work and cleverness and wheel re-invention. Brian Maso On Thu, Jan 4, 2018 at 2:30

[akka-user] Serial processing of messages by actor with Futures

2018-01-04 Thread Martin Major
Hello, I have application in Akka Typed where I have instance of StateActor for each id (around 1000 instances). Each StateActor accepts 2 messages: GetState() and SetState(state). SetState saves its state to db and if that was successful, saves a copy to local actor cache. GetState responds w