PLEASE HELP - How to simulate 'wait' and 'notify' in RMI environment

C

cpptutor2000

Could some Java guru help me? First of all, we know that 'wait',
'notify' and 'notifyAll' only work in the case the classes are being
executed on the same JVM. Consider now an RMI-based application. Let a
client and server objects be running on seperate physical machines,
i.e., JVMs. Now suppose the client makes a request to the server, which
can only be serviced if the server finds that some pre-defined global
predicate be true, and if not the server blocks replying to the client.
In case of the server and client objects running on the same JVM, this
is enforced using 'wait' etc., What would be the corresponding analog
in the distributed environment? Any help/suggestions would be greatly
appreciated.
Thanks in advance for your help.
 
E

E.J. Pitt

Could some Java guru help me? First of all, we know that 'wait',
'notify' and 'notifyAll' only work in the case the classes are being
executed on the same JVM. Consider now an RMI-based application. Let a
client and server objects be running on seperate physical machines,
i.e., JVMs. Now suppose the client makes a request to the server, which
can only be serviced if the server finds that some pre-defined global
predicate be true, and if not the server blocks replying to the client.
In case of the server and client objects running on the same JVM, this
is enforced using 'wait' etc., What would be the corresponding analog
in the distributed environment? Any help/suggestions would be greatly
appreciated.

The analog in RMI is that the client blocks waiting for the server to
reply. You don't have to do anything to get this behaviour.
 
R

Roedy Green

, What would be the corresponding analog
in the distributed environment?

the pipe between the machines is a serialiser. Only one object or
call at a time can go through it. That makes it work something like
an event queue of work packets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top