Problem with oneway calls
Sai-Lai Lo
S.Lo@orl.co.uk
Mon, 5 Jan 1998 15:26:30 GMT
>>>>> Tobias Engel writes:
> I have the problem that under certain circumstances oneway calls with
> omniORB (2.2.0) don't return immediatly but wait until the called method
> is finished. This problem was discussed on the omniORB mailing list, but
> there was no definite statement if this is a bug or a feature.
> So it would be great if you could tell me how this is *supposed* to work
> and how it *will* work in future versions.
Hi! This subject has been covered in the mailing list several times.
Please see my last reply on the subject:
http://www.orl.co.uk/omniORB/archives/1997-Oct/0007.html
IMHO, it is wrong to assume that an ORB would deliver oneway calls
asynchronously. The fact that, when an object is remote, the call seems to
exhibit asynchronous behaviour is purely a side-effect of the
implementation. This should not be taken as a "standard" behaviour.
My advice is to look at your IDLs and identify those oneway operations that
have to be done asychronously. Implement these operations with a FIFO
buffer. A call to one of these operations causes an event to be deposited
into the FIFO. The call then immediately returns. Use another thread in the
background to retrieve the events from the FIFOs and perform the appropriate
actions. If you look around, you might even find a "design pattern"
documenting this kind of approach.
Regards,
Sai-Lai
--
Dr Sai-Lai Lo | Research Scientist
|
E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
| 24a Trumpington Street
Tel: +44 223 343000 | Cambridge CB2 1QA
Fax: +44 223 313542 | ENGLAND