Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F5B5FA5C for ; Tue, 26 Mar 2013 14:20:22 +0000 (UTC) Received: (qmail 5541 invoked by uid 500); 26 Mar 2013 14:20:20 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 5445 invoked by uid 500); 26 Mar 2013 14:20:19 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 5431 invoked by uid 99); 26 Mar 2013 14:20:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 14:20:19 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FORGED_YAHOO_RCVD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.216.160] (HELO nm28-vm1.bullet.mail.gq1.yahoo.com) (98.136.216.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 14:20:16 +0000 Received: from [98.137.12.174] by nm28.bullet.mail.gq1.yahoo.com with NNFMP; 26 Mar 2013 14:19:55 -0000 Received: from [208.71.42.202] by tm13.bullet.mail.gq1.yahoo.com with NNFMP; 26 Mar 2013 14:19:55 -0000 Received: from [127.0.0.1] by smtp213.mail.gq1.yahoo.com with NNFMP; 26 Mar 2013 14:19:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1364307595; bh=5BjfCDt91Ixq14B7Vb1Ubzmu65xU2pRHBaAaXVF8MI0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Message-Id:References:To:X-Mailer; b=2ZZavShSc8lxgQL49vrOjfPJWNxSENEtEeHkUD2PqHkGjUDSZ8cm6MjTnhuy4cwcQ/zq784qO+0Ba1SJw21y1E/jZaUDjuxc0OnXMwtZdi3y+Kw11hMx3G4r3zLkskTZlkVoRDRuh0uR4KvPeDvAUwK/r3C/Z3ik9+qZoytFBQU= X-Yahoo-Newman-Id: 6313.70739.bm@smtp213.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XQ8tv4UVM1nFm5V2VP9hybXkj5op0PhhQkLwY6GqyFH1fkr TA6RvB_usCf5kj22eMhhheuXhfrJSL4o9_osArDvpXvsNn0ssCjGZIsZ_kQm dN2SL41RGaWT9nmRIVCYJiPWRaZGXKQcExjfZ87fXWcyDWNad7jj8jqH2V3w jWVqKLIq0zAuf6lnTjAl0d4TWXZL__6M_73iPME0Nl_yrb7JWkDLPaxwXmkk Y3YdPzdBwpwMOwpgJKGL7VhozTNbjJQOGwgYGDGNYHO3uPp3pXAR.R3ZydqB r2jcSQ_LgrnNJkqoANRA4pD2gcN1qTJ75lRw0Yr_jZjIOTiL5eL4HdyRpBQ. hKTPzpGXJBN.g7.kJIiW5jHWKO6oSPa_fjT3CRJDtKuQ1yRwLirCz8a1W8R4 vhJK41KJgDalnucnhQ3gwVnCDWLzNCsFdV47t1XOJiE.lbeknGkjOMKO1fCp XnhZjjCz60lKLzalzF0hQ9onXqtn26tuk2BIUxtIdHiVsQNDK5gSyhH6nIAB I3uPEOCOZxAm.xU9LqWVPoD5J6hnA3SVlVQqLPlVu__IRHpYaEzqhVz7J21r G1.PMeE8klZiS2D4OsZxvKwc4ViE1cjc2UBAImdSOPM5lUwmOoJ0Br4V75hx 5GXmYHWaLwy4E2ABJS.zqEbOqRdf7i4RODhVw7D2jEalv5NkiquRSTrHiBfN 7ACz0Xy7VpURSOFlHQsIhQlpydEOlbdLyWQ04EfMsk8PFul_3j6Yvppx0xYQ PEeN6mOGO6GTCzFbO.99GysqYY1TKiSNZMOqE4aGr5tpTur3Ma2j3RNEUeFK X6Z5j5SWkwyP6fU406gUKdjBsfmbwkATTDfA6OqxsrApvS1ljM19i6_shBP4 DRTzkLpHBSWOggXPHBfNn4EuGz15iAr3Dw._jljHhiFRJnQ8aiEIRreLxpgV _lawzchBLbWW8SNnIgzj3l1D6pOF.bju_fBUruHwRJUmXvh1SlJM6GoR5eMX hyWY56WjMJMyLjO37zgKlvSBxqrTANZqBXgVq_uHzhAsMnYPcwz6QZSxuqw7 m.6ddP7oVGRj_l0EoP6uskuupTqMgJvtJJI68dk00NbO_7aYxbszcbqjTP51 KOCkJa4jZJRF7lg9OFErSJrByebd_OrKjNlRMozosF.evDFVf_E1Sa8TVJue .aUDdId5U9tIjai_4e5WouvwnRtXjywZH0Ohh6MObBQMda.7aBKQQDufeHaz JOYJkThfFHdJijlkoLKhyAKXETWpDl8Y0U7K50tcWbC0j0WdLBdZkl8nbQtE Me5kTLqPC9dC4pUEKkF8BbhmhnlYdj8VgqpfNWw-- X-Yahoo-SMTP: b9FO.o6swBDjz1Oj2MrhmZVB01c- X-Rocket-Received: from [10.1.10.15] (iomatix@71.197.38.211 with plain) by smtp213.mail.gq1.yahoo.com with SMTP; 26 Mar 2013 07:19:54 -0700 PDT Content-Type: multipart/alternative; boundary="Apple-Mail=_A6D69BDF-4C72-4AF3-99E9-95204AD85BCA" Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Google Summer of Code topics From: Jeff Charette In-Reply-To: Date: Tue, 26 Mar 2013 10:19:55 -0400 Cc: CouchDB Developers Message-Id: <807A3166-BC4A-4C0A-9B57-7E4BF28E3BB8@yahoo.com> References: <1650166E173D354E9382181CA2DA9B0C0BE792DF08@GSCMEUP05EX.firmwide.corp.gs.com> <1650166E173D354E9382181CA2DA9B0C0BE792DFC1@GSCMEUP05EX.firmwide.corp.gs.com> <1650166E173D354E9382181CA2DA9B0C0BE792DFD5@GSCMEUP05EX.firmwide.corp.gs.com> <9903085A-564C-4E0B-B2CA-539EB9E1AE80@yahoo.com> <1650166E173D354E9382181CA2DA9B0C0BE792DFE7@GSCMEUP05EX.firmwide.corp.gs.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_A6D69BDF-4C72-4AF3-99E9-95204AD85BCA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Now I'm really confused. Doesn't you approach have the same drawback = for existing docs? You have to have the doc id to update the doc don't = you? For my approach to work, the form has to have the doc id in it yes or = for new docs I create a new doc based off the type, but that's another = exercise. I really like your approach for complex data types I just suspect that = some may only have the need for key value, either way good stuff. Jeff Charette | Principal=20 We Are Charette web / identity / packaging m 415.298.2707 w wearecharette.com e jeffrey@wearecharette.com On Mar 25, 2013, at 3:54 PM, Mark Hahn wrote: >> You simply post to '_update/edit/docid' with form content. >=20 > I don't understand how this works. Doesn't it require already having = the > doc and therefore requires a read and an update? >=20 >=20 > On Mon, Mar 25, 2013 at 10:47 AM, Pearce, Martyn = wrote: >=20 >> thank you >>=20 >> -----Original Message----- >> From: Jeff Charette [mailto:iomatix@yahoo.com] >> Sent: Monday, March 25, 2013 5:44 PM >> To: user@couchdb.apache.org >> Cc: 'CouchDB Developers' >> Subject: Re: Google Summer of Code topics >>=20 >> I do something similar. Here it is in case anyone wants to look at = it >> from a slightly different code perspective. >>=20 >> /* underscore and underscore string are not needed, just my = preference >> */ >> var _ =3D require('underscore')._, >> _s =3D require('underscore-string'), >> globalKeys =3D ['_id', '_rev', 'template', 'type', = 'permissions']; >>=20 >> exports.edit =3D function (doc, req) { >>=20 >> /* add values from request */ >> _.each(req.form, function(val, key) { >> if (globalKeys.indexOf(key) =3D=3D=3D -1) { >> try { >> doc[key].value =3D JSON.parse(req.form[key]); >> } >> catch (e) { >> if (typeof doc[key] !=3D=3D 'undefined') { >> doc[key].value =3D = req.form[key]; >> } >> } >> } >> }); >>=20 >> return [doc, { >> code: 200, >> headers: { >> 'Content-Type': 'application/json' >> }, >> body: JSON.stringify('render to template or return success') >> }]; >> }; >>=20 >> You simply post to '_update/edit/docid' with form content. >>=20 >> Jeff Charette | Principal >> We Are Charette >> web / identity / packaging >>=20 >> m 415.298.2707 >> w wearecharette.com >> e jeffrey@wearecharette.com >>=20 >> On Mar 25, 2013, at 12:46 PM, "Pearce, Martyn" >> wrote: >>=20 >>> thanks >>>=20 >>> -----Original Message----- >>> From: Mark Hahn [mailto:mark@hahnca.com] >>> Sent: Monday, March 25, 2013 4:45 PM >>> To: user >>> Cc: CouchDB Developers >>> Subject: Re: Google Summer of Code topics >>>=20 >>> Here is the code in a gist .. = https://gist.github.com/mark-hahn/5238514 >>>=20 >>>=20 >>> On Mon, Mar 25, 2013 at 9:00 AM, Pearce, Martyn = >> wrote: >>>=20 >>>> Posting it here would be a great start. That would imply = permission for >>>> interested parties to post it on an examples page, I think. >>>>=20 >>>> Thanks, >>>>=20 >>>> -----Original Message----- >>>> From: Mark Hahn [mailto:mark@hahnca.com] >>>> Sent: Monday, March 25, 2013 3:59 PM >>>> To: user >>>> Cc: CouchDB Developers >>>> Subject: Re: Google Summer of Code topics >>>>=20 >>>> How would you suggest I publish it? I don't have a blog. I guess = I >> could >>>> post it here for now. It's not very big. >>>>=20 >>>>=20 >>>> On Mon, Mar 25, 2013 at 2:19 AM, Pearce, Martyn = >>>> wrote: >>>>=20 >>>>> It would be a great published example/howto if you were willing to >>>> publish >>>>> your code for that. >>>>>=20 >>>>> -----Original Message----- >>>>> From: Mark Hahn [mailto:mark@hahnca.com] >>>>> Sent: Friday, March 22, 2013 6:14 PM >>>>> To: user >>>>> Cc: CouchDB Developers >>>>> Subject: Re: Google Summer of Code topics >>>>>=20 >>>>>> Implement partial reads and updates of documents, >>>>>=20 >>>>> In case anyone didn't know, you can do partial updates right now = with >> an >>>>> update handler. I have been using one for some time that allows = the >> app >>>> to >>>>> modify any part of a doc with a single http request. It even = allows >> one >>>> to >>>>> modify an attribute nested inside objects. I've ended up using = only >> this >>>>> for all updates. >>>>>=20 >>>>>=20 >>>>> On Fri, Mar 22, 2013 at 7:20 AM, Jeff Charette >>>> wrote: >>>>>=20 >>>>>> My top 3 for couchapps: >>>>>>=20 >>>>>> 1. more robust _rewrites module to do things like, possibly = introduce >>>>>> regex matching >>>>>>=20 >>>>>>=20 >>>>>=20 >>>>=20 >> = http://stackoverflow.com/questions/14839422/rewrite-without-file-extension= -in-couchdb >>>>>> 2. doc level security >>>>>> 3. with secure_rewrites true, _attachments handler moved to = design doc >>>>>> level /db/_design/doc/_attachments - like an update handler >>>>>> - database level _users, so /db/_design/doc/_users - = behaves >>>> just >>>>>> like /_users >>>>>>=20 >>>>>> Sorry if any of this is pathetically naive! >>>>>> Jeff Charette | Principal >>>>>> We Are Charette >>>>>> web / identity / packaging >>>>>>=20 >>>>>> m 415.298.2707 >>>>>> w wearecharette.com >>>>>> e jeffrey@wearecharette.com >>>>>>=20 >>>>>> On Mar 22, 2013, at 7:13 AM, Dave Cottlehuber >>>> wrote: >>>>>>=20 >>>>>>> Hi folks, >>>>>>>=20 >>>>>>> GSOC[1][2] registration for ASF closes this weekend, and we'd = like to >>>>>>> get some proposals into it, viz >>>> http://community.apache.org/gsoc.html >>>>>>> from last year. >>>>>>>=20 >>>>>>> If you reply, please do so just to the dev@ list -- note I BCC'd >>>>>>> users@ for some ideas. >>>>>>>=20 >>>>>>> I've got a few suggestions to get the ball rolling, with numbers >>>> where >>>>>>> taken from the future features list: >>>>>>> https://gist.github.com/rnewson/2387973 >>>>>>>=20 >>>>>>> 6. implement a Domain-Specific Language to run within the Erlang = VM, >>>>>>> to support native speed filtering, validation, and indexing in >>>>>>> addition to the current in-built JS and erlang ones. Maybe = something >>>>>>> that includes http://jsonselect.org/ >>>>>>>=20 >>>>>>> 8/9. Rewire CouchDB's HTTP layer to support websockets and spdy. = I >>>>>>> think this implies switching to cowboy, this could be too messy. >>>>>>>=20 >>>>>>> 12. Extend CouchDB's query model (e.g. >>>>>>> = https://developers.google.com/chart/interactive/docs/querylanguage) >>>> to >>>>>>> support a richer syntax. >>>>>>>=20 >>>>>>> 13/14. Implement partial reads and updates of documents, >>>>>>>=20 >>>>>>> Make the javascript view engine faster. Could include v8 = bindings, >>>>>>> different / parallel communication approaches between erlang and >>>>>>> javascript worlds, avoiding reparsing JSON roundtrips, and make = it >>>>>>> faster than the current spidermonkey implementation. >>>>>>>=20 >>>>>>> Implement external storage of attachments and appropriate HTTP = API >>>>>>> hooks incl replication to allow hosting attachments outside the >>>> .couch >>>>>>> files, either on local storage, or in cloud blob storage (S3, = azure >>>>>>> etc). >>>>>>>=20 >>>>>>> Implement a view development sandbox, where you can easily = prototype >>>>>>> with a sub-set of documents without long build times. >>>>>>>=20 >>>>>>> Add an optional HTTP compression layer to CouchDB. It would be = really >>>>>>> cool if you could do the compression during doc update (or view >>>>>>> creation or something) so that it can be served directly next = time. >>>>>>> See https://github.com/lgerbarg/couchdb/tree/gzip-support for a >>>> prior >>>>>>> implementation or https://gist.github.com/archaelus/76455 for a >>>>>>> file-based approach, and >>>>>>>=20 >>>>>=20 >> = http://visualstart.blogspot.co.at/2012/02/mochiweb-erlang-and-gzip.html >>>>>>> for some other ideas. >>>>>>>=20 >>>>>>> Develop a plugin API & rework the authentication layer to allow >>>>>>> plugging in ErLDAP, nodejs with EveryAuth or PassportJS or in = fact >>>>>>> anything you like. >>>>>>>=20 >>>>>>> Extend geocouch and/or couchdb with some of Volker's ideas (cue >>>>>>> Volker). Or stuff like quadtrees, geohashes or hilbert curves. >>>>>>>=20 >>>>>>> Finally, if you are interested in being a mentor, please speak = up! >>>>>>>=20 >>>>>>> A+ >>>>>>> Dave >>>>>>>=20 >>>>>>> [1]: http://www.google-melange.com/gsoc/homepage/google/gsoc2013 >>>>>>> [2]: >>>>>>=20 >>>>>=20 >>>>=20 >> = https://groups.google.com/forum/?fromgroups=3D#!topic/google-summer-of-cod= e-discuss/yYM2ru4bTeo >>>>>>=20 >>>>>>=20 >>>>>=20 >>>>=20 >>=20 >>=20 --Apple-Mail=_A6D69BDF-4C72-4AF3-99E9-95204AD85BCA--