incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@apache.org>
Subject Re: Auto-adding additional fields on PUT/POST? (datetime stamps)
Date Wed, 03 Dec 2008 22:37:02 GMT
Ha, this thread seems to have split on both user and dev.

On Wed, Dec 3, 2008 at 1:00 AM, Jason Huggins <jason@jrandolph.com> wrote:
> On Tue, Dec 2, 2008 at 8:42 PM, Chris Anderson <jchris@apache.org> wrote:
>> I think I've had a change of heart. Damien argues that people would
>> use validation-writes to generate timestamps. But the timestamps can
>> be wrong/faked (on remote nodes) and there's no way to validate (on
>> replication) that they are correct. So putting stamp-capability into
>> the validation functions would setup false expectations. Apparently it
>> caused all sorts of trouble in Notes.
>
> Would this validate, then, my idea for a 2nd "meta-data db" that only
> the server had POST/PUT/DELETE rights to, but users could GET from?
>

Its ok to have timestamps, it would just set the wrong expectation for
CouchDB to set them inside the validation function. Because there is
no way to validate that a timestamp is correct, especially when
replicating from a remote source, setting them inside the database
logic itself is wrong. However, using something like _external (or to
otherwise reprocess with a batch) to set them or other server
variables would be fine.

It should just be clear that timestamps are the application's
business, not the database's.

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message