You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Dave Cottlehuber <dc...@jsonified.com> on 2013/03/22 12:13:51 UTC

Google Summer of Code topics

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

Re: Google Summer of Code topics

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 22 March 2013 15:20, Jeff Charette <io...@yahoo.com> 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

Got them.

> 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

Not quite sure what you mean by this.

I'll be OOO for the next few days, but if you can turn this into a
JIRA ticket and get one of the devs to tag it as "gsoc2013"
afterwards, we'll have it in the list for consideration. Thanks for
the ideas!!

A+
Dave

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
I had no idea couchDB supported modules. Thanks for the link.  I've missed
having underscore many times.  I've used Kanso before but it never occurred
to me to use it in this environment.

I'll let you know when I've updated the wiki page.


On Wed, Mar 27, 2013 at 10:08 AM, Jeff Charette <io...@yahoo.com> wrote:

> >> I don't want to highjack this thread
> >
> > Actually I did but I'm not sorry because I think this topic needs more
> > discussion and awareness.
>
> Fair enough
>
> > What threw me was your `require`, `exports`, etc., which can't be in an
> update handler.
>
> CouchDB supports commonjs modules.  Don't know what I would do without
> them!
> More here:  http://caolanmcmahon.com/posts/commonjs_modules_in_couchdb/
>
> > It appeared it ran in node not couch.
>
> Oh the beauty of writing couchapps with kanso.  pure awesomeness!  Also
> works with coffeescript as I see that is your personal flavor preference of
> js.
> http://kan.so/docs/Using_coffeescript_with_kanso
>
> > @jeff, if you give me permission I will add your solution as a form-based
> > partial update that is less complicated.  I will take a shot at turning
> it
> > into the actual js that goes in the handler.
> Sounds good and thank you.
>
> Jeff Charette | Principal
> We Are Charette
> web / identity / packaging
>
> m  415.298.2707
> w  wearecharette.com
> e   jeffrey@wearecharette.com
>
> On Mar 27, 2013, at 1:04 PM, Mark Hahn <ma...@hahnca.com> wrote:
>
> >> I don't want to highjack this thread
> >
> > Actually I did but I'm not sorry because I think this topic needs more
> > discussion and awareness.
> >
> > I apologize for questioning your code over and over.  I now finally
> > understand what you are doing.
> >
> > What threw me was your `require`, `exports`, etc., which can't be in an
> > update handler.  You also never mentioned the word handler.  It appeared
> it
> > ran in node not couch.  Also after two years of writing in nothing but
> > coffeescript I find javascript hard to read.  :-)
> >
> > If anyone cares I added a page to the couchDB wiki with my partial
> updates
> > solution.  It is at http://wiki.apache.org/couchdb/Partial_Updateslinked
> > from the how-to page. It is brand new so let me know what you think.
> >
> > @jeff, if you give me permission I will add your solution as a form-based
> > partial update that is less complicated.  I will take a shot at turning
> it
> > into the actual js that goes in the handler.
> >
> >
> >
> > On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com>
> wrote:
> >
> >> I don't want to highjack this thread, but also don't want people to get
> >> confused.  My code runs on the backend in the updates handler and just
> >> looks for matches coming from the request then fills in those results.
>  Yes
> >> you need the id to update and yes you can update only one field or
> multiple
> >> since it overrides the doc.
> >>
> >> If you want to discuss more send me a direct thread or if other are
> >> interested maybe start a new one.
> >>
> >> Jeff Charette | Principal
> >> We Are Charette
> >> web / identity / packaging
> >>
> >> m  415.298.2707
> >> w  wearecharette.com
> >> e   jeffrey@wearecharette.com
> >>
> >> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
> >>
> >>> The code you provided only runs in the client, not in an update
> handler,
> >>> right?
> >>>
> >>> The concept of a DB supporting partial update is to only send the
> fields
> >>> that need to change to the DB instead of the entire doc. There is a
> real
> >>> efficiency advantage to send a few fields over the wire instead of
> entire
> >>> docs.
> >>>
> >>> There is also an advantage in having different apps (or parts of one
> app)
> >>> only know about some parts of the doc and never having to know the
> entire
> >>> doc.
> >>>
> >>> One example: I have three different node apps that modify a single
> >> progress
> >>> doc in a single dB based on their work. They are only passed the doc ID
> >> and
> >>> their job assignment when they start and then they mark their progress
> in
> >>> the doc as they go.
> >>>
> >>>
> >>>
> >>> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
> >> wrote:
> >>>
> >>>> 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
> >>>> 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 <ma...@hahnca.com> wrote:
> >>>>
> >>>>>> 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 <
> Martyn.Pearce@gs.com
> >>>>> 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" <
> Martyn.Pearce@gs.com>
> >>>>>> 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 <
> >> Martyn.Pearce@gs.com
> >>>>>>> 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 <
> >> Martyn.Pearce@gs.com
> >>>>>>>>> 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 <
> iomatix@yahoo.com>
> >>>>>>>> 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 <
> dch@jsonified.com>
> >>>>>>>> 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
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
I had no idea couchDB supported modules. Thanks for the link.  I've missed
having underscore many times.  I've used Kanso before but it never occurred
to me to use it in this environment.

I'll let you know when I've updated the wiki page.


On Wed, Mar 27, 2013 at 10:08 AM, Jeff Charette <io...@yahoo.com> wrote:

