You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Chris Anderson <jc...@apache.org> on 2009/01/04 00:49:55 UTC

Dropping _temp_views

We've discussed dropping temp_views on a number of occasions. They
"don't scale" and tend to cause user confusion.

I'm looking at what it would take to write the patch. The biggest
changes would be in the tests, where they use db.query(). I could
patch the db.query method itself to create a design doc and query it,
so things just keeps working transparently. I can't decide if this is
a hack or the best way to do it. Any opinions? Part of me thinks we'd
have a helper method like that for the tests even if there had never
been temp_views.

Converting the _temp_view editor from Futon to only work on design
docs will not be too hard at all, just replace the Run button with
Save And Run when the user makes changes.

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

Re: Dropping _temp_views

Posted by Chris Anderson <jc...@gmail.com>.
On Sat, Jan 3, 2009 at 4:22 PM, Matt Goodall <ma...@gmail.com> wrote:
> 2009/1/3 Chris Anderson <jc...@apache.org>:
>> We've discussed dropping temp_views on a number of occasions. They
>> "don't scale" and tend to cause user confusion.
>
> I'm really surprised the temp view causes confusion for long. I always
> considered it as basically analagous to a psql prompt - a great place
> to hack around, play and develop a a view/query, but not something
> you'd ever try to use in a real application.

The problem is the cost can be Insanely High on a big cluster.

>
> Also, in my experience, a temp view behaves exactly the same *for
> development purposes* as continually updating a design document would,
> i.e. if you change it the view gets rebuilt and things can crawl, if
> you don't it's fast.
>

Once upon a time, I asked Damien for something like temp views, but
with a limit - eg, "give me the results of running this view on random
documents until it's emitted eleven rows." This would be perfect for
debugging, and maybe even useful for statistical sampling, if we got
it right. Maybe the easiest thing would be for the client to POST a
list of document ids, along with the temp_views. Then it could be
flexibly useful without having extreme failure modes.

 If we keep the feature, it should move in the direction of being more useful.

Chris

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

Re: Dropping _temp_views

Posted by Chris Anderson <jc...@gmail.com>.
Renamed _temp_views to _slow_views in r731144.

On Sat, Jan 3, 2009 at 4:41 PM, Chris Anderson <jc...@gmail.com> wrote:
> On Sat, Jan 3, 2009 at 4:34 PM, Michael McDaniel <co...@autosys.us> wrote:
>>
>>  I also would prefer to keep temp views.  I would rather not have
>>  to save every change whilst playing with different views - just click
>>  Run (conveniently located) and test the latest changes.  When happy,
>>  'Save as' something more permanent.
>>
>
> OK, I think for now we're gonna keep 'em. Damien asks that we rename
> them to _slow_views, so be on the ready for that. Shouldn't make a
> difference if you use Futon.
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>



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

Re: Dropping _temp_views

Posted by Chris Anderson <jc...@gmail.com>.
On Sat, Jan 3, 2009 at 4:34 PM, Michael McDaniel <co...@autosys.us> wrote:
>
>  I also would prefer to keep temp views.  I would rather not have
>  to save every change whilst playing with different views - just click
>  Run (conveniently located) and test the latest changes.  When happy,
>  'Save as' something more permanent.
>

OK, I think for now we're gonna keep 'em. Damien asks that we rename
them to _slow_views, so be on the ready for that. Shouldn't make a
difference if you use Futon.

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

Re: Dropping _temp_views

Posted by Michael McDaniel <co...@autosys.us>.
 I also would prefer to keep temp views.  I would rather not have
 to save every change whilst playing with different views - just click
 Run (conveniently located) and test the latest changes.  When happy,
 'Save as' something more permanent.

~Michael

On Sun, Jan 04, 2009 at 12:22:21AM +0000, Matt Goodall wrote:
> 2009/1/3 Chris Anderson <jc...@apache.org>:
> > We've discussed dropping temp_views on a number of occasions. They
> > "don't scale" and tend to cause user confusion.
> 
> I'm really surprised the temp view causes confusion for long. I always
> considered it as basically analagous to a psql prompt - a great place
> to hack around, play and develop a a view/query, but not something
> you'd ever try to use in a real application.
> 
> Also, in my experience, a temp view behaves exactly the same *for
> development purposes* as continually updating a design document would,
> i.e. if you change it the view gets rebuilt and things can crawl, if
> you don't it's fast.
> 
> So ... before removing temp views are you absolutely sure it's not
> just a matter of improving the documentation? How about removing temp
> views from typical end-user documentation and move it to a
> "tool/library developers" section with suitable warning and guidance.
> That way, tools like Futon could continue to provide the temp view
> tool but client libraries would (hopefully) not bother.
> 
> Another thought along the same lines ... I suspect confusion typically
> arises because Futon makes temp views so easy and they look the same
> as saved views - just select "Custom query" form the drop down and
> you're off. Perhaps that option could be moved out of the drop down to
> somewhere else and relabelled as "develop view" or something similar?
> I have a feeling that would suggest a temp view is not something to
> use normally and would instead guide people in the right direction?
> 
> I hope you don't remove temp view but it you do I would probably end
> up just creating a "temp_view" design document for playing around in
> so it's no great loss. In fact, there have been a few ocassions when
> I've been playing with ideas that it would have been nice to hang onto
> a couple of experimental views so maybe the "temp_view" design
> document would be a good thing to do anyway.
> 
> - Matt

-- 
Michael McDaniel
Portland, Oregon, USA
http://trip.autosys.us
http://autosys.us


Re: Dropping _temp_views

Posted by Matt Goodall <ma...@gmail.com>.
2009/1/3 Chris Anderson <jc...@apache.org>:
> We've discussed dropping temp_views on a number of occasions. They
> "don't scale" and tend to cause user confusion.

I'm really surprised the temp view causes confusion for long. I always
considered it as basically analagous to a psql prompt - a great place
to hack around, play and develop a a view/query, but not something
you'd ever try to use in a real application.

Also, in my experience, a temp view behaves exactly the same *for
development purposes* as continually updating a design document would,
i.e. if you change it the view gets rebuilt and things can crawl, if
you don't it's fast.

So ... before removing temp views are you absolutely sure it's not
just a matter of improving the documentation? How about removing temp
views from typical end-user documentation and move it to a
"tool/library developers" section with suitable warning and guidance.
That way, tools like Futon could continue to provide the temp view
tool but client libraries would (hopefully) not bother.

Another thought along the same lines ... I suspect confusion typically
arises because Futon makes temp views so easy and they look the same
as saved views - just select "Custom query" form the drop down and
you're off. Perhaps that option could be moved out of the drop down to
somewhere else and relabelled as "develop view" or something similar?
I have a feeling that would suggest a temp view is not something to
use normally and would instead guide people in the right direction?

I hope you don't remove temp view but it you do I would probably end
up just creating a "temp_view" design document for playing around in
so it's no great loss. In fact, there have been a few ocassions when
I've been playing with ideas that it would have been nice to hang onto
a couple of experimental views so maybe the "temp_view" design
document would be a good thing to do anyway.

- Matt

Re: Dropping _temp_views

Posted by Jan Lehnardt <ja...@apache.org>.
On 4 Jan 2009, at 00:49, Chris Anderson wrote:

> We've discussed dropping temp_views on a number of occasions. They
> "don't scale" and tend to cause user confusion.

+1

Cheers
Jan
--