[omniORB] emulating Reactor pattern with omniORB
Michael Kilburn
crusader.mike at gmail.com
Thu Nov 8 00:54:32 GMT 2007
Hi
It looks like there is a way to emulate "proper" Reactor pattern with
omniORB. Here is the trick:
- use ORB_CTRL mode
- install interceptors
- on receiving request or response -- lock mutex
- on request send/response -- unlock mutex
This gives semantic close to reactor pattern as implemented in Orbacus (i.e.
you could have nested calls of any depth) and your server will behave as in
single-threaded mode -- i.e. no need for synchronization headache.
Is anything wrong with this approach?
So far I see only these drawbacks:
- client (app that initiates call chain) can't work this way (you can't
unlock mutex that is not locked)
- one-way calls will require some additional treatment (they do not receive
response)
- I am not sure if it is ok to stay in interceptor for long time -- for
example, what will happen if it will stay there for 5 mins? for 1 second and
another request will arrive? In which context these interceptors are called,
is anything locked at that point in omniORB guts?
Thanks
--
Sincerely yours,
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20071108/75534c27/attachment.htm
More information about the omniORB-list
mailing list