[webkit-dev] webkit core need to be cleanly separated from "ports", behind a vector table

lkcl lkcl at lkcl.net
Sat Oct 25 13:28:02 PDT 2008




Paul Pedriana-3 wrote:
> 
> While a COM or similar interface may result in a library which makes
> porting easiest for new platforms, it sometimes can be harder to
> develop and maintain. We've been there and I can say that in some cases
> 

an earlier reply mentioned also that the idea i suggested is "COM-like",
and, thus, if that is _believed_, then yes, absolutely, it will be found to
be a complete nightmare.

background: COM is an object-orientated layer that allows you to define
objects.  the COM part of Common Object Model is incredibly similar to what
GLib / GObjects have become (right down to the horrible c macros, the object
refcounting, the interfaces, the object inheritance, everything).  COM is a
stripped-down version of DCOM (distributed COM) where the much-hated windows
95 team got a hold of the much-better-trained windows nt team's code, and
ripped it to shreds.

what the windows 95 team took out was the D - DCE/RPC.  DCE/RPC is a
"functional-programming" style RPC system (and is a perfect candidate for
building object-orientated technology, such as DCOM, on top of it).  it is
_this_ technology that is *purely* c-based and is RPC middleware, and it's
unbelievably brilliant beyond belief.

in DCE/RPC, there is support for "interface versioning", where each
interface can have a single 16-bit number - a "version" - associated with
it.  servers are expected to support all versions of interfaces, and thus
you can upgrade the servers first, and the clients last.

so, to cut a long story short, when the earlier poster said "yes, you're
suggesting that we implement a cut-down version of COM" - no, not exactly,
but close.

all you do is shove a 16-bit number at the beginning of the struct, that
says "version 1".

that's all.

_definitely_ not "drag in all the object inheritance, ref-counting".

_god_ no.

:)
-- 
View this message in context: http://www.nabble.com/webkit-core-need-to-be-cleanly-separated-from-%22ports%22%2C-behind-a-vector-table-tp19982522p20167648.html
Sent from the Webkit mailing list archive at Nabble.com.



More information about the webkit-dev mailing list