Wed, 12 May 2010 11:56:04 +0200 -n
Silas De Munck <[email protected]> írta:

> Hello,
> 
> I have a distributed simulation running several simulation processes
> and one controller.
> The startup process of the simulation requires the simulation
> processes to be synchronized
> at some points. To achieve this, I have a CyclicBarrier whithin the 
> controller and a
> remotely callable function "waitForStartup()" that waits on the
> barrier. This remote function
> is called from the client simulation processes during their startup, 
> effectively blocking in client,
> until the barrier is passed.
> 
> The problem is that however the barrier is passed within the
> controller, a client sometimes stays in a blocked state, as if the
> call doesn't return.
> 
> I know this isn't the cleanest way to do this, but I'm wondering
> what could be the cause of this problem and if it can be
> solved/worked around?
> 
> I'm using Jini 2.1 with Jeri.
> 
> Thanks in advance,
> 
> Silas De Munck

Hello Silas,

I do not know what could cause such a blocking, sorry. 
In my application for a somewhat similar situation the use of JavaSpace
for such coordination mechanism works nice.

A master places into the space an entry that means a start for workers.
Workers use blocking read to learn if they can proceed. Workers can
report their activity by placing specific entries into space, in the
meantime master can read and evaluate those entries and publish a
"barrier" for workers that can again base their further activity what is
found in the space (and so on). 
It's an easy and quick way to put together a desired  "workflow".

Zsolt

Reply via email to