You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Vivek Pathak <vp...@orgmeta.com> on 2013/12/14 11:28:08 UTC

tool for management of couchdb design docs/code

Hi

I had some couchdb projects (since ~ 2007) which had significant 
computation within views/lists etc.    I had read about couchapp - which 
although is totally great - did not serve my purpose satisfactorily 
(reasons/details below).

Hence I had developed various scripts which were project specific. 
Finally I extracted the code into a standalone program which has the 
following main points:

  * Code on file system matches exactly code in couchdb (helps version
    control and programming - see next)
  * Able to create and run test cases (automatically w/o code change)
    for view map/reduce functions
  * Be able to run the these test cases manually through debugger (eg:
    rhino) using a harness
  * Be able to instrument these test cases for profiling, for example by
    having a debug built js in path
  * And finally - just like couchcapp - create canonical directory
    structure, as well as push and pull to/from design documents.

The code (single standalone python script) is available here :

    https://github.com/vivekpathak/casters

You are welome to try/use/improve

Thanks
Vivek


Re: tool for management of couchdb design docs/code

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, Dec 18, 2013 at 7:26 PM, Vivek Pathak <vp...@orgmeta.com> wrote:

> I agree that  might be an argument to motivate Erica feature
> prioritizarion but I can not see why one shouldn't have a tool that permits
> couch db views to take advantage of professional programming tools like
> debuggers profilers and unit tests
>

Erica can also provides that ;) But I am all for the diversity, and the
more tools we can have the more we will be able to see innovation coming.
There are so much things that could be done today and that are missing in
all the tools around....


>
> In any case, IMHO Erlang is stronger for concurrent programming which view
> template creatio and management hardly is
>

I do think that the OTP framework can be useful for all of these domains
and can offer new possibilities that you don't have in other languages.
Anyway I take erica and couchapp as just the beginning.
Managements/deployment of couchapps should be distributed and I expect to
show the real power of the OTP framework really soon.

- benoit

Re: tool for management of couchdb design docs/code

Posted by Vivek Pathak <vp...@orgmeta.com>.
I agree that  might be an argument to motivate Erica feature prioritizarion but I can not see why one shouldn't have a tool that permits couch db views to take advantage of professional programming tools like debuggers profilers and unit tests

In any case, IMHO Erlang is stronger for concurrent programming which view template creatio and management hardly is

Thanks 

Sent from my iPhone

> On Dec 18, 2013, at 12:20 PM, "Florian Westreicher Bakk.techn." <st...@meredrica.org> wrote:
> 
> IMHO python is not the best idea. It would be better to extend erica since it uses erlang. 
> 
> Benjamin Young <by...@bigbluehat.com> wrote:
>> Hey Vivek,
>> 
>> Thanks for open sourcing your code! I'd love to see if we can 
>> collaborate. Benoit passed the baton for `couchapp` on to me a few
>> weeks 
>> back, and I'm working to dust it off a bit, and get a path in place for
>> 
>> it's future. It'd be great if we could collaborate and work toward lots
>> 
>> of little reusable pieces with a nice command line interface for 
>> building, testing, and publishing CouchApps.
>> 
>> Also, anyone else interested in helping out and moving things forward, 
>> please join in here and on Github:
>> http://github.com/couchapp/couchapp
>> 
>> Let me know your thoughts!
>> Benjamin
>> 
>>> On 12/14/13, 5:28 AM, Vivek Pathak wrote:
>>> Hi
>>> 
>>> I had some couchdb projects (since ~ 2007) which had significant 
>>> computation within views/lists etc.    I had read about couchapp - 
>>> which although is totally great - did not serve my purpose 
>>> satisfactorily (reasons/details below).
>>> 
>>> Hence I had developed various scripts which were project specific. 
>>> Finally I extracted the code into a standalone program which has the 
>>> following main points:
>>> 
>>> * Code on file system matches exactly code in couchdb (helps version
>>>   control and programming - see next)
>>> * Able to create and run test cases (automatically w/o code change)
>>>   for view map/reduce functions
>>> * Be able to run the these test cases manually through debugger (eg:
>>>   rhino) using a harness
>>> * Be able to instrument these test cases for profiling, for example
>> by
>>>   having a debug built js in path
>>> * And finally - just like couchcapp - create canonical directory
>>>   structure, as well as push and pull to/from design documents.
>>> 
>>> The code (single standalone python script) is available here :
>>> 
>>>   https://github.com/vivekpathak/casters
>>> 
>>> You are welome to try/use/improve
>>> 
>>> Thanks
>>> Vivek
> 
> -- 
> Sent from Kaiten Mail. Please excuse my brevity.

