Re: perform_work, pending_work, can't work when blocking



lance seacoms com <lance seacoms com> wrote:
> 
> I see someone has at least thought about this by the tantilizing but
> unimplemented pending_work and perform_work methods in
> orbitcpp_orb.hh.
> 
> Does anyone else have the need for this?  Is anyone working on it?
> I've  hacked a version that sets an alarm in src/IIOP/connection.c
> before select is called, then perform my work in the signal handler.
> This is inferior to a real implementation.  If anyone is working on a
> real implementation, please let me know so I can help and use it.  If
> no one is working on this, also let me know and perhaps I will then
> write the real implementation.

I have need for this, to implement a sort of timeout on various objects, for
protection from clients that misbehave. Luckily I don't need it right now,
but I will soon.

If all you're trying to do is avoid blocking (synchronous) operations, then
you can use DII or a multithreaded ORB for the server.

If you want a timeout event, then the best way is probably for the ORB to use
the glib event loop instead of calling select() directly.

There have been murmurs about the next version of ORBit using the glib event
loop, which would make it possible to register your own timeout events. I
don't know if that's still part of the plan. Multithreading support was also
mentioned a few times, but again, I don't know if that's still part of the
plan either. Would any ORBit developers (Elliot?) like to comment?

You can find a multithreaded ORB (ORBit-mt) at:

http://goethe.ira.uka.de/~wilhelmi/corba/orbit-mt.html

I'm fairly sure that ORBit-mt uses the glib event loop, meaning you should
be able to register your own timeout events instead of using a signal
handler.
-- 
Sam Couter          |   Internet Engineer   |   http://www.topic.com.au/
sam topic com au    |   tSA Consulting      |
OpenPGP key available on key servers
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C

Attachment: pgpW9BBD4XvZx.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]