Re: Registries

"Marty Poulin" <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <06fe01c34ca9$96d87ce0$7d00a8c0__3666.34686147354$1059273109@playnet.com>
Hi guys,

You asked what a fragile base class was.  The following links should clear
it up.

http://2f.ru/holy-wars/fbc.html
http://www.cas.mcmaster.ca/~emil/publications/fragile/

One solution we looked at, but for now have rejected is SOM.

http://www.mactech.com/articles/mactech/Vol.11/11.01/LearningtoLoveSOM/

In our case although we need a component based object architecture that can
be utilized across a network, we can not stand the extra overhead of COM or
SOM/CORBA. Perhaps it is a bit arrogant to think that we can do better, but
for our application we believe we can. It would be nice if it handled the
fragile base class problem as SOM does, but we can't have everything. For
now we just put up with macros for dummy method's and bloated vtables.

Marty Poulin
Lead Programmer
Playnet Inc.

----- Original Message ----- 
From: "David Abrahams" <[email protected]>
To: <[email protected]>
Cc: "Rene Rivera" <[email protected]>
Sent: Thursday, July 17, 2003 8:19 AM
Subject: Re: [Boost-langbinding] Registries


> Daniel Wallin <[email protected]> writes:
>
> > At 23:13 2003-07-16, David Abrahams wrote:
> >>Daniel Wallin <[email protected]> writes:
> >>
> >> > One thing; the converter-registries aren't really bound to modules
> >> > though are they?
> >>
> >>That's the intention.
> >>
> >> > They are really just bound to the shared library.
> >>
> >>That's not the intention.  Converter registrations would occur within
> >>the context of some current module scope, which would stick them into
> >>a particular...
> >>
> >> > So if you have multiple modules in the same shared library you would
> >> > automatically share registries as well.
> >>
> >>Agh, I think there may be a serious problem for registry scoping
> >>here.  At least on most Unices, all extension modules linked to the
> >>same langbinding .so are prone to share a single copy of
> >>registration<T> for any T.
> >
> > I don't get this. Wouldn't registration<T> reside in the modules shared
> > library, and thus not be shared? I might be stupid here though, shared
> > libraries isn't exactly my area of expertise. ;)
>
> Here's the issue: on some OSes, any two shared libraries linked to a
> common shared library may share all link symbols, regardless of how
> they were originally opened:
>
>              -- (dlopen) --> extension 1
>             /                           \ (ordinary shared link)
> Python/Lua-<                             >--> langbinding.so
>             \                           /
>              -- (dlopen) --> extension 2
>
> I believe this creates a common link symbol space for the extensions
> and the langbinding.so.
>
> You have to be careful what you count on here, whether or not symbols
> are shared may depend on the optimization level of each extension,
> for example.
>
> Of course it's possible to arrange for a dlopen relationship between
> the extensions and langbinding.so, but it's extremely cumbersome.
> Furthermore, there may be other important reasons for extension1 and
> extension2 to have some direct linking relationships; e.g. if
> extension1 uses a base class with virtual functions which is
> derived from in extension2.
>
> I am beginning to think that we should go with a simple model.  Either:
>
>    1. An extension is linked to a shared langbinding library and
>       shares a registry with all other extensions that are linked to
>       the same library.
>
> or
>
>    2. It is linked to a static langbinding library and achieves total
>       isolation.
>
> I think that most OSes have a mechanism where you can specify exactly
> which symbols are shared, but for C++ at least, on OSes other than
> windows, it's usually much too cumbersome to be worthwhile and
> requires knowledge of name mangling.  If I'm wrong about that I hope
> someone will correct me (Rene?).
>
> -- 
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> Boost-langbinding mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/boost-langbinding
>



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.