Re: tool for management of couchdb design docs/code

Posted by Benjamin Young <by...@bigbluehat.com>.
Hey Pete,

I've used couchapp on Windows for years. Could you report any problems 
at the couchapp repo?
http://github.com/couchapp/couchapp

Thanks!
Benjamin

On 12/18/13, 10:27 PM, Peter Nolan wrote:
> Heya,
>
> Could couchapp please, please, support windows?
>
> Thanks,
>
> -Pete
>
>
> On Wed, Dec 18, 2013 at 5:06 PM, Benjamin Young <by...@bigbluehat.com>wrote:
>
>> On 12/18/13, 4:32 PM, Dave Cottlehuber wrote:
>>
>>> On 18. Dezember 2013 at 18:21:45, Florian Westreicher Bakk.techn. (
>>> stuff@meredrica.org) wrote:
>>>
>>>>    IMHO python is not the best idea. It would be better to extend erica
>>>> since it uses erlang.
>>>>
>>>> Benjamin Young wrote:
>>>>
>>>>> Hey Vivek,
>>>>>
>>>>> Thanks for open sourcing your code! I'd love to see if we can
>>>>> collaborate. Benoit passed the baton for `couchapp` on to me
>>>>>
>>>> Ben & Vivek,
>>> this sounds great & I look forwards to many more improvements along the
>>> way.
>>> Vivek I especially like the multi-ddoc support that you seem to have,
>>> that’s
>>> always been something that erica could do with.
>>>
>>> Florian - if you’re interested in working on extending erica that would be
>>> great too!
>>>
>>> A+
>>> Dave
>>>
>>>
>>>
>> Thanks, Dave. :)
>>
>> In the end, I'd like all the CouchApp tools to support some common
>> ground--so it can be clearer how to build (and ideally share!) one's
>> CouchApp.
>>
>> The least common denominator so far is the Filesystem Mapping:
>> https://github.com/couchapp/couchapp/wiki/Complete-
>> Filesystem-to-Design-Doc-Mapping-Example
>>
>> I'm eager to get multi-design doc stuff added to the couchapp tool, but
>> more than that, I'm eager to see it written up in a sharable format we can
>> *all* implement. :)
>>
>> Thanks!
>> Benjamin
>>
>
>


Re: tool for management of couchdb design docs/code

Posted by Alexander Shorin <kx...@gmail.com>.
On Thu, Dec 19, 2013 at 7:27 AM, Peter Nolan <pe...@gmail.com> wrote:
>
> Could couchapp please, please, support windows?

couchapp works on windows too. Do you expect any issues with?


--
,,,^..^,,,

Re: tool for management of couchdb design docs/code

Posted by Peter Nolan <pe...@gmail.com>.
Heya,

Could couchapp please, please, support windows?

Thanks,

-Pete


On Wed, Dec 18, 2013 at 5:06 PM, Benjamin Young <by...@bigbluehat.com>wrote:

>
> On 12/18/13, 4:32 PM, Dave Cottlehuber wrote:
>
>> On 18. Dezember 2013 at 18:21:45, Florian Westreicher Bakk.techn. (
>> stuff@meredrica.org) wrote:
>>
>>>   IMHO python is not the best idea. It would be better to extend erica
>>> since it uses erlang.
>>>
>>> Benjamin Young wrote:
>>>
>>>> Hey Vivek,
>>>>
>>>> Thanks for open sourcing your code! I'd love to see if we can
>>>> collaborate. Benoit passed the baton for `couchapp` on to me
>>>>
>>> Ben & Vivek,
>>
>> this sounds great & I look forwards to many more improvements along the
>> way.
>> Vivek I especially like the multi-ddoc support that you seem to have,
>> that’s
>> always been something that erica could do with.
>>
>> Florian - if you’re interested in working on extending erica that would be
>> great too!
>>
>> A+
>> Dave
>>
>>
>>
> Thanks, Dave. :)
>
> In the end, I'd like all the CouchApp tools to support some common
> ground--so it can be clearer how to build (and ideally share!) one's
> CouchApp.
>
> The least common denominator so far is the Filesystem Mapping:
> https://github.com/couchapp/couchapp/wiki/Complete-
> Filesystem-to-Design-Doc-Mapping-Example
>
> I'm eager to get multi-design doc stuff added to the couchapp tool, but
> more than that, I'm eager to see it written up in a sharable format we can
> *all* implement. :)
>
> Thanks!
> Benjamin
>



-- 
Peter Nolan
Cell - 631-398-8662
Email - PeterWNolan@gmail.com

Re: tool for management of couchdb design docs/code

