Re: Problems with the Stream interface



On Fri, Aug 11, 2000 at 05:28:25PM -0700, Maciej Stachowiak wrote:
>
> I have a proposal for how to solve this problem. Essentially, we need
> to make the Stream interface asynchronous by design.
>
There is another possibility which might fix this problem. The "CORBA
Messaging" spec describes a way of making async calls from a client on an
unmodified server, with all the added complexity handled on the client side.

The IDL compiler generates a couple of extra methods in the client stub
code- eg for a synchronous operation
   
   long op(in long x, out long y)

it generates additional methods including
   
   void sendc_op(in ReplyHandler handler, in long x);
   
It also generates skeleton code for the replyhandler interface, which might
have the following appearance in IDL:
   
   interface ReplyHandler{
     void op(in long ami_return_value, in long y);
     void op_excep(in ExceptionHolder e);
   };

To use it you
 o implement a ReplyHandler servant (fill in the callback code)
 o change your client to use the sendc_ method

Then your client should not block any more.

I don't know if ORBit supports this functionality, but it _might_ not be
too hard to write.  (I have no idea how ORBit works, I've been hacking on
omniORB recently which is multithreaded :)

You can find the Messaging spec at:

  http://cgi.omg.org/cgi-bin/doc?orbos/98-5-5

Cheers,

Dave

-- 
They'll fight... and they'll win!
  -- Do you want to know more?      http://www.advogato.org/person/djs/




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