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 83719FF8C for ; Mon, 25 Mar 2013 19:55:02 +0000 (UTC) Received: (qmail 9903 invoked by uid 500); 25 Mar 2013 19:55:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9875 invoked by uid 500); 25 Mar 2013 19:55:00 -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 9866 invoked by uid 99); 25 Mar 2013 19:55:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 19:55:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.181] (HELO mail-wi0-f181.google.com) (209.85.212.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 19:54:54 +0000 Received: by mail-wi0-f181.google.com with SMTP id hj8so3442743wib.14 for ; Mon, 25 Mar 2013 12:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-originating-ip:in-reply-to:references :from:date:message-id:subject:to:cc:content-type:x-gm-message-state; bh=M7h2YcJHWH7Xn8s35AtkiHyZKbBgW9igSunV5DEW19g=; b=iIFRgLavJTljuHOtUw8VhqnvFkLRf6XrFM4YzE3UJhMRRm5MTgeIgULPq3kiNyi40v tJ2ptEuh9y64/XwFoLgT8xNHjzvlvOVAEQ+aas28x2LNuoOUZ/eZvkDZDOesJxp4wPBd pU1POx5vISxqKz9e/L3iunzEac913d+enEUDmwo3qIhptRVGXEseYHSwkvX04/rpnbcR xSorUgudAYvp9yw+ThqfvJ7dg0Ij1LpfzB7IxrD4gvPlReNmzH0BxiL6PhGVTRwsq5Rl FG39oO2cu5RjdohRJn1DdQq19ggYFGuZUjvGYiHVdPFR7rpK4QkrKmm7ZTbmpHjxEkgR //FA== X-Received: by 10.194.58.202 with SMTP id t10mr20572373wjq.4.1364241274040; Mon, 25 Mar 2013 12:54:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.32.106 with HTTP; Mon, 25 Mar 2013 12:54:13 -0700 (PDT) X-Originating-IP: [68.5.117.177] In-Reply-To: <1650166E173D354E9382181CA2DA9B0C0BE792DFE7@GSCMEUP05EX.firmwide.corp.gs.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> From: Mark Hahn Date: Mon, 25 Mar 2013 12:54:13 -0700 Message-ID: Subject: Re: Google Summer of Code topics To: user Cc: CouchDB Developers Content-Type: multipart/alternative; boundary=047d7b86de88870dd704d8c52c96 X-Gm-Message-State: ALoCoQm5oHwIbks73iDnbKDgSIuKK02yMvRSYlWnIf1S555P32nOs20VVNB0+Y/9vJFE6vIqmDhq X-Virus-Checked: Checked by ClamAV on apache.org --047d7b86de88870dd704d8c52c96 Content-Type: text/plain; charset=ISO-8859-1 > You simply post to '_update/edit/docid' with form content. I don't understand how this works. Doesn't it require already having the doc and therefore requires a read and an update? On Mon, Mar 25, 2013 at 10:47 AM, Pearce, Martyn wrote: > thank you > > -----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 > > I do something similar. Here it is in case anyone wants to look at it > from a slightly different code perspective. > > /* underscore and underscore string are not needed, just my preference > */ > var _ = require('underscore')._, > _s = require('underscore-string'), > globalKeys = ['_id', '_rev', 'template', 'type', 'permissions']; > > exports.edit = function (doc, req) { > > /* add values from request */ > _.each(req.form, function(val, key) { > if (globalKeys.indexOf(key) === -1) { > try { > doc[key].value = JSON.parse(req.form[key]); > } > catch (e) { > if (typeof doc[key] !== 'undefined') { > doc[key].value = req.form[key]; > } > } > } > }); > > return [doc, { > code: 200, > headers: { > 'Content-Type': 'application/json' > }, > body: JSON.stringify('render to template or return success') > }]; > }; > > You simply post to '_update/edit/docid' with form content. > > Jeff Charette | Principal > We Are Charette > web / identity / packaging > > m 415.298.2707 > w wearecharette.com > e jeffrey@wearecharette.com > > On Mar 25, 2013, at 12:46 PM, "Pearce, Martyn" > wrote: > > > thanks > > > > -----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 > > > > Here is the code in a gist .. https://gist.github.com/mark-hahn/5238514 > > > > > > On Mon, Mar 25, 2013 at 9:00 AM, Pearce, Martyn >wrote: > > > >> Posting it here would be a great start. That would imply permission for > >> interested parties to post it on an examples page, I think. > >> > >> Thanks, > >> > >> -----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 > >> > >> 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. > >> > >> > >> On Mon, Mar 25, 2013 at 2:19 AM, Pearce, Martyn >>> wrote: > >> > >>> It would be a great published example/howto if you were willing to > >> publish > >>> your code for that. > >>> > >>> -----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 > >>> > >>>> Implement partial reads and updates of documents, > >>> > >>> 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. > >>> > >>> > >>> On Fri, Mar 22, 2013 at 7:20 AM, Jeff Charette > >> wrote: > >>> > >>>> My top 3 for couchapps: > >>>> > >>>> 1. more robust _rewrites module to do things like, possibly introduce > >>>> regex matching > >>>> > >>>> > >>> > >> > 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 > >>>> > >>>> Sorry if any of this is pathetically naive! > >>>> Jeff Charette | Principal > >>>> We Are Charette > >>>> web / identity / packaging > >>>> > >>>> m 415.298.2707 > >>>> w wearecharette.com > >>>> e jeffrey@wearecharette.com > >>>> > >>>> On Mar 22, 2013, at 7:13 AM, Dave Cottlehuber > >> wrote: > >>>> > >>>>> Hi folks, > >>>>> > >>>>> 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. > >>>>> > >>>>> If you reply, please do so just to the dev@ list -- note I BCC'd > >>>>> users@ for some ideas. > >>>>> > >>>>> 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 > >>>>> > >>>>> 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/ > >>>>> > >>>>> 8/9. Rewire CouchDB's HTTP layer to support websockets and spdy. I > >>>>> think this implies switching to cowboy, this could be too messy. > >>>>> > >>>>> 12. Extend CouchDB's query model (e.g. > >>>>> https://developers.google.com/chart/interactive/docs/querylanguage) > >> to > >>>>> support a richer syntax. > >>>>> > >>>>> 13/14. Implement partial reads and updates of documents, > >>>>> > >>>>> 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. > >>>>> > >>>>> 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). > >>>>> > >>>>> Implement a view development sandbox, where you can easily prototype > >>>>> with a sub-set of documents without long build times. > >>>>> > >>>>> 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 > >>>>> > >>> > http://visualstart.blogspot.co.at/2012/02/mochiweb-erlang-and-gzip.html > >>>>> for some other ideas. > >>>>> > >>>>> Develop a plugin API & rework the authentication layer to allow > >>>>> plugging in ErLDAP, nodejs with EveryAuth or PassportJS or in fact > >>>>> anything you like. > >>>>> > >>>>> Extend geocouch and/or couchdb with some of Volker's ideas (cue > >>>>> Volker). Or stuff like quadtrees, geohashes or hilbert curves. > >>>>> > >>>>> Finally, if you are interested in being a mentor, please speak up! > >>>>> > >>>>> A+ > >>>>> Dave > >>>>> > >>>>> [1]: http://www.google-melange.com/gsoc/homepage/google/gsoc2013 > >>>>> [2]: > >>>> > >>> > >> > https://groups.google.com/forum/?fromgroups=#!topic/google-summer-of-code-discuss/yYM2ru4bTeo > >>>> > >>>> > >>> > >> > > --047d7b86de88870dd704d8c52c96--