> >> I don't want to highjack this thread
> >
> > Actually I did but I'm not sorry because I think this topic needs more
> > discussion and awareness.
>
> Fair enough
>
> > What threw me was your `require`, `exports`, etc., which can't be in an
> update handler.
>
> CouchDB supports commonjs modules.  Don't know what I would do without
> them!
> More here:  http://caolanmcmahon.com/posts/commonjs_modules_in_couchdb/
>
> > It appeared it ran in node not couch.
>
> Oh the beauty of writing couchapps with kanso.  pure awesomeness!  Also
> works with coffeescript as I see that is your personal flavor preference of
> js.
> http://kan.so/docs/Using_coffeescript_with_kanso
>
> > @jeff, if you give me permission I will add your solution as a form-based
> > partial update that is less complicated.  I will take a shot at turning
> it
> > into the actual js that goes in the handler.
> Sounds good and thank you.
>
> Jeff Charette | Principal
> We Are Charette
> web / identity / packaging
>
> m  415.298.2707
> w  wearecharette.com
> e   jeffrey@wearecharette.com
>
> On Mar 27, 2013, at 1:04 PM, Mark Hahn <ma...@hahnca.com> wrote:
>
> >> I don't want to highjack this thread
> >
> > Actually I did but I'm not sorry because I think this topic needs more
> > discussion and awareness.
> >
> > I apologize for questioning your code over and over.  I now finally
> > understand what you are doing.
> >
> > What threw me was your `require`, `exports`, etc., which can't be in an
> > update handler.  You also never mentioned the word handler.  It appeared
> it
> > ran in node not couch.  Also after two years of writing in nothing but
> > coffeescript I find javascript hard to read.  :-)
> >
> > If anyone cares I added a page to the couchDB wiki with my partial
> updates
> > solution.  It is at http://wiki.apache.org/couchdb/Partial_Updateslinked
> > from the how-to page. It is brand new so let me know what you think.
> >
> > @jeff, if you give me permission I will add your solution as a form-based
> > partial update that is less complicated.  I will take a shot at turning
> it
> > into the actual js that goes in the handler.
> >
> >
> >
> > On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com>
> wrote:
> >
> >> I don't want to highjack this thread, but also don't want people to get
> >> confused.  My code runs on the backend in the updates handler and just
> >> looks for matches coming from the request then fills in those results.
>  Yes
> >> you need the id to update and yes you can update only one field or
> multiple
> >> since it overrides the doc.
> >>
> >> If you want to discuss more send me a direct thread or if other are
> >> interested maybe start a new one.
> >>
> >> Jeff Charette | Principal
> >> We Are Charette
> >> web / identity / packaging
> >>
> >> m  415.298.2707
> >> w  wearecharette.com
> >> e   jeffrey@wearecharette.com
> >>
> >> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
> >>
> >>> The code you provided only runs in the client, not in an update
> handler,
> >>> right?
> >>>
> >>> The concept of a DB supporting partial update is to only send the
> fields
> >>> that need to change to the DB instead of the entire doc. There is a
> real
> >>> efficiency advantage to send a few fields over the wire instead of
> entire
> >>> docs.
> >>>
> >>> There is also an advantage in having different apps (or parts of one
> app)
> >>> only know about some parts of the doc and never having to know the
> entire
> >>> doc.
> >>>
> >>> One example: I have three different node apps that modify a single
> >> progress
> >>> doc in a single dB based on their work. They are only passed the doc ID
> >> and
> >>> their job assignment when they start and then they mark their progress
> in
> >>> the doc as they go.
> >>>
> >>>
> >>>
> >>> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
> >> wrote:
> >>>
> >>>> 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
> >>>> 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 <ma...@hahnca.com> wrote:
> >>>>
> >>>>>> 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 <
> Martyn.Pearce@gs.com
> >>>>> 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" <
> Martyn.Pearce@gs.com>
> >>>>>> 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 <
> >> Martyn.Pearce@gs.com
> >>>>>>> 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 <
> >> Martyn.Pearce@gs.com
> >>>>>>>>> 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 <
> iomatix@yahoo.com>
> >>>>>>>> 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 <
> dch@jsonified.com>
> >>>>>>>> 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
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
>> I don't want to highjack this thread
> 
> Actually I did but I'm not sorry because I think this topic needs more
> discussion and awareness.

Fair enough

> What threw me was your `require`, `exports`, etc., which can't be in an update handler.  

CouchDB supports commonjs modules.  Don't know what I would do without them!
More here:  http://caolanmcmahon.com/posts/commonjs_modules_in_couchdb/

> It appeared it ran in node not couch.

Oh the beauty of writing couchapps with kanso.  pure awesomeness!  Also works with coffeescript as I see that is your personal flavor preference of js.
http://kan.so/docs/Using_coffeescript_with_kanso

> @jeff, if you give me permission I will add your solution as a form-based
> partial update that is less complicated.  I will take a shot at turning it
> into the actual js that goes in the handler.
Sounds good and thank you.

Jeff Charette | Principal 
We Are Charette
web / identity / packaging

m  415.298.2707
w  wearecharette.com
e   jeffrey@wearecharette.com

On Mar 27, 2013, at 1:04 PM, Mark Hahn <ma...@hahnca.com> wrote:

