[omniORB] Client Server synchronization using omniORB
EYAL S. ALSHEK
dolfin@mail.jce.ac.il
Sun Jul 21 14:29:01 2002
Hello,
I programmed an XO game using CORBA. In order to do so I changed echo
example 2 such that instead of class Echo_i and function echoString() I
have a different class with two functions.
My program includes a Client that receives a human user move and a Server
that checks game status (winning or lose of client or draw) and react to
the client move. I am using omniORB as a communicator between them to pass
the client move into the server and vice versa.
My problem is that the server needs to wait for the client move and only
then it can proceed to check the game status and give it reaction.
Similarly the client needs to wait for server response in order to get a
new move. To solve this I used an unsophisticated solution - A loop in the
server/client that wait for a change of value and only when that happened
it knows that the client/server had pass it move. This solution causes 100%
CPU usage.
Questions:
1- Are there any common techniques in CORBA similar to Select, blocking
with timeout, etc (which are usual with SOCKETS)?
2- Can you point out more realistic examples than "hello world"? I didn't
find any such demos.
Thanks for your time,
Eyal.