incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: View Internal API
Date Sat, 05 Dec 2009 15:14:17 GMT

On 24 Nov 2009, at 06:14, Paul Davis wrote:

> Dev People,
> 
> Its no secret that I've been trying to find a reason to delete all of
> the temp_view logic in the view code. I was just discussing the
> internal view API with Adam Kocoloski on IRC and it hit me that with
> the index-filename-from-md5 patch that Chris Anderson landed a while
> ago could make it all go away.
> 
> The proposed API would be something like:
> 
> couch_view:get_view(DesignDoc) -> #view{}
> 
> Where DesignDoc is the ErlJSON representation of that design doc. Then
> temp_views would just create the ErlJSON representation (without
> saving that doc in the DB) and pass it to the view update mechanics.
> Cleaning up old temp views would then just use the existing cleanup
> mechanism we already have in place.
> 
> AFAICT, this doesn't introduce any sort of oddities that don't already
> exist and provides better semantics for promoting a temp_view to a
> permanent view because the index wouldn't need to be rebuilt.
> 
> Then again I'm a bit tired so I could be off my rocker. Anyone see
> anything obviously wrong?

The only thing I'd advocate is that we make it more apparent in Futon
that view cleanup is needed. Otherwise, I like the idea of removing that
code.

Cheers
Jan
--


Mime
View raw message