>> I don't want to highjack this thread
> 
> Actually I did but I'm not sorry because I think this topic needs more
> discussion and awareness.
> 
> I apologize for questioning your code over and over.  I now finally
> understand what you are doing.
> 
> What threw me was your `require`, `exports`, etc., which can't be in an
> update handler.  You also never mentioned the word handler.  It appeared it
> ran in node not couch.  Also after two years of writing in nothing but
> coffeescript I find javascript hard to read.  :-)
> 
> If anyone cares I added a page to the couchDB wiki with my partial updates
> solution.  It is at http://wiki.apache.org/couchdb/Partial_Updates linked
> from the how-to page. It is brand new so let me know what you think.
> 
> @jeff, if you give me permission I will add your solution as a form-based
> partial update that is less complicated.  I will take a shot at turning it
> into the actual js that goes in the handler.
> 
> 
> 
> On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com> wrote:
> 
>> I don't want to highjack this thread, but also don't want people to get
>> confused.  My code runs on the backend in the updates handler and just
>> looks for matches coming from the request then fills in those results.  Yes
>> you need the id to update and yes you can update only one field or multiple
>> since it overrides the doc.
>> 
>> If you want to discuss more send me a direct thread or if other are
>> interested maybe start a new one.
>> 
>> Jeff Charette | Principal
>> We Are Charette
>> web / identity / packaging
>> 
>> m  415.298.2707
>> w  wearecharette.com
>> e   jeffrey@wearecharette.com
>> 
>> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
>> 
>>> The code you provided only runs in the client, not in an update handler,
>>> right?
>>> 
>>> The concept of a DB supporting partial update is to only send the fields
>>> that need to change to the DB instead of the entire doc. There is a real
>>> efficiency advantage to send a few fields over the wire instead of entire
>>> docs.
>>> 
>>> There is also an advantage in having different apps (or parts of one app)
>>> only know about some parts of the doc and never having to know the entire
>>> doc.
>>> 
>>> One example: I have three different node apps that modify a single
>> progress
>>> doc in a single dB based on their work. They are only passed the doc ID
>> and
>>> their job assignment when they start and then they mark their progress in
>>> the doc as they go.
>>> 
>>> 
>>> 
>>> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
>> wrote:
>>> 
>>>> 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
>>>> 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 <ma...@hahnca.com> wrote:
>>>> 
>>>>>> 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 <Martyn.Pearce@gs.com
>>>>> 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" <Ma...@gs.com>
>>>>>> 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 <
>> Martyn.Pearce@gs.com
>>>>>>> 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 <
>> Martyn.Pearce@gs.com
>>>>>>>>> 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 <io...@yahoo.com>
>>>>>>>> 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 <dc...@jsonified.com>
>>>>>>>> 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
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
>> I don't want to highjack this thread
> 
> Actually I did but I'm not sorry because I think this topic needs more
> discussion and awareness.

Fair enough

> What threw me was your `require`, `exports`, etc., which can't be in an update handler.  

CouchDB supports commonjs modules.  Don't know what I would do without them!
More here:  http://caolanmcmahon.com/posts/commonjs_modules_in_couchdb/

> It appeared it ran in node not couch.

Oh the beauty of writing couchapps with kanso.  pure awesomeness!  Also works with coffeescript as I see that is your personal flavor preference of js.
http://kan.so/docs/Using_coffeescript_with_kanso

> @jeff, if you give me permission I will add your solution as a form-based
> partial update that is less complicated.  I will take a shot at turning it
> into the actual js that goes in the handler.
Sounds good and thank you.

Jeff Charette | Principal 
We Are Charette
web / identity / packaging

m  415.298.2707
w  wearecharette.com
e   jeffrey@wearecharette.com

On Mar 27, 2013, at 1:04 PM, Mark Hahn <ma...@hahnca.com> wrote:

>> I don't want to highjack this thread
> 
> Actually I did but I'm not sorry because I think this topic needs more
> discussion and awareness.
> 
> I apologize for questioning your code over and over.  I now finally
> understand what you are doing.
> 
> What threw me was your `require`, `exports`, etc., which can't be in an
> update handler.  You also never mentioned the word handler.  It appeared it
> ran in node not couch.  Also after two years of writing in nothing but
> coffeescript I find javascript hard to read.  :-)
> 
> If anyone cares I added a page to the couchDB wiki with my partial updates
> solution.  It is at http://wiki.apache.org/couchdb/Partial_Updates linked
> from the how-to page. It is brand new so let me know what you think.
> 
> @jeff, if you give me permission I will add your solution as a form-based
> partial update that is less complicated.  I will take a shot at turning it
> into the actual js that goes in the handler.
> 
> 
> 
> On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com> wrote:
> 
>> I don't want to highjack this thread, but also don't want people to get
>> confused.  My code runs on the backend in the updates handler and just
>> looks for matches coming from the request then fills in those results.  Yes
>> you need the id to update and yes you can update only one field or multiple
>> since it overrides the doc.
>> 
>> If you want to discuss more send me a direct thread or if other are
>> interested maybe start a new one.
>> 
>> Jeff Charette | Principal
>> We Are Charette
>> web / identity / packaging
>> 
>> m  415.298.2707
>> w  wearecharette.com
>> e   jeffrey@wearecharette.com
>> 
>> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
>> 
>>> The code you provided only runs in the client, not in an update handler,
>>> right?
>>> 
>>> The concept of a DB supporting partial update is to only send the fields
>>> that need to change to the DB instead of the entire doc. There is a real
>>> efficiency advantage to send a few fields over the wire instead of entire
>>> docs.
>>> 
>>> There is also an advantage in having different apps (or parts of one app)
>>> only know about some parts of the doc and never having to know the entire
>>> doc.
>>> 
>>> One example: I have three different node apps that modify a single
>> progress
>>> doc in a single dB based on their work. They are only passed the doc ID
>> and
>>> their job assignment when they start and then they mark their progress in
>>> the doc as they go.
>>> 
>>> 
>>> 
>>> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
>> wrote:
>>> 
>>>> 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
>>>> 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 <ma...@hahnca.com> wrote:
>>>> 
>>>>>> 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 <Martyn.Pearce@gs.com
>>>>> 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" <Ma...@gs.com>
>>>>>> 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 <
>> Martyn.Pearce@gs.com
>>>>>>> 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 <
>> Martyn.Pearce@gs.com
>>>>>>>>> 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 <io...@yahoo.com>
>>>>>>>> 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 <dc...@jsonified.com>
>>>>>>>> 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
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> I don't want to highjack this thread

Actually I did but I'm not sorry because I think this topic needs more
discussion and awareness.

I apologize for questioning your code over and over.  I now finally
understand what you are doing.

