incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goodall <matt.good...@gmail.com>
Subject Re: Update API
Date Sun, 08 Nov 2009 20:17:25 GMT
2009/11/8 Christopher O'Connell <jwriteclub@gmail.com>:
> Just as a quick aside on the changes API, as a couple of people helped me
> figure out last night in the IRC channel, do be careful about grabbing the
> canges API if its very large, as some JSON processing libraries take obscene
> amounts of space to decode a JSON object that large.
>
> I don't think it's on the wiki, but limit=n works for _changes

True for trunk but, sadly, not for the 0.10.x series.  A workaround is
to use the continuous feed - each change arrives on its own line as a
JSON object so memory use can stay nice and low.

I do wonder about the implementation of limit a little, the default
seems a little arbitrary ;-).

    Limit = list_to_integer(couch_httpd:qs_value(Req, "limit",
"1000000000000000")),

Surely the limit should either default to infinite or something that
the client might sensibly handle, say 1000?

Note: there's also a new descending=(true|false) _changes arg in trunk
too ... although I can't think of a usecase for it.

- Matt

>
> ~ Christopher
>
> On Sun, Nov 8, 2009 at 12:08 PM, Matt Goodall <matt.goodall@gmail.com>wrote:
>
>> 2009/11/8 Andrew Melo <andrew.melo@gmail.com>:
>> > Oh, I'm sorry, I think I misspoke. I was looking for the API that will
>> > notify me when a new document is added to the database.
>>
>> I think this is what you're looking for:
>>
>> http://wiki.apache.org/couchdb/HTTP_database_API#Changes
>>
>> - Matt
>>
>> >
>> > thanks,
>> > Andrew
>> >
>> > On Sun, Nov 8, 2009 at 12:59 PM, Dave Ray <daveray@gmail.com> wrote:
>> >> There's also a page on the Wiki here:
>> >>
>> >>
>> http://wiki.apache.org/couchdb/How_to_intercept_document_updates_and_perform_additional_server-side_processing
>> >>
>> >> but I would trust the test suite more :)
>> >>
>> >> Dave
>> >>
>> >> On Sun, Nov 8, 2009 at 1:24 PM, Andrew Melo <andrew.melo@gmail.com>
>> wrote:
>> >>> On Sun, Nov 8, 2009 at 12:18 PM, Paul Davis <
>> paul.joseph.davis@gmail.com> wrote:
>> >>>> Andrew,
>> >>>>
>> >>>> Don't forget the Futon test suite. There's an update_documents.js
test
>> >>>> that is probably the most authoritative source of info on that.
To my
>> >>>> knowledge no one has started a wiki page.
>> >>>>
>> >>>> Paul
>> >>>
>> >>> Paul,
>> >>>
>> >>> Thanks for the pointer. I'll try and grok those files.
>> >>>
>> >>> Best regards,
>> >>> Andrew
>> >>>
>> >>>
>> >>>>
>> >>>> On Sun, Nov 8, 2009 at 12:57 PM, Andrew Melo <andrew.melo@gmail.com>
>> wrote:
>> >>>>> Forgive me everyone, but my google-fu is having trouble finding
the
>> >>>>> documentation for the updates API for the newer version of Couch.
Can
>> >>>>> someone point me in the right direction?
>> >>>>>
>> >>>>> Thanks,
>> >>>>> Melo
>> >>>>> --
>> >>>>>
>> >>>>> --
>> >>>>> Andrew Melo
>> >>>>> Andrew.Melo@gmail.com
>> >>>>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>>
>> >>> --
>> >>> Andrew Melo
>> >>> Andrew.Melo@gmail.com
>> >>>
>> >>
>> >
>> >
>> >
>> > --
>> >
>> > --
>> > Andrew Melo
>> > Andrew.Melo@gmail.com
>> >
>>
>

Mime
View raw message