Posted by Benjamin Young <by...@bigbluehat.com>.
On 12/18/13, 4:32 PM, Dave Cottlehuber wrote:
> On 18. Dezember 2013 at 18:21:45, Florian Westreicher Bakk.techn. (stuff@meredrica.org) wrote:
>>   
>> IMHO python is not the best idea. It would be better to extend erica
>> since it uses erlang.
>>
>> Benjamin Young wrote:
>>> Hey Vivek,
>>>
>>> Thanks for open sourcing your code! I'd love to see if we can
>>> collaborate. Benoit passed the baton for `couchapp` on to me
> Ben & Vivek,
>
> this sounds great & I look forwards to many more improvements along the way.
> Vivek I especially like the multi-ddoc support that you seem to have, that’s
> always been something that erica could do with.
>
> Florian - if you’re interested in working on extending erica that would be
> great too!
>
> A+
> Dave
>
>

Thanks, Dave. :)

In the end, I'd like all the CouchApp tools to support some common 
ground--so it can be clearer how to build (and ideally share!) one's 
CouchApp.

The least common denominator so far is the Filesystem Mapping:
https://github.com/couchapp/couchapp/wiki/Complete-Filesystem-to-Design-Doc-Mapping-Example

I'm eager to get multi-design doc stuff added to the couchapp tool, but 
more than that, I'm eager to see it written up in a sharable format we 
can *all* implement. :)

Thanks!
Benjamin

Re: tool for management of couchdb design docs/code

Posted by "Florian Westreicher Bakk.techn." <st...@meredrica.org>.
I am interested in a lot of things around CouchDB. I might try to hack something on erica next year to learn erlang, then start grinding my teeth on couch. 

Dave Cottlehuber <dc...@jsonified.com> wrote:
>On 18. Dezember 2013 at 18:21:45, Florian Westreicher Bakk.techn.
>(stuff@meredrica.org) wrote:
>>  
>> IMHO python is not the best idea. It would be better to extend erica 
>
>> since it uses erlang.
>>
>> Benjamin Young wrote:
>> >Hey Vivek,
>> >
>> >Thanks for open sourcing your code! I'd love to see if we can
>> >collaborate. Benoit passed the baton for `couchapp` on to me  
>
>Ben & Vivek,
>
>this sounds great & I look forwards to many more improvements along the
>way.
>Vivek I especially like the multi-ddoc support that you seem to have,
>that’s
>always been something that erica could do with.
>
>Florian - if you’re interested in working on extending erica that would
>be
>great too!
>
>A+
>Dave

-- 
Sent from Kaiten Mail. Please excuse my brevity.

Re: tool for management of couchdb design docs/code

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 18. Dezember 2013 at 18:21:45, Florian Westreicher Bakk.techn. (stuff@meredrica.org) wrote:
>  
> IMHO python is not the best idea. It would be better to extend erica  
> since it uses erlang.
>
> Benjamin Young wrote:
> >Hey Vivek,
> >
> >Thanks for open sourcing your code! I'd love to see if we can
> >collaborate. Benoit passed the baton for `couchapp` on to me  

Ben & Vivek,

this sounds great & I look forwards to many more improvements along the way.
Vivek I especially like the multi-ddoc support that you seem to have, that’s
always been something that erica could do with.

Florian - if you’re interested in working on extending erica that would be
great too!

A+
Dave



Re: tool for management of couchdb design docs/code

Posted by "Florian Westreicher Bakk.techn." <st...@meredrica.org>.
IMHO python is not the best idea. It would be better to extend erica since it uses erlang. 

Benjamin Young <by...@bigbluehat.com> wrote:
>Hey Vivek,
>
>Thanks for open sourcing your code! I'd love to see if we can 
>collaborate. Benoit passed the baton for `couchapp` on to me a few
>weeks 
>back, and I'm working to dust it off a bit, and get a path in place for
>
>it's future. It'd be great if we could collaborate and work toward lots
>
>of little reusable pieces with a nice command line interface for 
>building, testing, and publishing CouchApps.
>
>Also, anyone else interested in helping out and moving things forward, 
>please join in here and on Github:
>http://github.com/couchapp/couchapp
>
>Let me know your thoughts!
>Benjamin
>
>On 12/14/13, 5:28 AM, Vivek Pathak wrote:
>> Hi
>>
>> I had some couchdb projects (since ~ 2007) which had significant 
>> computation within views/lists etc.    I had read about couchapp - 
>> which although is totally great - did not serve my purpose 
>> satisfactorily (reasons/details below).
>>
>> Hence I had developed various scripts which were project specific. 
>> Finally I extracted the code into a standalone program which has the 
>> following main points:
>>
>>  * Code on file system matches exactly code in couchdb (helps version
>>    control and programming - see next)
>>  * Able to create and run test cases (automatically w/o code change)
>>    for view map/reduce functions
>>  * Be able to run the these test cases manually through debugger (eg:
>>    rhino) using a harness
>>  * Be able to instrument these test cases for profiling, for example
>by
>>    having a debug built js in path
>>  * And finally - just like couchcapp - create canonical directory
>>    structure, as well as push and pull to/from design documents.
>>
>> The code (single standalone python script) is available here :
>>
>>    https://github.com/vivekpathak/casters
>>
>> You are welome to try/use/improve
>>
>> Thanks
>> Vivek
>>
>>

