Re: ORBit status?



Owen Taylor wrote:
> 
> The way this would fit in with shared library activation is a "in
> memory" transport. The language X binding writes the information
> to a buffer, the buffer is passed to the C implementation of the
> object that lives in the shared library, and the C implementation
> unmarshals from the buffer. Clearly there is some extra overhead
> here, but the benefit is flexibility.
> 

The other benefit of using an "in memory" transport like the one you've
suggested is that it allows you to syncronise method invocations from
different threads to the same object. COM does this when you invoke
operations on objects which live in different thread 'apartments', which
it pushes through a message queue to guarantee that only one method call
is being invoked on the object at any one time.

Note that the penalty here is of course efficiency, so the ability to
choose between this technique and invoking the methods directly is
paramount, which is where the original call for a 'binary interface
standard' came from.
N.B. COM decides which approach to use by having the user specify which
objects 'live' in which thread apartments - two objects in the same
apartment invoke each other's operations directly, two objects in
different ones have their invocations 'marshalled' across the threads
via the message queue.

May I humbly suggest that if we do define a binary interface standard,
we use the C++ vtable layout as the basis (I think that most of the C++
compilers use the same layout). This will mean we don't have to add any
layers to in-process compiled C++ objects, which will keep the C++ speed
freaks happy. 
Of course, C programmers hand code their object Vtables anyway so that
shouldn't be a problem. Does anybody know how this would affect any
ObjectiveC bindings? Elliot?

Cheers,

Phil.

-- 
_______________________________________________________________________
 Phil Dawes                               |   My opinions are my own
 WWW:    err.. temporarily non-existant   |   and nothing to do with
 Email:  philipd@parallax.co.uk           |      my employer.



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