What threw me was your `require`, `exports`, etc., which can't be in an
update handler.  You also never mentioned the word handler.  It appeared it
ran in node not couch.  Also after two years of writing in nothing but
coffeescript I find javascript hard to read.  :-)

If anyone cares I added a page to the couchDB wiki with my partial updates
solution.  It is at http://wiki.apache.org/couchdb/Partial_Updates linked
from the how-to page. It is brand new so let me know what you think.

@jeff, if you give me permission I will add your solution as a form-based
partial update that is less complicated.  I will take a shot at turning it
into the actual js that goes in the handler.



On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com> wrote:

> I don't want to highjack this thread, but also don't want people to get
> confused.  My code runs on the backend in the updates handler and just
> looks for matches coming from the request then fills in those results.  Yes
> you need the id to update and yes you can update only one field or multiple
> since it overrides the doc.
>
> If you want to discuss more send me a direct thread or if other are
> interested maybe start a new one.
>
> Jeff Charette | Principal
> We Are Charette
> web / identity / packaging
>
> m  415.298.2707
> w  wearecharette.com
> e   jeffrey@wearecharette.com
>
> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
>
> > The code you provided only runs in the client, not in an update handler,
> > right?
> >
> > The concept of a DB supporting partial update is to only send the fields
> > that need to change to the DB instead of the entire doc. There is a real
> > efficiency advantage to send a few fields over the wire instead of entire
> > docs.
> >
> > There is also an advantage in having different apps (or parts of one app)
> > only know about some parts of the doc and never having to know the entire
> > doc.
> >
> > One example: I have three different node apps that modify a single
> progress
> > doc in a single dB based on their work. They are only passed the doc ID
> and
> > their job assignment when they start and then they mark their progress in
> > the doc as they go.
> >
> >
> >
> > On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
> wrote:
> >
> >> 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
> >> 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 <ma...@hahnca.com> wrote:
> >>
> >>>> 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 <Martyn.Pearce@gs.com
> >>> 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" <Ma...@gs.com>
> >>>> 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 <
> Martyn.Pearce@gs.com
> >>>>> 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 <
> Martyn.Pearce@gs.com
> >>>>>>> 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 <io...@yahoo.com>
> >>>>>> 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 <dc...@jsonified.com>
> >>>>>> 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
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> I don't want to highjack this thread

Actually I did but I'm not sorry because I think this topic needs more
discussion and awareness.

I apologize for questioning your code over and over.  I now finally
understand what you are doing.

What threw me was your `require`, `exports`, etc., which can't be in an
update handler.  You also never mentioned the word handler.  It appeared it
ran in node not couch.  Also after two years of writing in nothing but
coffeescript I find javascript hard to read.  :-)

If anyone cares I added a page to the couchDB wiki with my partial updates
solution.  It is at http://wiki.apache.org/couchdb/Partial_Updates linked
from the how-to page. It is brand new so let me know what you think.

@jeff, if you give me permission I will add your solution as a form-based
partial update that is less complicated.  I will take a shot at turning it
into the actual js that goes in the handler.



On Wed, Mar 27, 2013 at 7:44 AM, Jeff Charette <io...@yahoo.com> wrote:

> I don't want to highjack this thread, but also don't want people to get
> confused.  My code runs on the backend in the updates handler and just
> looks for matches coming from the request then fills in those results.  Yes
> you need the id to update and yes you can update only one field or multiple
> since it overrides the doc.
>
> If you want to discuss more send me a direct thread or if other are
> interested maybe start a new one.
>
> Jeff Charette | Principal
> We Are Charette
> web / identity / packaging
>
> m  415.298.2707
> w  wearecharette.com
> e   jeffrey@wearecharette.com
>
> On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:
>
> > The code you provided only runs in the client, not in an update handler,
> > right?
> >
> > The concept of a DB supporting partial update is to only send the fields
> > that need to change to the DB instead of the entire doc. There is a real
> > efficiency advantage to send a few fields over the wire instead of entire
> > docs.
> >
> > There is also an advantage in having different apps (or parts of one app)
> > only know about some parts of the doc and never having to know the entire
> > doc.
> >
> > One example: I have three different node apps that modify a single
> progress
> > doc in a single dB based on their work. They are only passed the doc ID
> and
> > their job assignment when they start and then they mark their progress in
> > the doc as they go.
> >
> >
> >
> > On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com>
> wrote:
> >
> >> 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
> >> 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 <ma...@hahnca.com> wrote:
> >>
> >>>> 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 <Martyn.Pearce@gs.com
> >>> 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" <Ma...@gs.com>
> >>>> 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 <
> Martyn.Pearce@gs.com
> >>>>> 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 <
> Martyn.Pearce@gs.com
> >>>>>>> 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 <io...@yahoo.com>
> >>>>>> 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 <dc...@jsonified.com>
> >>>>>> 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
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
I don't want to highjack this thread, but also don't want people to get confused.  My code runs on the backend in the updates handler and just looks for matches coming from the request then fills in those results.  Yes you need the id to update and yes you can update only one field or multiple since it overrides the doc.

If you want to discuss more send me a direct thread or if other are interested maybe start a new one.

Jeff Charette | Principal 
We Are Charette
web / identity / packaging

m  415.298.2707
w  wearecharette.com
e   jeffrey@wearecharette.com

On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:

> The code you provided only runs in the client, not in an update handler,
> right?
> 
> The concept of a DB supporting partial update is to only send the fields
> that need to change to the DB instead of the entire doc. There is a real
> efficiency advantage to send a few fields over the wire instead of entire
> docs.
> 
> There is also an advantage in having different apps (or parts of one app)
> only know about some parts of the doc and never having to know the entire
> doc.
> 
> One example: I have three different node apps that modify a single progress
> doc in a single dB based on their work. They are only passed the doc ID and
> their job assignment when they start and then they mark their progress in
> the doc as they go.
> 
> 
> 
> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com> wrote:
> 
>> 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
>> 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 <ma...@hahnca.com> wrote:
>> 
>>>> 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 <Martyn.Pearce@gs.com
>>> 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" <Ma...@gs.com>
>>>> 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 <Martyn.Pearce@gs.com
>>>>> 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 <Martyn.Pearce@gs.com
>>>>>>> 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 <io...@yahoo.com>
>>>>>> 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 <dc...@jsonified.com>
>>>>>> 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
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
I don't want to highjack this thread, but also don't want people to get confused.  My code runs on the backend in the updates handler and just looks for matches coming from the request then fills in those results.  Yes you need the id to update and yes you can update only one field or multiple since it overrides the doc.

If you want to discuss more send me a direct thread or if other are interested maybe start a new one.

Jeff Charette | Principal 
We Are Charette
web / identity / packaging

m  415.298.2707
w  wearecharette.com
e   jeffrey@wearecharette.com

On Mar 26, 2013, at 12:23 PM, Mark Hahn <ma...@hahnca.com> wrote:

> The code you provided only runs in the client, not in an update handler,
> right?
> 
> The concept of a DB supporting partial update is to only send the fields
> that need to change to the DB instead of the entire doc. There is a real
> efficiency advantage to send a few fields over the wire instead of entire
> docs.
> 
> There is also an advantage in having different apps (or parts of one app)
> only know about some parts of the doc and never having to know the entire
> doc.
> 
> One example: I have three different node apps that modify a single progress
> doc in a single dB based on their work. They are only passed the doc ID and
> their job assignment when they start and then they mark their progress in
> the doc as they go.
> 
> 
> 
> On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com> wrote:
> 
>> 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
>> 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 <ma...@hahnca.com> wrote:
>> 
>>>> 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 <Martyn.Pearce@gs.com
>>> 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" <Ma...@gs.com>
>>>> 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 <Martyn.Pearce@gs.com
>>>>> 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 <Martyn.Pearce@gs.com
>>>>>>> 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 <io...@yahoo.com>
>>>>>> 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 <dc...@jsonified.com>
>>>>>> 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
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
The code you provided only runs in the client, not in an update handler,
right?

The concept of a DB supporting partial update is to only send the fields
that need to change to the DB instead of the entire doc. There is a real
efficiency advantage to send a few fields over the wire instead of entire
docs.

There is also an advantage in having different apps (or parts of one app)
only know about some parts of the doc and never having to know the entire
doc.

One example: I have three different node apps that modify a single progress
doc in a single dB based on their work. They are only passed the doc ID and
their job assignment when they start and then they mark their progress in
the doc as they go.



On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com> wrote:

> 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
> 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 <ma...@hahnca.com> wrote:
>
> >> 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 <Martyn.Pearce@gs.com
> >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" <Ma...@gs.com>
> >> 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 <Martyn.Pearce@gs.com
> >>> 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 <Martyn.Pearce@gs.com
> >>>>> 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 <io...@yahoo.com>
> >>>> 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 <dc...@jsonified.com>
> >>>> 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
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
The code you provided only runs in the client, not in an update handler,
right?

The concept of a DB supporting partial update is to only send the fields
that need to change to the DB instead of the entire doc. There is a real
efficiency advantage to send a few fields over the wire instead of entire
docs.

There is also an advantage in having different apps (or parts of one app)
only know about some parts of the doc and never having to know the entire
doc.

One example: I have three different node apps that modify a single progress
doc in a single dB based on their work. They are only passed the doc ID and
their job assignment when they start and then they mark their progress in
the doc as they go.



On Tue, Mar 26, 2013 at 7:19 AM, Jeff Charette <io...@yahoo.com> wrote:

> 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
> 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 <ma...@hahnca.com> wrote:
>
> >> 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 <Martyn.Pearce@gs.com
> >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" <Ma...@gs.com>
> >> 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 <Martyn.Pearce@gs.com
> >>> 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 <Martyn.Pearce@gs.com
> >>>>> 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 <io...@yahoo.com>
> >>>> 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 <dc...@jsonified.com>
> >>>> 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
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>
> >>
>
>

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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 
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 <ma...@hahnca.com> wrote:

>> 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 <Ma...@gs.com>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" <Ma...@gs.com>
>> 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 <Martyn.Pearce@gs.com
>>> 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 <Martyn.Pearce@gs.com
>>>>> 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 <io...@yahoo.com>
>>>> 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 <dc...@jsonified.com>
>>>> 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
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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 
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 <ma...@hahnca.com> wrote:

>> 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 <Ma...@gs.com>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" <Ma...@gs.com>
>> 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 <Martyn.Pearce@gs.com
>>> 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 <Martyn.Pearce@gs.com
>>>>> 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 <io...@yahoo.com>
>>>> 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 <dc...@jsonified.com>
>>>> 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
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> 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 <Ma...@gs.com>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" <Ma...@gs.com>
> 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 <Martyn.Pearce@gs.com
> >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 <Martyn.Pearce@gs.com
> >>> 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 <io...@yahoo.com>
> >> 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 <dc...@jsonified.com>
> >> 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
> >>>>
> >>>>
> >>>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> 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 <Ma...@gs.com>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" <Ma...@gs.com>
> 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 <Martyn.Pearce@gs.com
> >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 <Martyn.Pearce@gs.com
> >>> 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 <io...@yahoo.com>
> >> 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 <dc...@jsonified.com>
> >> 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
> >>>>
> >>>>
> >>>
> >>
>
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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" <Ma...@gs.com> 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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
>>> 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 <io...@yahoo.com>
>> 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 <dc...@jsonified.com>
>> 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
>>>> 
>>>> 
>>> 
>> 


RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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" <Ma...@gs.com> 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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
>>> 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 <io...@yahoo.com>
>> 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 <dc...@jsonified.com>
>> 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
>>>> 
>>>> 
>>> 
>> 


Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> If you've not got any objections I will add these in some form into our
docs, suitably accredited.

Feel free.  What docs are you referring to?


On Tue, Mar 26, 2013 at 2:24 PM, Mark Hahn <ma...@hahnca.com> wrote:

> > I do something similar.
>
> OK, I understand now.  Sorry for the confusion.
>
> You are sending a form from the browser to the web server app.  My
> solution is sending updates from the server, client, or anywhere directly
> to the couch http server. These are both good solutions to two different
> problems.
>
>
>
> On Mon, Mar 25, 2013 at 10:44 AM, Jeff Charette <io...@yahoo.com> wrote:
>
>> 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" <Ma...@gs.com>
>> 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 <Martyn.Pearce@gs.com
>> >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 <Martyn.Pearce@gs.com
>> >>> 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 <io...@yahoo.com>
>> >> 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 <dc...@jsonified.com>
>> >> 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
>> >>>>
>> >>>>
>> >>>
>> >>
>>
>>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> If you've not got any objections I will add these in some form into our
docs, suitably accredited.

Feel free.  What docs are you referring to?


On Tue, Mar 26, 2013 at 2:24 PM, Mark Hahn <ma...@hahnca.com> wrote:

> > I do something similar.
>
> OK, I understand now.  Sorry for the confusion.
>
> You are sending a form from the browser to the web server app.  My
> solution is sending updates from the server, client, or anywhere directly
> to the couch http server. These are both good solutions to two different
> problems.
>
>
>
> On Mon, Mar 25, 2013 at 10:44 AM, Jeff Charette <io...@yahoo.com> wrote:
>
>> 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" <Ma...@gs.com>
>> 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 <Martyn.Pearce@gs.com
>> >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 <Martyn.Pearce@gs.com
>> >>> 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 <io...@yahoo.com>
>> >> 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 <dc...@jsonified.com>
>> >> 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
>> >>>>
>> >>>>
>> >>>
>> >>
>>
>>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> I do something similar.

OK, I understand now.  Sorry for the confusion.

You are sending a form from the browser to the web server app.  My solution
is sending updates from the server, client, or anywhere directly to the
couch http server. These are both good solutions to two different problems.



On Mon, Mar 25, 2013 at 10:44 AM, Jeff Charette <io...@yahoo.com> wrote:

> 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" <Ma...@gs.com>
> 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 <Martyn.Pearce@gs.com
> >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 <Martyn.Pearce@gs.com
> >>> 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 <io...@yahoo.com>
> >> 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 <dc...@jsonified.com>
> >> 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
> >>>>
> >>>>
> >>>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
> I do something similar.

OK, I understand now.  Sorry for the confusion.

You are sending a form from the browser to the web server app.  My solution
is sending updates from the server, client, or anywhere directly to the
couch http server. These are both good solutions to two different problems.



On Mon, Mar 25, 2013 at 10:44 AM, Jeff Charette <io...@yahoo.com> wrote:

> 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" <Ma...@gs.com>
> 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 <Martyn.Pearce@gs.com
> >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 <Martyn.Pearce@gs.com
> >>> 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 <io...@yahoo.com>
> >> 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 <dc...@jsonified.com>
> >> 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
> >>>>
> >>>>
> >>>
> >>
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
Does anyone have any suggestions for where to put code examples?  There
doesn't seem to be any place in the wiki.


On Mon, Mar 25, 2013 at 12:42 PM, svilen <az...@svilendobrev.com> wrote:

> how about putting these as coding snippets in the wiki?
> digging mail archives may not be done by many.
> these make the read-update cycle look less scary and more "atomic".
>
> svil
>
>
> On Mon, 25 Mar 2013 13:44:17 -0400
> Jeff Charette <io...@yahoo.com> wrote:
>
> > 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" <Ma...@gs.com>
> > 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
> > > <Ma...@gs.com>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
> > >> <Martyn.Pearce@gs.com
> > >>> 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.
>

Re: Google Summer of Code topics

Posted by Dave Cottlehuber <dc...@jsonified.com>.
If you've not got any objections I will add these in some form into
our docs, suitably accredited.

On 25 March 2013 20:42, svilen <az...@svilendobrev.com> wrote:
> how about putting these as coding snippets in the wiki?
> digging mail archives may not be done by many.
> these make the read-update cycle look less scary and more "atomic".
>
> svil
>
>
> On Mon, 25 Mar 2013 13:44:17 -0400
> Jeff Charette <io...@yahoo.com> wrote:
>
>> 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" <Ma...@gs.com>
>> 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
>> > <Ma...@gs.com>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
>> >> <Martyn.Pearce@gs.com
>> >>> 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.

Re: Google Summer of Code topics

Posted by svilen <az...@svilendobrev.com>.
how about putting these as coding snippets in the wiki?
digging mail archives may not be done by many.
these make the read-update cycle look less scary and more "atomic".

svil


On Mon, 25 Mar 2013 13:44:17 -0400
Jeff Charette <io...@yahoo.com> wrote:

> 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" <Ma...@gs.com>
> 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
> > <Ma...@gs.com>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
> >> <Martyn.Pearce@gs.com
> >>> 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.

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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" <Ma...@gs.com> 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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
>>> 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 <io...@yahoo.com>
>> 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 <dc...@jsonified.com>
>> 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
>>>> 
>>>> 
>>> 
>> 


Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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" <Ma...@gs.com> 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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
>>> 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 <io...@yahoo.com>
>> 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 <dc...@jsonified.com>
>> 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
>>>> 
>>>> 
>>> 
>> 


RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
> >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 <io...@yahoo.com>
> 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 <dc...@jsonified.com>
> 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
> > >
> > >
> >
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
> >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 <io...@yahoo.com>
> 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 <dc...@jsonified.com>
> 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
> > >
> > >
> >
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
> >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 <io...@yahoo.com>
> 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 <dc...@jsonified.com>
> 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
> > >
> > >
> >
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
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 <Ma...@gs.com>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 <Martyn.Pearce@gs.com
> >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 <io...@yahoo.com>
> 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 <dc...@jsonified.com>
> 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
> > >
> > >
> >
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <Ma...@gs.com>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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
> >
> >
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <Ma...@gs.com>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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
> >
> >
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
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 <Ma...@gs.com>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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
> >
> >
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
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 <Ma...@gs.com>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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
> >
> >
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
>
>

Re: Google Summer of Code topics

Posted by Keith Gable <zi...@ignition-project.com>.
If I understand you correctly, you want the ability to build a graph. I
think this could be a plugin (like geocouch). Also it would be a great
feature.
On Mar 23, 2013 5:20 AM, "Andrey Kuprianov" <an...@gmail.com>
wrote:

> I have that too, but it's just and emulation. Not really a partial update.
>
> As for me I feel CouchDB is seriously lacking relationships or link between
> documents.For instance, I'd love to pull a document and whatever it
> references in one go + whatever those documents referenced as well. I know
> some will argue that you can keep all the info in one place, but trust me
> you can do it for so long until your document retrieval becomes slow due to
> de/serialization.
>
>
> On Sat, Mar 23, 2013 at 2:14 AM, Mark Hahn <ma...@hahnca.com> wrote:
>
> > >  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 <io...@yahoo.com>
> 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 <dc...@jsonified.com>
> 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
> > >
> > >
> >
>

Re: Google Summer of Code topics

Posted by Andrey Kuprianov <an...@gmail.com>.
I have that too, but it's just and emulation. Not really a partial update.

As for me I feel CouchDB is seriously lacking relationships or link between
documents.For instance, I'd love to pull a document and whatever it
references in one go + whatever those documents referenced as well. I know
some will argue that you can keep all the info in one place, but trust me
you can do it for so long until your document retrieval becomes slow due to
de/serialization.


On Sat, Mar 23, 2013 at 2:14 AM, Mark Hahn <ma...@hahnca.com> wrote:

> >  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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
> >
> >
>

RE: Google Summer of Code topics

Posted by "Pearce, Martyn" <Ma...@gs.com>.
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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
>
>

Re: Google Summer of Code topics

Posted by Randall Leeds <ra...@gmail.com>.
On Mar 22, 2013 5:13 PM, "Wendall Cada" <we...@apache.org> wrote:
>
> The webpage for this github project isn't liked from their web pages. Can
be found https://github.com/Operational-Transformation

ShareJS is one to look at, too.

Sorry to go off topic. If people want to discuss OTs more we can take it to
a new thread.

Re: Google Summer of Code topics

Posted by Wendall Cada <we...@apache.org>.
The webpage for this github project isn't liked from their web pages. 
Can be found https://github.com/Operational-Transformation

Wendall

On 03/22/2013 05:07 PM, Wendall Cada wrote:
> On 03/22/2013 12:48 PM, Dave Cottlehuber wrote:
>> On 22 March 2013 19:14, Mark Hahn <ma...@hahnca.com> wrote:
>>>>   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.
>> Hi Mark,
>>
>> Completely true. Maybe you would like to contribute that back perhaps?
>> Even as a wiki entry that would be useful for folk, and I'm happy to
>> help clean up / document if required.
>>
>> I was thinking at the time of the JSON PATCH draft RFC, aka
>>
>> http://www.mnot.net/blog/2012/09/05/patch
>> http://tools.ietf.org/html/rfc5789
>> http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-10
>> https://github.com/json-patch/json-patch-tests
>> https://npmjs.org/package/json-patch
>>
>> Did you use this approach, or tackle it differently?
>>
>> Another idea that I had on the back burner was implementing
>> cryptographic support for doc signing, e.g. pgp-like signing and
>> validation, or even encryption. I think Jim Klo has done this or
>> something similar already.
>>
>> A+
>> Dave
> I think this idea is really a great one. Every time I bring this up, 
> the response is "Why don't you just send the entire doc?". We'll, I 
> could give a zillion reasons at least, but here are the main ones:
>
> 1. I want to be able to limit what I send over the wire without 
> resorting to the latest fad in over the wire json compression 
> techniques. Just simply being able to send my actual changes will beat 
> every one of these methods 100% of the time.
> 2. I want to only share a subset of the actual doc with the 
> client-side app.
> 3. Have the ability to store a history of doc changes easily.
>
> Imagine a scenario where all changes are stored as attachments and I 
> can easily replay events over the lifetime of a doc, or a truncated 
> history, depending on how long you want to store this for. Full 
> replicatable (sp?) history for an entire db!
>
> I've implemented quite a few solutions in some test code over the last 
> several months. What I've found is that diff is the slowest possible 
> way to do this. Maybe some of these solutions are faster now, but was 
> crazy slow when I looked at it about six months ago.
>
> I saw some very clever OT (Operation Transformation) techniques in 
> use. There is currently a really neat github project that has been 
> maintaining some very good implementations. Of particular interest is 
> the javascript implementation 
> http://operational-transformation.github.com/ot-for-javascript.html
>
> On that same site, there is quite a bit of information about OT. I 
> really think it would be awesome for a SoC project to have this 
> implemented in Erlang. There is some long-term potential of possibly 
> speeding up replication utilizing OT/diffs.
>
> Wendall
>
>


Re: Google Summer of Code topics

