Re: GConf and bonobo-config - some ideas



Havoc Pennington wrote:

> Dietmar Maurer <dietmar ximian com> writes:
> > Still not convinced, because I would use a fixed key and a list to
> > store that. Another example?
> >
>
> A conceptual problem with a fixed key and list is that there's a race
> condition adding/removing a value.  i.e. you have to get current list,
> strip out a value or add a value, and set the list back.  For some
> kinds of key you can imagine this being an issue. Say for example a
> key used by gnome-vfs; you can definitely imagine two processes using
> gnome-vfs at once, and therefore having gnome-vfs accessing the same
> key at the same time.

Hi Havoc,

yes, there are race conditions. But unfortunately your approach does not
avoid them. Simply try to implement a function which limits the number of
files in the list to 10.

> There are of course some other inevitable race conditions, but this
> one is more damaging than most.

I agree that is bad, but I would prefer a real solution that solves all
problems, although I don't know how to do it. Any ideas?

> Aside from that, fixed key and list assumes that:
>
>  a) CORBA_any (or other equivalent feature) is a good idea
>
>  b) the list is sufficiently short to efficiently move from
>     the config server in one block anytime it changes (i.e.
>     with a bunch of keys in a directory you can access
>     only one of them instead of getting the whole list)

Anyway, I don't really want to talk about that. Please can you answer the
rest of this mail (why are Schema's useful). Here is the original mail:


> > e.g. the "recently used documents" feature I added to gnome-libs once
> > (now removed due to not being finished) would create a key for each
> > document, giving the keys globally unique names. Then you can't apply
> > the schema at gnome-libs install time, you have to do it at key
> > creation time.
>
> Still not convinced, because I would use a fixed key and a list to
> store that. Another example?

The question is if this is a common usage scenario. So what other
examples exists?

- Dietmar







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