-- 
Sent from Kaiten Mail. Please excuse my brevity.

Re: tool for management of couchdb design docs/code

Posted by Benjamin Young <by...@bigbluehat.com>.
On 12/19/13, 9:57 AM, Vivek Pathak wrote:
>
> On 12/18/2013 11:36 AM, Benjamin Young wrote:
>> Hey Vivek,
>>
>> Thanks for open sourcing your code! 
> You are welcome.  Please invite me to couchapp, and I will help as per 
> my capability.

No need for an invitation. Just fork and send Pull Requests. :)
>
> My vote/suggestion is to get the "requirements and interface" of 
> couchapp (tools) improved/tuned with a broader perspective in mind.

Yeah, defining what's actually needed in this space would be a good 
first step. Mostly, we all solve the problem in front of us--which, 
while "innovative" doesn't really help the group move forward as you 
then have to pick from a wide range of incompatible, though innovative, 
things.

Having some baseline that we all commonly support helps us build up from 
there--and we can keep moving the baseline up as well!

Projects like Mustache and Markdown seem to do this well. There's a 
common, shared spec, and people build up from that. Eventually (at least 
in the case of Mustache) those innovations/improvements make it back 
into the core, or are readily available as "pragmas" (in Mustache speak).

That's my hope here, anyway. :) Innovation that raises tides and 
consequently all the boats. :)

>
> For example if you write significantly complex map functions which use 
> several "requires" includes, you want to be able to trace history of 
> changes via version control - and also be able to profile the code and 
> improve its performance (js is sensitive to how you write the code,  
> same computation expressed different ways can have big difference in 
> performance).  Some people felt bad last time I expressed the same 
> (and sorry for that) - but its just that couchapp did not satisfy my 
> (reasonable) needs properly, and hence I had to develop the tools 
> which are now refactored and shared with you as casters 
> https://github.com/vivekpathak/casters
>
> The other issue is whether the tools should work on a design document 
> level/database level/or server level.  I chose the first to ensure 
> strict compliance with the change detection model in couchdb views - 
> but this is a technical and usage issue which could benefit from 
> discussion...
>
>
>
>
>> I'd love to see if we can collaborate. Benoit passed the baton for 
>> `couchapp` on to me a few weeks back, and I'm working to dust it off 
>> a bit, and get a path in place for it's future. It'd be great if we 
>> could collaborate and work toward lots of little reusable pieces with 
>> a nice command line interface for building, testing, and publishing 
>> CouchApps.
>>
>> Also, anyone else interested in helping out and moving things 
>> forward, please join in here and on Github:
>> http://github.com/couchapp/couchapp
>>
>> Let me know your thoughts!
>> Benjamin
>>
>> On 12/14/13, 5:28 AM, Vivek Pathak wrote:
>>> Hi
>>>
>>> I had some couchdb projects (since ~ 2007) which had significant 
>>> computation within views/lists etc.    I had read about couchapp - 
>>> which although is totally great - did not serve my purpose 
>>> satisfactorily (reasons/details below).
>>>
>>> Hence I had developed various scripts which were project specific. 
>>> Finally I extracted the code into a standalone program which has the 
>>> following main points:
>>>
>>>  * Code on file system matches exactly code in couchdb (helps version
>>>    control and programming - see next)
>>>  * Able to create and run test cases (automatically w/o code change)
>>>    for view map/reduce functions
>>>  * Be able to run the these test cases manually through debugger (eg:
>>>    rhino) using a harness
>>>  * Be able to instrument these test cases for profiling, for example by
>>>    having a debug built js in path
>>>  * And finally - just like couchcapp - create canonical directory
>>>    structure, as well as push and pull to/from design documents.
>>>
>>> The code (single standalone python script) is available here :
>>>
>>>    https://github.com/vivekpathak/casters
>>>
>>> You are welome to try/use/improve
>>>
>>> Thanks
>>> Vivek
>>>
>>>
>>
>>
>>
>


