Re: [akka-user] Persistence of dynamic hierarchy of actors with short/medium length of life

2015-10-09 Thread Konrad Malawski
Hi Robert, In order to get this right you'll need to pivot your thinking about serialization a bit, i.e. the problem statement of "serializing dynamic hierarchy of actors" is not a good one to try to design for directly – actors are entities "which do stuff and have state". The hierarchy is not rea

Re: [akka-user] Akka HTTP keep-alive timeout

2015-10-09 Thread Konrad Malawski
Hi there, we recently implemented the needed internal infrastructure for timeouts to be implemented efficiently, however have not yet wired up the Http / TCP level idleTimeout option to actually do it, the ticket covering it is: https://github.com/akka/akka/issues/16597 So it's a simple setting

[akka-user] Akka HTTP keep-alive timeout

2015-10-09 Thread longshorej
Hi, First off, thanks for the great piece of software - it has been a joy to work with. I'm working on implementing some graceful shutdown logic and have made some good progress but I am wondering if there's anyway to have HTTP keep-alive connections timeout? I'm basically looking for the equi

[akka-user] How to construct a type parameterized Actor with a ClassTag?

2015-10-09 Thread Rolf
I wish to create an actor that stores an array of elements of some general type V. The typical way to instantiate such an array is to provide a ClassTag and default value. I have implemented this as follows: import akka.actor._ import scala.reflect.ClassTag class MyActor[V : ClassTag](size: Int

[akka-user] [akka-distributed-data] Data replication over a named cluster role

2015-10-09 Thread Yuji Kiriki
Hello. I have been trying to limit the replication of a *LWWMap* to the node roles named with "data". I followed the documentation and I found that I can do it using this configuration on the application.conf: akka.cluster.distributed-data { > role = data > } After some tests, I fou

Re: [akka-user] is there a way to know when *really* an actor has stopped

2015-10-09 Thread Heiko Seeberger
A parent need not keep track of its children explicitly, there are `context.children` and `context.child(name)`. Actor termination is not trivial, so some work needs to be done! Locality doesn’t help, termination works the same locally and remotely. Maybe this is a use case for Cluster Sharding

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
Thanks for elaborating. I still don't understand why the databaseServer can't watch its index children and recreate them when it receives Terminated. Regarding recreating the databaseServer itself (top level I guess) in tests I would not reuse the name. fre 9 okt. 2015 kl. 18:54 skrev 'Konstantino

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
A solution like this could work, but it is a lot more complicated (complexity added just to handle actor termination). The databaseServer actor is not affected by the deaths of the indexes. Btw, all my Terminated actors are local (same ActorSystem, same jvm) to the watcher, does that help? O

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Michael Frank
instead of using actor paths to send directly to the index actor, why not send your message to the /databaseServer actor, which then forwards the message to the appropriate index actor? the databaseServer actor would contain a Map[String,ActorRef] which maps index name to index actor (which ar

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
well, I am using actor paths to find the actors, which are unique per ActorSystem. I.e. paths are ../databaseServer ../databaseServer/index:x1 ../databaseServer/index:x2 I am using the akka cluster, so each "server" will have these paths. Now when I do a "dropIndex" and drop index x1, actor

Re: [akka-user] Akka logging adaptor doesn't support slf4j's trace level?

2015-10-09 Thread Heiko Seeberger
If you want to bypass Akka Logging, you maybe want to consider using Log4j with async logging, because its Disruptor based impl seems pretty neat. Maybe in Akka 3 they should get rid of Akka Logging altogether and use async Log4j logging directly? Heiko -- Heiko Seeberger Home: heikoseeberger

Re: [akka-user] Akka logging adaptor doesn't support slf4j's trace level?

2015-10-09 Thread Eugene Dzhurinsky
On Fri, Oct 09, 2015 at 04:02:00PM +0200, Heiko Seeberger wrote: > I disagree. Akka's logging facility doesn’t wrap SLF4J, it just offers a > backend based on SLF4J, like akka-log4j provides a backend based on Log4j 2. > Personally, I don’t like too many levels and I believe the ones provided by

Re: [akka-user] Akka logging adaptor doesn't support slf4j's trace level?

2015-10-09 Thread Heiko Seeberger
I disagree. Akka's logging facility doesn’t wrap SLF4J, it just offers a backend based on SLF4J, like akka-log4j provides a backend based on Log4j 2. Personally, I don’t like too many levels and I believe the ones provided by Akka are perfect. Just my 5 cents Heiko -- Heiko Seeberger Home: he

Re: [akka-user] Akka logging adaptor doesn't support slf4j's trace level?

2015-10-09 Thread Colin Smith
I too find myself wanting log.trace(), and don't see a reason not to introduce it. When trace logging is enabled one doesn't expect fantastic performance, but the insights that a deeper-than-debug level of logging might provide. My use-case is that I want to see all the metric data that is bein

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
it's probably easies to not reuse the name On Fri, Oct 9, 2015 at 1:23 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > Well, I have this component based on 1 actor. It is the "flow" thing I was > talking a few months ago, anyway it does take care of a process

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
Well, I have this component based on 1 actor. It is the "flow" thing I was talking a few months ago, anyway it does take care of a process between different actors. One thing it does is to stop an other actor and wait till it is terminated. I need to make sure the other actor is really terminat

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
On Fri, Oct 9, 2015 at 12:59 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > oh... in that case my code changes won't work. The watcher is not the > parent of the actor. > > Will it work if the watcher is child of the same parent of the Terminated > actor? > n

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
oh... in that case my code changes won't work. The watcher is not the parent of the actor. Will it work if the watcher is child of the same parent of the Terminated actor? On 09/10/15 06:08, Patrik Nordwall wrote: Note that this advice is correct but only when the parent actor receives the

[akka-user] How to rebuild system with akka?

2015-10-09 Thread 张留成
Hi all: there is a system to provide some services. it's build with java threads. but now it's very slowly when 1K users use the services at the same time. so we decide to build a distributed with akka.. BUT, i'm new user with akka ask for help Current Architecture: