couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Morin <>
Subject Re: CouchRest needlessly updates view?
Date Tue, 03 Feb 2009 07:19:20 GMT
At 18:14 -0800 2/2/09, Chris Anderson wrote:
> Design docs should not need to be PUT for each definition
> of the model class.  It should be simple to make a fix for
> getting the design doc to see if it matches the ruby view
> definition.

I don't know if this would make a noticeable difference in
performance for most users (is a GET cheaper than a PUT?).
Philosophically, however, it seems wrong to update a _rev
when no writing has been requested by the client program.

In any case, does anyone have any pointers to offer for
where this fix should go in the code?

The suggested fix might also help in my (quite unusual)
situation.  I'm running untrusted code which may try to do
Bad Things to the database.  If I can simply turn off all
PUT requests (including ones that update views), that will
keep a lot of nastiness from happening.

The way it might play out is that the untrusted code would
try a search, specifying a named view.  If the view code
differs from that in the database, CouchRest would try to
do a PUT.  I'd kill that, and the untrusted code would die.

Is this anything like a reasonable approach?

--            Rich Morin     +1 650-873-7841

Technical editing and writing, programming, and web development

View raw message