Re: tool for management of couchdb design docs/code

Posted by Vivek Pathak <vp...@orgmeta.com>.
On 12/18/2013 11:36 AM, Benjamin Young wrote:
> Hey Vivek,
>
> Thanks for open sourcing your code! 
You are welcome.  Please invite me to couchapp, and I will help as per 
my capability.

My vote/suggestion is to get the "requirements and interface" of 
couchapp (tools) improved/tuned with a broader perspective in mind.

For example if you write significantly complex map functions which use 
several "requires" includes, you want to be able to trace history of 
changes via version control - and also be able to profile the code and 
improve its performance (js is sensitive to how you write the code,  
same computation expressed different ways can have big difference in 
performance).  Some people felt bad last time I expressed the same (and 
sorry for that) - but its just that couchapp did not satisfy my 
(reasonable) needs properly, and hence I had to develop the tools which 
are now refactored and shared with you as casters 
https://github.com/vivekpathak/casters

The other issue is whether the tools should work on a design document 
level/database level/or server level.  I chose the first to ensure 
strict compliance with the change detection model in couchdb views - but 
this is a technical and usage issue which could benefit from discussion...




> I'd love to see if we can collaborate. Benoit passed the baton for 
> `couchapp` on to me a few weeks back, and I'm working to dust it off a 
> bit, and get a path in place for it's future. It'd be great if we 
> could collaborate and work toward lots of little reusable pieces with 
> a nice command line interface for building, testing, and publishing 
> CouchApps.
>
> Also, anyone else interested in helping out and moving things forward, 
> please join in here and on Github:
> http://github.com/couchapp/couchapp
>
> Let me know your thoughts!
> Benjamin
>
> On 12/14/13, 5:28 AM, Vivek Pathak wrote:
>> Hi
>>
>> I had some couchdb projects (since ~ 2007) which had significant 
>> computation within views/lists etc.    I had read about couchapp - 
>> which although is totally great - did not serve my purpose 
>> satisfactorily (reasons/details below).
>>
>> Hence I had developed various scripts which were project specific. 
>> Finally I extracted the code into a standalone program which has the 
>> following main points:
>>
>>  * Code on file system matches exactly code in couchdb (helps version
>>    control and programming - see next)
>>  * Able to create and run test cases (automatically w/o code change)
>>    for view map/reduce functions
>>  * Be able to run the these test cases manually through debugger (eg:
>>    rhino) using a harness
>>  * Be able to instrument these test cases for profiling, for example by
>>    having a debug built js in path
>>  * And finally - just like couchcapp - create canonical directory
>>    structure, as well as push and pull to/from design documents.
>>
>> The code (single standalone python script) is available here :
>>
>>    https://github.com/vivekpathak/casters
>>
>> You are welome to try/use/improve
>>
>> Thanks
>> Vivek
>>
>>
>
>
>


Re: tool for management of couchdb design docs/code

Posted by Benjamin Young <by...@bigbluehat.com>.
Hey Vivek,

Thanks for open sourcing your code! I'd love to see if we can 
collaborate. Benoit passed the baton for `couchapp` on to me a few weeks 
back, and I'm working to dust it off a bit, and get a path in place for 
it's future. It'd be great if we could collaborate and work toward lots 
of little reusable pieces with a nice command line interface for 
building, testing, and publishing CouchApps.

Also, anyone else interested in helping out and moving things forward, 
please join in here and on Github:
http://github.com/couchapp/couchapp

Let me know your thoughts!
Benjamin

On 12/14/13, 5:28 AM, Vivek Pathak wrote:
> Hi
>
> I had some couchdb projects (since ~ 2007) which had significant 
> computation within views/lists etc.    I had read about couchapp - 
> which although is totally great - did not serve my purpose 
> satisfactorily (reasons/details below).
>
> Hence I had developed various scripts which were project specific. 
> Finally I extracted the code into a standalone program which has the 
> following main points:
>
>  * Code on file system matches exactly code in couchdb (helps version
>    control and programming - see next)
>  * Able to create and run test cases (automatically w/o code change)
>    for view map/reduce functions
>  * Be able to run the these test cases manually through debugger (eg:
>    rhino) using a harness
>  * Be able to instrument these test cases for profiling, for example by
>    having a debug built js in path
>  * And finally - just like couchcapp - create canonical directory
>    structure, as well as push and pull to/from design documents.
>
> The code (single standalone python script) is available here :
>
>    https://github.com/vivekpathak/casters
>
> You are welome to try/use/improve
>
> Thanks
> Vivek
>
>