> On 16 Mar 2015, at 13:57, Ingo Radatz <thewh...@googlemail.com> wrote:
> 
> Thank you for the quick answer.
> 
>> I think new streaming interfaces are the way to go. We’ve been talking about 
>> them in other contexts like replication before. We won’t likely get to this 
>> before 2.0, though.
> 
> Is that included in the developer preview?

*won’t* :)

> 
>> Or write the doc validation in Erlang.
> 
> I wish i could do that but my skills stuck at the Erlang 101. I have seen an 
> Erlang implementation that supports json-schema Draft 3 - i will analyse 
> whether our schemas using Draft 4 related definitions or not.
> 
> 
> An other question came into my mind. Is the JS code of a design doc (here the 
> validate_doc_update.js) already evaluated (maybe after the doc save action) 
> or gets it evaluated for every single doc again? When it is the second i 
> would see some smaller optimisation potentials in my current implementation 
> (e.g. bigger docs are more performant to validate then the same amount split 
> into smaller pieces)

The validation function code is already evaluated. The expensive bit is 
serialising the docs from Erlang to JSON and back while talking to the query 
server. Just like with views.

Best
Jan
--

--
Professional Support for Apache CouchDB:
http://www.neighbourhood.ie/couchdb-support/

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to