You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@river.apache.org by Silas De Munck <si...@ua.ac.be> on 2010/05/12 11:56:04 UTC

blocking wait in remote call's?

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

-- 
--

Silas De Munck
PhD Student

Computational Modeling and Programming (COMP)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen, Belgium
G2.07, Department of Computer Science and Mathematics

e-mail: silas.demunck@ua.ac.be


Re: blocking wait in remote call's?

Posted by Kúti Zsolt <ku...@prolan.hu>.
Wed, 12 May 2010 11:56:04 +0200 -n
Silas De Munck <si...@ua.ac.be> í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