I have a strange problem using Akka actors.
The scenario is like this;

Actor A creates Actor B1 and Actor B1 creates "n" actors which are 
responsible for execiting tasks.
So A is parent of B1 and B1 is parent of lets say b1, b2, b3, ....

In A i have scheduled a ticker so that A checks every 10secods if there is 
a new B' to create. 

Duration duration = Duration.create(10 sec.);
FiniteDuration interval = new FiniteDuration(duration.toMillis(), 
TimeUnit.MILLISECONDS);
ticker = getContext().system().scheduler().schedule(interval, interval, 
getSelf(), new Tick() { }, getContext().dispatcher(), getSelf());

On front end i can adjust the parallel degree of number of "b" tasks.
For example if i set the parallel degree to 3 then B(1) creates 3 actors 
and each actor executes some task
and if one actor , lets say b(n), finishes than b(n+1) is created and so on.

The problem is ;

If there is only one actor b(i=1) that is created by Actor "B'" (which B is 
not important) than ticker really ticks
every 10 seconds, but if i increase the parallel degree of b's to lets say 
64 b(i=64) then tickers doesnot behave properley.
It waits quite a long time for example 1 min. then ticks 6 times 
consequtively as if there is a flush mechanisim.

And this is not the only problem i got when i increase the number of actors 
on the system.

I have a api so that user sends orders to actors like below


String path = ActorPaths.actorPathForPlan(plan);
ActorSelection actorSelection = 
runtimeInit.getSystem().actorSelection(path);
// ask
Timeout timeout = new Timeout(Duration.create(4*1000, 
TimeUnit.MILLISECONDS));
Future<Object> future = Patterns.ask(actorSelection, message, timeout);
// get result
return returnType.cast(Await.result(future, timeout.duration()));


when there is more than approximitely 10 actors then futures always times 
out but when i debug the code i see the message 
is recived but after quite a long time.

So, I wonder what is blocking my Actor A from receiving messages. The same 
problem may be occuring in actor B' and its children
i didn't checked yet but if i figure out the problem i belive i can apply 
the solution to others.

Thanks for any suggestions.


The hiararchy is like this

                A
 ------------------------ ....  
 |               |                |
 |               |                |
(B1)       (B2)           ...(Bn)
  ---------------       --------            .............
  |      |      |    |     |
  |      |      |    |     |                    |
 (b11)  (b12) ..... (b21) (b22)    ............ (bnm)

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to