[omniORB] Design question - organising data exchange during short connection

Viktor Mikho vvmikho@hotmail.com
Sun, 03 Sep 2000 23:07:03 GMT


Hi there,

I need some advice on how to organise data exchange between multithreaded 
server and client during short lived connection (up to several minutes).

I have communication Gateway which can be accessed by Devices (up to 25 
Devices at one time). After that the Server program should be notified that 
new connection is opened and there should be some info exchange as folows:

1. Server <- Gateway <- Device  (Open connection)
2. Server -> Gateway -> Device  (What is your state regarding....)
3. Server -> Gateway -> Device  (Here is my state info)
4. Server -> Gateway -> Device  (Here is some data for you)
5. Server <- Gateway <- Device  (Close connection)

Link between Gateway and Device is not CORBA. Server and Gateway use CORBA 
(omniORB 2.8).
Gateway has its own dedicated thread when talking to a particular Device. So 
when any CORBA request comes to the Gateway it should be posted somehow to 
the relevant thread.
Similiar picture exists on the Server side - there is a thread which is 
dedicated to this particular Server -Gateway link. I would like to make some 
shortcuts in this setup so that at least during some calls I do not need to 
do all that multithreading stuff (looking for the relevant thread, posting 
relevant event object, passing data etc). For example, I would much prefer 
to do the following thing at step 2 (attempting to combine steps 2-4):

Server says:
gateWay->updateYourState(stateQuery, stateJudge);
stateQuery is a command string; stateJudge is a shortlived CORBA object;

Gateway queries device with a stateQuery string and then uses stateJudge 
(still within updateYourState() body):
stateJudge->getRelevantUpdateBuffer(deviceStateResponse);
After updating the device, gateway object returns from updateYourState() 
function returning comms result.

I am trying to save on multithread communication here (and on index search). 
My question is I guess, how expensive are these short lived stateJudge 
objects and how easy will they clog my CORBA communication resources? Is it 
good idea to use it?

Thing I am doing seems to be quite common. Are there any patterns for 
approaching this ?

Thanks,

Viktor




_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.