RE: ref counting in Bonobo



> I was wondering about the implications of the ref counting routines in the
> Unknown interface.  If I have a remote client that's holding a reference
> to an object in a server, and the client crashes, what happens?
>
> I've heard that Microsoft is trying to implement distributed garbage
> collection in COM+ 2.0.  And I mean full mark-and-sweep type garbage
> collection.  It's hard to imagine making that work.
>
> Do Bonobo client programs explicitly call ref and unref on server objects,
> or is this all handled transparently by Gnome?

There is nothing wrong with refcounting, as long as you can exiplictly kill
an object.

This is a problem with COM. If a client crashes, you cannot relese the
object, because only the one that refcounted the object may release it.
( This is at least what I've been told :)

I don't see why this should be a problem in bonobo.
( Of course I can see why, I mean that it's possible to solve the problem
without so much effort! :)
The refcounts are not bound to a specific client in bonobo, so it should be
possible to write something that pings various clients to see if they are
alive, and if not releases the object they have been bound to.
Or one that allows the sysadmin to release objects.

In the case of containers/containees this would not even require any strange
extra applications, because both container and containee has got callbacks
that the remote application should call when something happens.
If the "client" on the other side has died, CORBA will throw a system
exeption. The "server" catches the exeption, realizes that something is
funny about the "client", it then releases itself ( and thereby decoupling
itself from the "client" ).

The only real problem appears to be the interfaces ( GNOME::Storage /
GNOME::Stream ) that has no callbacks. On the other side, none of those
objects are supposed to stay alieve for a prolonged time, are they?

// Liss



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