Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[tao-users] Re: POA 'Holding' State

0 views
Skip to first unread message

Douglas C. Schmidt

unread,
Feb 21, 2000, 3:00:00 AM2/21/00
to
Hi Rob,

>> Are there any plans to implement the poa's 'holding' state in TAO?
>> (With some maximum number of queued requests > 0?)

No, not at this time. Unfortunately, queueing requests in a POA has
many deleterious effects on ORB performance, which is unsuitable for
key real-time applications that are important for our sponsors.
If you're interested in sponsoring an effort to add this feature to a
TAO configuration please let me know.

Thanks,

Doug
--
Dr. Douglas C. Schmidt, Associate Professor TEL: (949) 824-1901
Dept of Electrical & Computer Engineering FAX: (949) 824-2321
616E Engineering Tower WEB: www.ece.uci.edu/~schmidt/
University of Calfornia, Irvine, 92697-2625 NET: sch...@uci.edu

Douglas C. Schmidt

unread,
Feb 21, 2000, 3:00:00 AM2/21/00
to

Hi Rob,

Thanks very much for your email. Since I'm on the road most of the
time, please make sure to send all questions related to TAO or ACE to
the TAO mailing list or ACE+TAO newsgroup.

> Thank you. My interest in 'holding' arises only from the need to
> serialize requests to servants. That is, I wish to use
> non-threadsafe, non-reentrant code in servant implementations. Is
> there any way to do this?

There are several ways. One of which is to use the single-threaded
policy, which doesn't appear to work for your use-case due to the
issues you describe below. Another approach is to use a
"servant-specific serialization mechanism," e.g., have your servants
use the Scoped Locking idiom and Thread-Safe Interface pattern to
acquire a lock singleton before doing any work. Check out

http://www.cs.wustl.edu/~schmidt/patterns/patterns.html

for copies of these idioms/patterns.

> A poa using the single-thread policy seems ideal, except that these
> servants may also make remote calls, which (in TAO) immediately
> enables request processing, even in the single-threaded poa. If a
> request happens to be waiting for an object in the single-threaded
> poa, deadlock ensues immediately.
>
> In other words, I can't figure out how to do something apparently
> simple - serialize remote calls.

Having a queue in the POA doesn't necessarily guarantee this either
since POAs can now have thread pools associated with this (as per the
RT-CORBA spec). Thus, requests queued in a POA can be dispatched by
multiple threads in the POA's thread pool.

Therefore, applying the Scoped Locking idiom and Thread-Safe Interface
pattern is the only portable solution.

Take care,

Doug

----------------------------------------
Dr. Douglas C. Schmidt
Associate Professor, UC Irvine TEL: (949) 824-1901


Dept of Electrical & Computer Engineering FAX: (949) 824-2321
616E Engineering Tower WEB: www.ece.uci.edu/~schmidt/

Irvine, CA 92697-2625 NET: sch...@uci.edu

0 new messages