[Nautilus-list] Re: Refs & Leases ...



On Mon, May 28, 2001 at 05:13:49PM -0400, Michael Meeks wrote:
> 
> Hi Ian,
> 
> On Mon, 21 May 2001, Ian McKellar wrote:
> > people have talked about refcounting based on refs that expire after a
> > short period of time. I think they were called leases. 
>  
>         As far as I am aware, the prospect of leases is not attractive for
> desktop component software for several reasons:
> 
>         * Total interface re-design 

Well, you would need a CORBA interface redesign, but the library APIs need not
change and given that there only two or three independant bonobo library
implementations this shouldn't be a problem.
> 
>         * Horribly inapplicable to in proc case => need 2 lifecycle
>         management systems.

Okay, so then you need only use it for the out-of-proc case - given that it
solves a problem that doesn't exist for in-proc. We have a library to hide
this stuff from the applicaiton developer.
> 
>         * Inefficient for lightweight components wrt. memory use    

Eh? I think having a small extra amount of overhead is much better than 
leaking refs and leaving whole processes behind ;-)
> 
>         * Sometimes erroneously destroys valuable components & thus data.

They do? How? The only time this can happen is when components are distributed
across a WAN and the lease-time isn't set correctly. RMI uses leases and they
have an interface for setting the lease-time.
> 
>         Leases are good for some things, but simple as they sound, I don't
> think they solve our problems, still I havn't contemplated leases much so
> I'd appreciate input from anyone on:
> 
> > It should be fairly simple for libbonobo to emulate a ref-unref
> > interface but be safer.
> 
>         How ?

Well, a client calling ref can add a local gtk_timeout to renew the leases
and on the server side, incoming ref calls can add a gtk_timeout which calls
the real object unref. When unref is called by a client, the timeout associated
with the ref on that object is removed, on the server side an incoming unref
call removes the timeout and calls the real unref. I've never played with
leases but thats how I can imagine them working.

Ian




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