incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@gmail.com>
Subject Re: /_all_dbs and security
Date Mon, 01 Mar 2010 08:55:46 GMT
> The reason for no storing _security as a doc is an optimization. So we
> extend that optimization, and have something like a  security_changed event
> for a db, that the _dbs database can react to. The model isn't different
> from subscribing to _changes, it'd just be a separate code path.
>
>  Chris
>

That's a good idea (both simple and more efficient).

The only issues left are the cases where the user adds a new DB file
(possibly coming from other server for e.g.) into the DB dir, deletes a DB
file or replaces a DB file with an old version (a backup whose update seq
number is from the past).

I thought of having a separate process that from time to time looks into FS
contents. But this would likely be too heavy for the case of millions of
DBs.

On the other hand, if absolute consistency is not a must, the detection of a
new DB, could be done the first time a request is processed (like GET
/somedb  GET /somedb/somedoc etc). Opening a DB would trigger an event
"db_opened" which would cause a process to verify if that DB is listed in
_dbs and if the DB's update seq number matches the one in _dbs (useful for
the case where an old db file is restored). Similar approach when opening a
DB fails because the DB file doesn't exist.

Do you think this would add too much overhead or it could be a somewhat
"light" approach? Or better, do you have a better idea for it?

cheers


>
> > cheers
> >
> >
> > --
> > Filipe David Manana,
> > fdmanana@gmail.com
> > PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC569452B
> >
> > "Reasonable men adapt themselves to the world.
> > Unreasonable men adapt the world to themselves.
> > That's why all progress depends on unreasonable men."
>
>


-- 
Filipe David Manana,
fdmanana@gmail.com
PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC569452B

"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message