Posted by Wendall Cada <we...@apache.org>.
On 03/22/2013 12:48 PM, Dave Cottlehuber wrote:
> On 22 March 2013 19:14, Mark Hahn <ma...@hahnca.com> wrote:
>>>   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.
> Hi Mark,
>
> Completely true. Maybe you would like to contribute that back perhaps?
> Even as a wiki entry that would be useful for folk, and I'm happy to
> help clean up / document if required.
>
> I was thinking at the time of the JSON PATCH draft RFC, aka
>
> http://www.mnot.net/blog/2012/09/05/patch
> http://tools.ietf.org/html/rfc5789
> http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-10
> https://github.com/json-patch/json-patch-tests
> https://npmjs.org/package/json-patch
>
> Did you use this approach, or tackle it differently?
>
> Another idea that I had on the back burner was implementing
> cryptographic support for doc signing, e.g. pgp-like signing and
> validation, or even encryption. I think Jim Klo has done this or
> something similar already.
>
> A+
> Dave
I think this idea is really a great one. Every time I bring this up, the 
response is "Why don't you just send the entire doc?". We'll, I could 
give a zillion reasons at least, but here are the main ones:

1. I want to be able to limit what I send over the wire without 
resorting to the latest fad in over the wire json compression 
techniques. Just simply being able to send my actual changes will beat 
every one of these methods 100% of the time.
2. I want to only share a subset of the actual doc with the client-side app.
3. Have the ability to store a history of doc changes easily.

Imagine a scenario where all changes are stored as attachments and I can 
easily replay events over the lifetime of a doc, or a truncated history, 
depending on how long you want to store this for. Full replicatable 
(sp?) history for an entire db!

I've implemented quite a few solutions in some test code over the last 
several months. What I've found is that diff is the slowest possible way 
to do this. Maybe some of these solutions are faster now, but was crazy 
slow when I looked at it about six months ago.

I saw some very clever OT (Operation Transformation) techniques in use. 
There is currently a really neat github project that has been 
maintaining some very good implementations. Of particular interest is 
the javascript implementation 
http://operational-transformation.github.com/ot-for-javascript.html

On that same site, there is quite a bit of information about OT. I 
really think it would be awesome for a SoC project to have this 
implemented in Erlang. There is some long-term potential of possibly 
speeding up replication utilizing OT/diffs.

Wendall



Re: Google Summer of Code topics

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 22 March 2013 19:14, Mark Hahn <ma...@hahnca.com> wrote:
>>  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.

Hi Mark,

Completely true. Maybe you would like to contribute that back perhaps?
Even as a wiki entry that would be useful for folk, and I'm happy to
help clean up / document if required.

I was thinking at the time of the JSON PATCH draft RFC, aka

http://www.mnot.net/blog/2012/09/05/patch
http://tools.ietf.org/html/rfc5789
http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-10
https://github.com/json-patch/json-patch-tests
https://npmjs.org/package/json-patch

Did you use this approach, or tackle it differently?

Another idea that I had on the back burner was implementing
cryptographic support for doc signing, e.g. pgp-like signing and
validation, or even encryption. I think Jim Klo has done this or
something similar already.

A+
Dave

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
>  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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
>
>

Re: Google Summer of Code topics

Posted by Mark Hahn <ma...@hahnca.com>.
>  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 <io...@yahoo.com> 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 <dc...@jsonified.com> 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
>
>

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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 <dc...@jsonified.com> 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


Re: Google Summer of Code topics

Posted by Benoit Chesneau <bc...@gmail.com>.
I wouldn't point the points 8/9 too many questions to solve before I
thiink. However I have 1 other topic in mind: improve the stats so we
can have better  in feedback rt and possibility to store it on other
stats systems (graphite, statsd ...)

- benoit

On Fri, Mar 22, 2013 at 4:13 AM, Dave Cottlehuber <dc...@jsonified.com> 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

Re: Google Summer of Code topics

Posted by Benoit Chesneau <bc...@gmail.com>.
On Fri, Mar 29, 2013 at 12:47 AM, Olafur Arason <ol...@olafura.com> wrote:
> 22. _changes feed for views on https://gist.github.com/rnewson/2387973 is
> already supported.
> http://comments.gmane.org/gmane.comp.db.couchdb.user/14891
> so /mydb/_changes?filter=_view&view=mydesign/my_view
>
> I only recently stumbled on this.
>
>

This isn't the same feature:

https://issues.apache.org/jira/browse/COUCHDB-1737?focusedCommentId=13615965&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13615965

- benoƮt

Re: Google Summer of Code topics

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 29 March 2013 00:47, Olafur Arason <ol...@olafura.com> wrote:
> 22. _changes feed for views on https://gist.github.com/rnewson/2387973 is
> already supported.
> http://comments.gmane.org/gmane.comp.db.couchdb.user/14891
> so /mydb/_changes?filter=_view&view=mydesign/my_view
>
> I only recently stumbled on this.
>
> Regards,
> Olafur Arason

Hi Olafur,

This feature only allows you to write your code once, instead of both
view and filter, even if they're the same code actually. The
evaluation for views or filters currently is still separate.

Ideally, replication, views, and filters would be able to share a
common index (the view) and thus avoid any evaluation effort for
processing. Once the view was updated, you'd just ask couch to "gimme
any docs that match *** in the view" and then internally couchdb would
refer back to the already calculated view.

Sorry my explanation isn't better but I hope that clarifies the difference!

A+
Dave

Re: Google Summer of Code topics

Posted by Olafur Arason <ol...@olafura.com>.
22. _changes feed for views on https://gist.github.com/rnewson/2387973 is
already supported.
http://comments.gmane.org/gmane.comp.db.couchdb.user/14891
so /mydb/_changes?filter=_view&view=mydesign/my_view

I only recently stumbled on this.

Regards,
Olafur Arason


On Fri, Mar 22, 2013 at 7:13 AM, Dave Cottlehuber <dc...@jsonified.com> 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
>

Re: Google Summer of Code topics

Posted by Jeff Charette <io...@yahoo.com>.
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 <dc...@jsonified.com> 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