<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>dev@couchdb.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/"/>
<id>http://mail-archives.apache.org/mod_mbox/couchdb-dev/</id>
<updated>2009-12-09T12:26:08Z</updated>
<entry>
<title>Re: Updating the CouchDB roadmap</title>
<author><name>Robert Dionne &lt;dionne@dionne-associates.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c079EA82D-9BCD-4469-91B0-ACF6F2333276@dionne-associates.com%3e"/>
<id>urn:uuid:%3c079EA82D-9BCD-4469-91B0-ACF6F2333276@dionne-associates-com%3e</id>
<updated>2009-12-09T12:15:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'd like to see something like the jira-486:

some refactoring of the internals, better separation of concerns, etc.. the idea being to
enable hackers who wish to extend the capabilities of the internals in a somewhat principled
way. I think the code base is at the size (~15K lines  in src/couchdb) now where it's still
manageable but it's increasingly difficult to understand all the pieces in any depth given
the functionality packed into it. 

I know there's been lots of discussion around this on irc, etc.. it strikes me that the time
is right to put a stake in the ground on it.

Cheer,

Bob



On Dec 3, 2009, at 2:29 PM, Noah Slater wrote:

&gt; Hey,
&gt; 
&gt; As part of the release procedure, this is a request to update the roadmap document:
&gt; 
&gt; 	http://couchdb.apache.org/roadmap.html
&gt; 
&gt; Please comment on what should be added, and what should be removed.
&gt; 
&gt; After a we reach consensus, I will update the roadmap.
&gt; 
&gt; Thanks,
&gt; 
&gt; Noah



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (COUCHDB-583) adding ?compression=(gzip|deflate) optional parameter to the attachment download API</title>
<author><name>&quot;Filipe Manana (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1700138546.1260304518204.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1700138546-1260304518204-JavaMail-jira@brutus%3e</id>
<updated>2009-12-08T20:35:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

     [ https://issues.apache.org/jira/browse/COUCHDB-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Filipe Manana updated COUCHDB-583:
----------------------------------

    Attachment: couchdb-583-trunk-3rd-try.patch

Hello,

Here follows the patch implementing Damien's suggestion.

A new key under the httpd section is added to the config file. Its value is the name of a
file that lists which MIME types are worth compressing (text based types for e.g.).

When an attachment is uploaded (using the standalone attachment API), if its type matches
one of the MIME types listed in the former file, the attachment is stored with gzip compression.

When a client requests the download of an attachment:

1) if the HTTP request message has an Accept-Encoding header listing gzip as an acceptable
response body encoding method, the attachment is sent unmodified to the client (in gzip form
and in a chunked HTTP message)

2) if the HTTP request doesn't include that header, or if it includes but it mentions gzip
as not acceptable, the attachment is uncompressed (on the fly) and sent to the client (in
a chunked HTTP response)

An Etap test, covering 7 scenarios, is included.
Note that it breaks some other tests (for example, tests that upload a text attachment and
then downloaded it to check its content). I'll fix those tests after your feedback. This is
a preliminary version.

Feedback (specially from the commiters) regarding the implementation is very welcome.

cheers,
Filipe Manana (fdmanana)

&gt; adding ?compression=(gzip|deflate) optional parameter to the attachment download API
&gt; ------------------------------------------------------------------------------------
&gt;
&gt;                 Key: COUCHDB-583
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-583
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: HTTP Interface
&gt;         Environment: CouchDB trunk revision 885240
&gt;            Reporter: Filipe Manana
&gt;         Attachments: couchdb-583-trunk-3rd-try.patch, jira-couchdb-583-1st-try-trunk.patch,
jira-couchdb-583-2nd-try-trunk.patch
&gt;
&gt;   Original Estimate: 24h
&gt;  Remaining Estimate: 24h
&gt;
&gt; The following new feature is added in the patch following this ticket creation.
&gt; A new optional http query parameter "compression" is added to the attachments API.
&gt; This parameter can have one of the values:  "gzip" or "deflate".
&gt; When asking for an attachment (GET http request), if the query parameter "compression"
is found, CouchDB will send the attachment compressed to the client (and sets the header Content-Encoding
with gzip or deflate).
&gt; Further, it adds a new config option "treshold_for_chunking_comp_responses" (httpd section)
that specifies an attachment length threshold. If an attachment has a length &gt;= than this
threshold, the http response will be chunked (besides compressed).
&gt; Note that using non chunked compressed  body responses requires storing all the compressed
blocks in memory and then sending each one to the client. This is a necessary "evil", as we
only know the length of the compressed body after compressing all the body, and we need to
set the "Content-Length" header for non chunked responses. By sending chunked responses, we
can send each compressed block immediately, without accumulating all of them in memory.
&gt; Examples:
&gt; $ curl http://localhost:5984/testdb/testdoc1/readme.txt?compression=gzip
&gt; $ curl http://localhost:5984/testdb/testdoc1/readme.txt?compression=deflate
&gt; $ curl http://localhost:5984/testdb/testdoc1/readme.txt   # attachment will not be compressed
&gt; $ curl http://localhost:5984/testdb/testdoc1/readme.txt?compression=rar   # will give
a 500 error code
&gt; Etap test case included.
&gt; Feedback would be very welcome.
&gt; cheers

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Updating the CouchDB roadmap</title>
<author><name>kosta@fillibach.de</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c20091208114858.12390iehu02ir2fs@webmail.df.eu%3e"/>
<id>urn:uuid:%3c20091208114858-12390iehu02ir2fs@webmail-df-eu%3e</id>
<updated>2009-12-08T10:48:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Quoting Noah Slater &lt;nslater@tumbolia.org&gt;:
&gt; As part of the release procedure, this is a request to update the  
&gt; roadmap document:
&gt; Please comment on what should be added, and what should be removed.

What I would like to see is "map/reduce chaining", as this really  
would blow away most limitations currently imposed by couchdb. A good  
example for this would be "get the 10 most popular items from a tag  
cloud".

Of course, this also might affect efficiency, as every layer of  
map/reducing imposes housekeeping and update costs.

Cheers,
Kosta




</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Closed: (COUCHDB-594) Replicator does not release old Fd of compacted DB</title>
<author><name>&quot;Adam Kocoloski (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c31316161.1260249978119.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c31316161-1260249978119-JavaMail-jira@brutus%3e</id>
<updated>2009-12-08T05:26:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

     [ https://issues.apache.org/jira/browse/COUCHDB-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adam Kocoloski closed COUCHDB-594.
----------------------------------

    Resolution: Fixed

fixed in r888267 (trunk), r888268 (0.10.x)

&gt; Replicator does not release old Fd of compacted DB
&gt; --------------------------------------------------
&gt;
&gt;                 Key: COUCHDB-594
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-594
&gt;             Project: CouchDB
&gt;          Issue Type: Bug
&gt;          Components: Replication
&gt;    Affects Versions: 0.10.1, 0.11
&gt;            Reporter: Adam Kocoloski
&gt;            Assignee: Adam Kocoloski
&gt;             Fix For: 0.10.2, 0.11
&gt;
&gt;
&gt; If you compact a local DB while a replication using that DB is running, the replicator
will hang onto the Fd of the old file forever.  Patch is on the way.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (COUCHDB-594) Replicator does not release old Fd of compacted DB</title>
<author><name>&quot;Adam Kocoloski (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1136424121.1260249860744.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1136424121-1260249860744-JavaMail-jira@brutus%3e</id>
<updated>2009-12-08T05:24:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Replicator does not release old Fd of compacted DB
--------------------------------------------------

                 Key: COUCHDB-594
                 URL: https://issues.apache.org/jira/browse/COUCHDB-594
             Project: CouchDB
          Issue Type: Bug
          Components: Replication
    Affects Versions: 0.10.1, 0.11
            Reporter: Adam Kocoloski
            Assignee: Adam Kocoloski
             Fix For: 0.10.2, 0.11


If you compact a local DB while a replication using that DB is running, the replicator will
hang onto the Fd of the old file forever.  Patch is on the way.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chfi2f0$7hi$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chfi2f0$7hi$1@ger-gmane-org%3e</id>
<updated>2009-12-07T05:05:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Anderson wrote:
&gt;&gt; Read-only - of course you could add state to the object if you wanted
&gt;&gt; but it'd be cleared when the os process is restarted, which will
&gt;&gt; happen from time to time.

Of course the next feature request would be to make it possible to sync
changes back to the DB :-)  [No, I am not asking for that.  Yet.]

&gt;&gt; The big challenge here is striking the right balance. I'd like to have
&gt;&gt; the whole ddoc available to the map and reduce functions, but I don't
&gt;&gt; want to invalidate the indexes every time someone changes a show or or
&gt;&gt; list. I'll probably end up special-casing the views not to change
&gt;&gt; invalidation strategies for now.

You could probably make view compaction be a trigger.  For example if I was
storing functions elsewhere in the design doc and changed them but not the
view code using them then you'd have no way of knowing that change mattered.
 I'd be happy to do a view compaction or something similar to indicate that
what is currently stored is out of date.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkscjSAACgkQmOOfHg372QS/kgCfVPiLdDFf1zVCfU6GjXBXZ976
dz0An37mVc49grp/RfR8l73XhR4LoBb+
=umbb
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Chris Anderson &lt;jchris@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3ce282921e0912061647o3284b55etc383de2b345e2573@mail.gmail.com%3e"/>
<id>urn:uuid:%3ce282921e0912061647o3284b55etc383de2b345e2573@mail-gmail-com%3e</id>
<updated>2009-12-07T00:47:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 11:37 PM, Roger Binns &lt;rogerb@rogerbinns.com&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Chris Anderson wrote:
&gt;&gt;&gt; I'm inclined to agree with you. I'm working on a patch to make it so
&gt;&gt;&gt; the show and list funs have access to the entire design document. This
&gt;&gt;&gt; should facilitate what you are asking for.
&gt;
&gt; Would that also have the side effect of not needing the !code macros any
&gt; more since you could just grab other functions directly out of the design doc?
&gt;

yes.

&gt; I had been considering plugging the Google Closure Javascript
&gt; optimizer/recompiler into my couchapp equivalent.  Of particular interest is
&gt; its ability to remove unused code which is typical when using libraries.
&gt;
&gt;  http://code.google.com/closure/compiler/
&gt;
&gt; Also would the design document access be read-only or read-write?
&gt;

Read-only - of course you could add state to the object if you wanted
but it'd be cleared when the os process is restarted, which will
happen from time to time.

The big challenge here is striking the right balance. I'd like to have
the whole ddoc available to the map and reduce functions, but I don't
want to invalidate the indexes every time someone changes a show or or
list. I'll probably end up special-casing the views not to change
invalidation strategies for now.

Chris


&gt; Roger
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.4.9 (GNU/Linux)
&gt; Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
&gt;
&gt; iEYEARECAAYFAksbX0EACgkQmOOfHg372QQiAgCeMsH2vDffZ0gvN+g8Gru/QkvW
&gt; LnAAoJeOuDuSLV37ysZO/8Ac688ffEYY
&gt; =Q/Os
&gt; -----END PGP SIGNATURE-----
&gt;
&gt;



-- 
Chris Anderson
http://jchrisa.net
http://couch.io


</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Closed: (COUCHDB-593) Show returning zero length string results in scary errors</title>
<author><name>&quot;Chris Anderson (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c789255924.1260140358103.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c789255924-1260140358103-JavaMail-jira@brutus%3e</id>
<updated>2009-12-06T22:59:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

     [ https://issues.apache.org/jira/browse/COUCHDB-593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Anderson closed COUCHDB-593.
----------------------------------

    Resolution: Fixed

fixed in r887791,

thanks Roger for the ticket!

&gt; Show returning zero length string results in scary errors
&gt; ---------------------------------------------------------
&gt;
&gt;                 Key: COUCHDB-593
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-593
&gt;             Project: CouchDB
&gt;          Issue Type: Bug
&gt;          Components: JavaScript View Server
&gt;    Affects Versions: 0.10
&gt;         Environment: Ubuntu 9.10
&gt;            Reporter: Roger Binns
&gt;            Assignee: Chris Anderson
&gt;
&gt; If your show function returns a zero length string then several scary things happen.
 Arguably the empty length string should just be returned to the browser.
&gt; function (doc,req) { return "";}
&gt; On returning the zero length string, the following is displayed in the browser:
&gt;          {ret_proc,{proc,&lt;0.79.0&gt;,&lt;&lt;\"javascript\"&gt;&gt;,\n           
                 {couch_os_process,prompt},\n                             {couch_os_process,set_timeout},\n
                            {couch_os_process,stop}}}]}"}
&gt; The following is in the CouchDB log:
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] OS Process Error :: {render_error,&lt;&lt;"undefined
response from show function"&gt;&gt;}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.53.0&gt;] {error_report,&lt;0.24.0&gt;,
&gt;               {&lt;0.53.0&gt;,supervisor_report,
&gt;                [{supervisor,{local,couch_secondary_services}},
&gt;                 {errorContext,child_terminated},
&gt;                 {reason,normal},
&gt;                 {offender,[{pid,&lt;0.58.0&gt;},
&gt;                            {name,query_servers},
&gt;                            {mfa,{couch_query_servers,start_link,[]}},
&gt;                            {restart_type,permanent},
&gt;                            {shutdown,brutal_kill},
&gt;                            {child_type,worker}]}]}}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] Uncaught error in HTTP request:
{exit,
&gt;                                  {normal,
&gt;                                   {gen_server,call,
&gt;                                    [couch_query_servers,
&gt;                                     {ret_proc,
&gt;                                      {proc,&lt;0.79.0&gt;,&lt;&lt;"javascript"&gt;&gt;,
&gt;                                       {couch_os_process,prompt},
&gt;                                       {couch_os_process,set_timeout},
&gt;                                       {couch_os_process,stop}}}]}}}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] Stacktrace: [{gen_server,call,2},
&gt;              {couch_query_servers,ret_os_process,1},
&gt;              {couch_query_servers,render_doc_show,6},
&gt;              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
&gt;              {couch_httpd_db,do_db_req,2},
&gt;              {couch_httpd,handle_request,5},
&gt;              {mochiweb_http,headers,5},
&gt;              {proc_lib,init_p_do_apply,3}]
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] 127.0.0.1 - - 'GET' /r/_design/rofroks/_show/index
500

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Assigned: (COUCHDB-593) Show returning zero length string results in scary errors</title>
<author><name>&quot;Chris Anderson (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c711307319.1260138798066.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c711307319-1260138798066-JavaMail-jira@brutus%3e</id>
<updated>2009-12-06T22:33:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

     [ https://issues.apache.org/jira/browse/COUCHDB-593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Anderson reassigned COUCHDB-593:
--------------------------------------

    Assignee: Chris Anderson

&gt; Show returning zero length string results in scary errors
&gt; ---------------------------------------------------------
&gt;
&gt;                 Key: COUCHDB-593
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-593
&gt;             Project: CouchDB
&gt;          Issue Type: Bug
&gt;          Components: JavaScript View Server
&gt;    Affects Versions: 0.10
&gt;         Environment: Ubuntu 9.10
&gt;            Reporter: Roger Binns
&gt;            Assignee: Chris Anderson
&gt;
&gt; If your show function returns a zero length string then several scary things happen.
 Arguably the empty length string should just be returned to the browser.
&gt; function (doc,req) { return "";}
&gt; On returning the zero length string, the following is displayed in the browser:
&gt;          {ret_proc,{proc,&lt;0.79.0&gt;,&lt;&lt;\"javascript\"&gt;&gt;,\n           
                 {couch_os_process,prompt},\n                             {couch_os_process,set_timeout},\n
                            {couch_os_process,stop}}}]}"}
&gt; The following is in the CouchDB log:
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] OS Process Error :: {render_error,&lt;&lt;"undefined
response from show function"&gt;&gt;}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.53.0&gt;] {error_report,&lt;0.24.0&gt;,
&gt;               {&lt;0.53.0&gt;,supervisor_report,
&gt;                [{supervisor,{local,couch_secondary_services}},
&gt;                 {errorContext,child_terminated},
&gt;                 {reason,normal},
&gt;                 {offender,[{pid,&lt;0.58.0&gt;},
&gt;                            {name,query_servers},
&gt;                            {mfa,{couch_query_servers,start_link,[]}},
&gt;                            {restart_type,permanent},
&gt;                            {shutdown,brutal_kill},
&gt;                            {child_type,worker}]}]}}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] Uncaught error in HTTP request:
{exit,
&gt;                                  {normal,
&gt;                                   {gen_server,call,
&gt;                                    [couch_query_servers,
&gt;                                     {ret_proc,
&gt;                                      {proc,&lt;0.79.0&gt;,&lt;&lt;"javascript"&gt;&gt;,
&gt;                                       {couch_os_process,prompt},
&gt;                                       {couch_os_process,set_timeout},
&gt;                                       {couch_os_process,stop}}}]}}}
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] Stacktrace: [{gen_server,call,2},
&gt;              {couch_query_servers,ret_os_process,1},
&gt;              {couch_query_servers,render_doc_show,6},
&gt;              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
&gt;              {couch_httpd_db,do_db_req,2},
&gt;              {couch_httpd,handle_request,5},
&gt;              {mochiweb_http,headers,5},
&gt;              {proc_lib,init_p_do_apply,3}]
&gt; [Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] 127.0.0.1 - - 'GET' /r/_design/rofroks/_show/index
500

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (COUCHDB-593) Show returning zero length string results in scary errors</title>
<author><name>&quot;Roger Binns (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1773356003.1260137838196.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1773356003-1260137838196-JavaMail-jira@brutus%3e</id>
<updated>2009-12-06T22:17:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Show returning zero length string results in scary errors
---------------------------------------------------------

                 Key: COUCHDB-593
                 URL: https://issues.apache.org/jira/browse/COUCHDB-593
             Project: CouchDB
          Issue Type: Bug
          Components: JavaScript View Server
    Affects Versions: 0.10
         Environment: Ubuntu 9.10
            Reporter: Roger Binns


If your show function returns a zero length string then several scary things happen.  Arguably
the empty length string should just be returned to the browser.

function (doc,req) { return "";}

On returning the zero length string, the following is displayed in the browser:

         {ret_proc,{proc,&lt;0.79.0&gt;,&lt;&lt;\"javascript\"&gt;&gt;,\n                
            {couch_os_process,prompt},\n                             {couch_os_process,set_timeout},\n
                            {couch_os_process,stop}}}]}"}

The following is in the CouchDB log:

[Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] OS Process Error :: {render_error,&lt;&lt;"undefined
response from show function"&gt;&gt;}

[Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.53.0&gt;] {error_report,&lt;0.24.0&gt;,
              {&lt;0.53.0&gt;,supervisor_report,
               [{supervisor,{local,couch_secondary_services}},
                {errorContext,child_terminated},
                {reason,normal},
                {offender,[{pid,&lt;0.58.0&gt;},
                           {name,query_servers},
                           {mfa,{couch_query_servers,start_link,[]}},
                           {restart_type,permanent},
                           {shutdown,brutal_kill},
                           {child_type,worker}]}]}}

[Sun, 06 Dec 2009 22:10:15 GMT] [error] [&lt;0.64.0&gt;] Uncaught error in HTTP request: {exit,
                                 {normal,
                                  {gen_server,call,
                                   [couch_query_servers,
                                    {ret_proc,
                                     {proc,&lt;0.79.0&gt;,&lt;&lt;"javascript"&gt;&gt;,
                                      {couch_os_process,prompt},
                                      {couch_os_process,set_timeout},
                                      {couch_os_process,stop}}}]}}}

[Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] Stacktrace: [{gen_server,call,2},
             {couch_query_servers,ret_os_process,1},
             {couch_query_servers,render_doc_show,6},
             {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
             {couch_httpd_db,do_db_req,2},
             {couch_httpd,handle_request,5},
             {mochiweb_http,headers,5},
             {proc_lib,init_p_do_apply,3}]

[Sun, 06 Dec 2009 22:10:15 GMT] [info] [&lt;0.64.0&gt;] 127.0.0.1 - - 'GET' /r/_design/rofroks/_show/index
500


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>rendering docs in Futon</title>
<author><name>Robert Dionne &lt;dionne@dionne-associates.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c00BE18F1-B2B0-4130-B187-E488E38A58A6@dionne-associates.com%3e"/>
<id>urn:uuid:%3c00BE18F1-B2B0-4130-B187-E488E38A58A6@dionne-associates-com%3e</id>
<updated>2009-12-06T16:04:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have what I guess is a design question about Futon:

I've been playing and prototyping with FTI in couchdb [1,2] and have tweaked Futon to replace
the "Jump to ID" feature with "Search For:" [3] and an interesting question comes up. Currently
I"m indexing all the values in the docs and returning the slot names as well as the doc ids
in the search results. Even though couchdb is schema-less, there is an implicit schema within
a given database as a rule. This is what allows us to define a Document object in Lucene which
contains the fields we want to index up front.

In this approach I'm indexing everything but of course in practice  I may only be interested
in particular slots like "PreferredName" or "GeneEncodes". So the question I have is how to
control that in the search field, because it is database dependent. Should I let the display
slot in jquery.suggest be configurable? I suppose one approach would be to index views rather
that the entire document. This would be closer to how Lucene indexing works where the view
itself defines the fields of interest. Still there may be multiple fields, so the question
of how to configure the display remains.

Anyway if this makes sense to anyone I'd appreciate your thoughts.

Cheers,

Bob


[1]  http://github.com/bdionne/indexer
[2]  http://github.com/bdionne/couchdb/tree/lucille
[3]  http://dionne.posterous.com/searching-in-futon-0




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chffn02$df3$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chffn02$df3$1@ger-gmane-org%3e</id>
<updated>2009-12-06T07:37:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Anderson wrote:
&gt;&gt; I'm inclined to agree with you. I'm working on a patch to make it so
&gt;&gt; the show and list funs have access to the entire design document. This
&gt;&gt; should facilitate what you are asking for.

Would that also have the side effect of not needing the !code macros any
more since you could just grab other functions directly out of the design doc?

I had been considering plugging the Google Closure Javascript
optimizer/recompiler into my couchapp equivalent.  Of particular interest is
its ability to remove unused code which is typical when using libraries.

  http://code.google.com/closure/compiler/

Also would the design document access be read-only or read-write?

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksbX0EACgkQmOOfHg372QQiAgCeMsH2vDffZ0gvN+g8Gru/QkvW
LnAAoJeOuDuSLV37ysZO/8Ac688ffEYY
=Q/Os
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Chris Anderson &lt;jchris@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3ce282921e0912052312x2573e302jd4146ec97632c223@mail.gmail.com%3e"/>
<id>urn:uuid:%3ce282921e0912052312x2573e302jd4146ec97632c223@mail-gmail-com%3e</id>
<updated>2009-12-06T07:12:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 10:50 PM, Roger Binns &lt;rogerb@rogerbinns.com&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Benoit Chesneau wrote:
&gt;&gt; Well rewrite need to be fast. I don't like the idea of loading another
&gt;&gt; doc. However since ddoc is already loaded  it could be used in. We
&gt;&gt; just spoke with jchris about such possibily. I think that it will do
&gt;&gt; the trick.
&gt;
&gt; That is certainly better in my opinion than no doc at all.
&gt;
&gt;&gt; You don't need to regerenate code you can use couchapp macro or any
&gt;&gt; templating system in current solution.
&gt;
&gt; You are thinking as though you maintain couchapp :-)  Sure that is no
&gt; problem for the developer of a CouchApp but consider what happens once you
&gt; deploy it.  For example lets say there is a blogging CouchApp that people(*)
&gt; use and it has a debugging mode implemented by a rewrite  (eg it rewrites
&gt; shows/lists with -debug suffix).  It is far easier to change a single key on
&gt; the design doc (or whatever doc is presented to the _rewrite function) than
&gt; to require that user to download and install couchapp, edit the correct
&gt; files and redeploy.
&gt;
&gt; (*) As CouchDB becomes more successful the administrators and users of
&gt; CouchApps will increasingly have no knowledge of Javascript, what REST is,
&gt; how all the pieces fit together etc.  Consider trying to explain how to
&gt; change a rewrite function versus telling them to go to futon and change a
&gt; key in the appropriate doc.

I'm inclined to agree with you. I'm working on a patch to make it so
the show and list funs have access to the entire design document. This
should facilitate what you are asking for.

Chris

&gt;
&gt; Roger
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.4.9 (GNU/Linux)
&gt; Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
&gt;
&gt; iEYEARECAAYFAksbVBwACgkQmOOfHg372QS2uACgpeEMnCcp0ofbZxqSGg7UOeKZ
&gt; /zIAnRZNz3BJuE1G7SQlR4cOKzwfCIcy
&gt; =7lFb
&gt; -----END PGP SIGNATURE-----
&gt;
&gt;



-- 
Chris Anderson
http://jchrisa.net
http://couch.io


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chffk6t$93i$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chffk6t$93i$1@ger-gmane-org%3e</id>
<updated>2009-12-06T06:50:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benoit Chesneau wrote:
&gt; Well rewrite need to be fast. I don't like the idea of loading another
&gt; doc. However since ddoc is already loaded  it could be used in. We
&gt; just spoke with jchris about such possibily. I think that it will do
&gt; the trick.

That is certainly better in my opinion than no doc at all.

&gt; You don't need to regerenate code you can use couchapp macro or any
&gt; templating system in current solution. 

You are thinking as though you maintain couchapp :-)  Sure that is no
problem for the developer of a CouchApp but consider what happens once you
deploy it.  For example lets say there is a blogging CouchApp that people(*)
use and it has a debugging mode implemented by a rewrite  (eg it rewrites
shows/lists with -debug suffix).  It is far easier to change a single key on
the design doc (or whatever doc is presented to the _rewrite function) than
to require that user to download and install couchapp, edit the correct
files and redeploy.

(*) As CouchDB becomes more successful the administrators and users of
CouchApps will increasingly have no knowledge of Javascript, what REST is,
how all the pieces fit together etc.  Consider trying to explain how to
change a rewrite function versus telling them to go to futon and change a
key in the appropriate doc.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksbVBwACgkQmOOfHg372QS2uACgpeEMnCcp0ofbZxqSGg7UOeKZ
/zIAnRZNz3BJuE1G7SQlR4cOKzwfCIcy
=7lFb
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Benoit Chesneau &lt;bchesneau@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cb7cd8ed10912051710l763f4721h47431584e8ab2084@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb7cd8ed10912051710l763f4721h47431584e8ab2084@mail-gmail-com%3e</id>
<updated>2009-12-06T01:10:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sun, Dec 6, 2009 at 12:27 AM, Roger Binns &lt;rogerb@rogerbinns.com&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Benoit Chesneau wrote:
&gt;&gt; ? there is no prescribed behaviour
&gt;
&gt; With your current proposal behaviour is entirely determined by a Javascript
&gt; function.  What I am proposing is that Javascript function also be given a
&gt; doc as input to do with as it pleases.  There is no requirement for the doc
&gt; to exist or the Javascript to pay any attention to it.

Well rewrite need to be fast. I don't like the idea of loading another
doc. However since ddoc is already loaded  it could be used in. We
just spoke with jchris about such possibily. I think that it will do
the trick.


&gt;
&gt;&gt; main point of _rewrite handler is to rewrite urls in a couchdb node or
&gt;&gt; even cluster not on different subnets.
&gt;
&gt; You missed my point.  As an example a rewrite to a different show on the
&gt; same server:
&gt;
&gt; function (req) {
&gt;  if (req.path ... matches ... "show/details")
&gt;    {
&gt;       if( isinternal(req) )
&gt;           return "... show/details-internal";
&gt;       return ".... show/details-public";
&gt;    }
&gt; }
&gt;
&gt; Now the isinternal function needs to look at the IP address and would
&gt; typically have a table of internal addresses.  With the current scheme that
&gt; table would have to be built into the Javascript.

I don't see to have it in js is a problem. For the function needed to
test the ip I think we could need to add the ip in headers of request
object.
However I would stronly recommend to not rely on such function if you
need security. It's better to use a proxy and pass right auth headers.


&gt;
&gt;&gt; system to rewrite urls. Sometimes you want to rewrite depending on
&gt;&gt; http verb, other depending on auth or simply on path and there are
&gt;&gt; different need for rewriting on patch too.  The current design allow
&gt;&gt; you to define your own way to do this. You could always make a
&gt;&gt; template that allows you to create your own set of rules.
&gt;
&gt; With your current proposal, code has to look like this:
&gt;
&gt; function (req) {
&gt;   var data={ ... a bunch of data ... };
&gt;
&gt;   if/return/etc looking at the req and data
&gt; }
&gt;
&gt; What I am asking for is the ability to have it like this:
&gt;
&gt; function (req, doc) {
&gt;   if/return/etc looking at the req and data in doc
&gt; }
&gt;
&gt; With your current proposal, changing the data used by the function requires
&gt; regenerating Javascript code.  If the data can (optionally) live in a
&gt; document then no code generation is required nor is rewriting the design doc.
&gt;
&gt; I would expect developers to come up with some useful rewriters.  For
&gt; example maybe one that switches between production and development mode.  Or
&gt; maybe some sort of aliasing as you suggested.  It would be nice to be able
&gt; to control their behaviour by editing the contents of a regular doc rather
&gt; than having to edit Javascript code and regenerating design docs.
&gt;

You don't need to regerenate code you can use couchapp macro or any
templating system in current solution. However if you have access to
ddoc in function, you won't have to do this even.

- benoît


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chfeq8h$pij$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chfeq8h$pij$1@ger-gmane-org%3e</id>
<updated>2009-12-05T23:27:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benoit Chesneau wrote:
&gt; ? there is no prescribed behaviour

With your current proposal behaviour is entirely determined by a Javascript
function.  What I am proposing is that Javascript function also be given a
doc as input to do with as it pleases.  There is no requirement for the doc
to exist or the Javascript to pay any attention to it.

&gt; main point of _rewrite handler is to rewrite urls in a couchdb node or
&gt; even cluster not on different subnets.

You missed my point.  As an example a rewrite to a different show on the
same server:

function (req) {
  if (req.path ... matches ... "show/details")
    {
       if( isinternal(req) )
           return "... show/details-internal";
       return ".... show/details-public";
    }
}

Now the isinternal function needs to look at the IP address and would
typically have a table of internal addresses.  With the current scheme that
table would have to be built into the Javascript.

&gt; system to rewrite urls. Sometimes you want to rewrite depending on
&gt; http verb, other depending on auth or simply on path and there are
&gt; different need for rewriting on patch too.  The current design allow
&gt; you to define your own way to do this. You could always make a
&gt; template that allows you to create your own set of rules.

With your current proposal, code has to look like this:

function (req) {
   var data={ ... a bunch of data ... };

   if/return/etc looking at the req and data
}

What I am asking for is the ability to have it like this:

function (req, doc) {
   if/return/etc looking at the req and data in doc
}

With your current proposal, changing the data used by the function requires
regenerating Javascript code.  If the data can (optionally) live in a
document then no code generation is required nor is rewriting the design doc.

I would expect developers to come up with some useful rewriters.  For
example maybe one that switches between production and development mode.  Or
maybe some sort of aliasing as you suggested.  It would be nice to be able
to control their behaviour by editing the contents of a regular doc rather
than having to edit Javascript code and regenerating design docs.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksa7EwACgkQmOOfHg372QRcxQCggrhGm8SYYAtGcvAyjE9YHhO1
1kcAoISIPlwFw85odHKooYcaiXsUzDut
=EvTt
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Benoit Chesneau &lt;bchesneau@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cb7cd8ed10912051445m99310d9l82b34296828d6eba@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb7cd8ed10912051445m99310d9l82b34296828d6eba@mail-gmail-com%3e</id>
<updated>2009-12-05T22:45:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 8:15 PM, Roger Binns &lt;rogerb@rogerbinns.com&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Benoit Chesneau wrote:
&gt;&gt; what would do this doc?
&gt;
&gt; Nothing in particular - it would just be provided to the _rewrite handler
&gt; Javascript code to do with as it pleases with no prescribed behaviour.

? there is no prescribed behaviour

&gt;
&gt; The ways I would use it if it existed:
&gt;
&gt; - - Rewrite to different URIs depending on if the request comes from an
&gt; internal or external location.  The doc would have a list of subnets
&gt; considered internal.

main point of _rewrite handler is to rewrite urls in a couchdb node or
even cluster not on different subnets. Proxies are better for that.

&gt;
&gt; - - If my app had 10 components, I'd store in the doc which ones are active
&gt; and which disabled (eg disabled ones could be redirected to a page
&gt; explaining that).

not sure to understand here why it couldn't works. make your rules per
component. If you want ro be restful anyway, rules are per resources
&gt;
&gt; - - I'd prefer to have my rules listed as data with my Javascript code
&gt; applying them.  With the current approach a Javascript has to be regenerated
&gt; on any rule change.
&gt;

urls don't change often. Current system allows you to define your own
system to rewrite urls. Sometimes you want to rewrite depending on
http verb, other depending on auth or simply on path and there are
different need for rewriting on patch too.  The current design allow
you to define your own way to do this. You could always make a
template that allows you to create your own set of rules.

One other handler I have in mind is an alias handler who could keep
results based on a view so you could eventually associate alias to
docid and useit as url. Useful for shows for example. But that's just
an idea for now.

- benoît


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chfebfo$if0$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chfebfo$if0$1@ger-gmane-org%3e</id>
<updated>2009-12-05T19:15:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benoit Chesneau wrote:
&gt; what would do this doc?

Nothing in particular - it would just be provided to the _rewrite handler
Javascript code to do with as it pleases with no prescribed behaviour.

The ways I would use it if it existed:

- - Rewrite to different URIs depending on if the request comes from an
internal or external location.  The doc would have a list of subnets
considered internal.

- - If my app had 10 components, I'd store in the doc which ones are active
and which disabled (eg disabled ones could be redirected to a page
explaining that).

- - I'd prefer to have my rules listed as data with my Javascript code
applying them.  With the current approach a Javascript has to be regenerated
on any rule change.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksasTMACgkQmOOfHg372QQi/gCfZkuPASwI4562apjU7CMOcBs5
dMUAoK4Nmy8rVJcP8AK+s7A2Ma1nyJBc
=Tjfo
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: View Internal API</title>
<author><name>Chris Anderson &lt;jchris@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3ce282921e0912051057o4de10dc6y91eed76090ac319@mail.gmail.com%3e"/>
<id>urn:uuid:%3ce282921e0912051057o4de10dc6y91eed76090ac319@mail-gmail-com%3e</id>
<updated>2009-12-05T18:57:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 7:14 AM, Jan Lehnardt &lt;jan@apache.org&gt; wrote:
&gt;
&gt; On 24 Nov 2009, at 06:14, Paul Davis wrote:
&gt;
&gt;&gt; Dev People,
&gt;&gt;
&gt;&gt; Its no secret that I've been trying to find a reason to delete all of
&gt;&gt; the temp_view logic in the view code. I was just discussing the
&gt;&gt; internal view API with Adam Kocoloski on IRC and it hit me that with
&gt;&gt; the index-filename-from-md5 patch that Chris Anderson landed a while
&gt;&gt; ago could make it all go away.
&gt;&gt;
&gt;&gt; The proposed API would be something like:
&gt;&gt;
&gt;&gt; couch_view:get_view(DesignDoc) -&gt; #view{}
&gt;&gt;
&gt;&gt; Where DesignDoc is the ErlJSON representation of that design doc. Then
&gt;&gt; temp_views would just create the ErlJSON representation (without
&gt;&gt; saving that doc in the DB) and pass it to the view update mechanics.
&gt;&gt; Cleaning up old temp views would then just use the existing cleanup
&gt;&gt; mechanism we already have in place.
&gt;&gt;
&gt;&gt; AFAICT, this doesn't introduce any sort of oddities that don't already
&gt;&gt; exist and provides better semantics for promoting a temp_view to a
&gt;&gt; permanent view because the index wouldn't need to be rebuilt.
&gt;&gt;
&gt;&gt; Then again I'm a bit tired so I could be off my rocker. Anyone see
&gt;&gt; anything obviously wrong?
&gt;
&gt; The only thing I'd advocate is that we make it more apparent in Futon
&gt; that view cleanup is needed. Otherwise, I like the idea of removing that
&gt; code.
&gt;

So the idea is that this wouldn't change the HTTP API, just how it's
implemented? If so, then by all means yes.

If you are going to work on this, I think it should be done on top of
my design doc handlers patch [1], as I'm already moving the loading of
the design doc to the front of the request handling. The changes
you'll have to make to make this happen will play right into the rest
of that patch.

I'm glad we found a synergy here - I knew the patch would make things
simpler but I didn't realize it would help with this too.

Chris

[1] http://issues.apache.org/jira/browse/COUCHDB-589 (I have done more
work in git, I'll make that available asap)



-- 
Chris Anderson
http://jchrisa.net
http://couch.io


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: View Internal API</title>
<author><name>Jan Lehnardt &lt;jan@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c2EA70263-AF3F-4E09-B302-66599664E8C3@apache.org%3e"/>
<id>urn:uuid:%3c2EA70263-AF3F-4E09-B302-66599664E8C3@apache-org%3e</id>
<updated>2009-12-05T15:14:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

On 24 Nov 2009, at 06:14, Paul Davis wrote:

&gt; Dev People,
&gt; 
&gt; Its no secret that I've been trying to find a reason to delete all of
&gt; the temp_view logic in the view code. I was just discussing the
&gt; internal view API with Adam Kocoloski on IRC and it hit me that with
&gt; the index-filename-from-md5 patch that Chris Anderson landed a while
&gt; ago could make it all go away.
&gt; 
&gt; The proposed API would be something like:
&gt; 
&gt; couch_view:get_view(DesignDoc) -&gt; #view{}
&gt; 
&gt; Where DesignDoc is the ErlJSON representation of that design doc. Then
&gt; temp_views would just create the ErlJSON representation (without
&gt; saving that doc in the DB) and pass it to the view update mechanics.
&gt; Cleaning up old temp views would then just use the existing cleanup
&gt; mechanism we already have in place.
&gt; 
&gt; AFAICT, this doesn't introduce any sort of oddities that don't already
&gt; exist and provides better semantics for promoting a temp_view to a
&gt; permanent view because the index wouldn't need to be rebuilt.
&gt; 
&gt; Then again I'm a bit tired so I could be off my rocker. Anyone see
&gt; anything obviously wrong?

The only thing I'd advocate is that we make it more apparent in Futon
that view cleanup is needed. Otherwise, I like the idea of removing that
code.

Cheers
Jan
--



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Benoit Chesneau &lt;bchesneau@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cb7cd8ed10912050048o25049b0en41d58b7c31142e31@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb7cd8ed10912050048o25049b0en41d58b7c31142e31@mail-gmail-com%3e</id>
<updated>2009-12-05T08:48:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Saturday, December 5, 2009, Roger Binns &lt;rogerb@rogerbinns.com&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Benoit Chesneau wrote:
&gt;&gt; The design is very simple. Everything is managed via a simple
&gt;&gt; javascript function that return a path or throw 'forbidden',
&gt;&gt; 'unauthorized' and "not found" errors. The request object is passed to
&gt;&gt; the function and then depending on the path, verb or userCtx you could
&gt;&gt; decide how to rewrite the path.
&gt;
&gt; Is there any chance it could a document too?  For example it would be really
&gt; nice if there was a document with an _id of "_rewrite_config" (or something
&gt; similar) that was also passed to the function.  That document can then help
&gt; parameterize what the rewriter does.
&gt;
&gt; Roger
what would do this doc?


</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Noah Slater (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1536051779.1259979320631.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1536051779-1259979320631-JavaMail-jira@brutus%3e</id>
<updated>2009-12-05T02:15:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786312#action_12786312
] 

Noah Slater commented on COUCHDB-592:
-------------------------------------

I am happy to review and apply a patch that adds this as an option to configure, as long as
the actual build is taken care of properly.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Roger Binns &lt;rogerb@rogerbinns.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3chfcetd$9bi$1@ger.gmane.org%3e"/>
<id>urn:uuid:%3chfcetd$9bi$1@ger-gmane-org%3e</id>
<updated>2009-12-05T02:01:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benoit Chesneau wrote:
&gt; The design is very simple. Everything is managed via a simple
&gt; javascript function that return a path or throw 'forbidden',
&gt; 'unauthorized' and "not found" errors. The request object is passed to
&gt; the function and then depending on the path, verb or userCtx you could
&gt; decide how to rewrite the path.

Is there any chance it could a document too?  For example it would be really
nice if there was a document with an _id of "_rewrite_config" (or something
similar) that was also passed to the function.  That document can then help
parameterize what the rewriter does.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksZvu0ACgkQmOOfHg372QRHXQCdFT2mpbYNpocVrs4vwhjL1xgc
2mAAoLMfzx3zOlEyasKK3hsc/cnqkvHv
=Qj3u
-----END PGP SIGNATURE-----



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: _rewrite handler</title>
<author><name>Vlad GURDIGA &lt;gurdiga@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cda7069940912041714y2c8dd416n9ac0014253881f12@mail.gmail.com%3e"/>
<id>urn:uuid:%3cda7069940912041714y2c8dd416n9ac0014253881f12@mail-gmail-com%3e</id>
<updated>2009-12-05T01:14:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
This thing was long awaited!

Thank you for the effort, BenoÃ®t!

On Fri, Dec 4, 2009 at 6:30 PM, Benoit Chesneau &lt;bchesneau@gmail.com&gt; wrote:
&gt; Hi all,
&gt;
&gt; I created a branch* Â based on trunk on my Github repository that
&gt; allows url rewriting in CouchDB:
&gt;
&gt; http://github.com/benoitc/couchdb/tree/rewrite
&gt;
&gt; The design is very simple. Everything is managed via a simple
&gt; javascript function that return a path or throw 'forbidden',
&gt; 'unauthorized' and "not found" errors. The request object is passed to
&gt; the function and then depending on the path, verb or userCtx you could
&gt; decide how to rewrite the path. All relatives path are relative to
&gt; design doc.
&gt;
&gt; Â The _rewriter is available at db or _design level :
&gt;
&gt; /db/_rewrite/designname/path
&gt;
&gt; or
&gt;
&gt; /db/_design/designame/_rewrite/path.
&gt;
&gt;
&gt; Then _rewrite handler look in design doc if `rewrite` member exists
&gt; and load the function.
&gt;
&gt; Little snippets from tests :
&gt;
&gt; function(req) {
&gt; Â  Â path = "/" + req.path.join('/');
&gt;
&gt; Â  Â if (path == "/forbidden") {
&gt; Â  Â  Â  Â throw {
&gt; Â  Â  Â  Â  Â  Â forbidden:
&gt; Â  Â  Â  Â  Â  Â "path forbidden"
&gt; Â  Â  Â  Â };
&gt; Â  Â }
&gt; Â  Â if (path == "/unauthorized") {
&gt; Â  Â  Â  Â throw {
&gt; Â  Â  Â  Â  Â  Â unauthorized:
&gt; Â  Â  Â  Â  Â  Â "path not authorized"
&gt; Â  Â  Â  Â };
&gt; Â  Â }
&gt; Â  Â if (path == "/notfound") {
&gt; Â  Â  Â  Â throw {
&gt; Â  Â  Â  Â  Â  Â not_found:
&gt; Â  Â  Â  Â  Â  Â "path not found"
&gt; Â  Â  Â  Â };
&gt; Â  Â }
&gt;
&gt; Â  Â if (path == "/foo") {
&gt; Â  Â  Â  Â return "foo.txt"
&gt; Â  Â }
&gt;
&gt; Â  Â var matches = path.match(/^\/hello\/(\w.+)$/);
&gt;
&gt; Â  Â if (matches[1]) {
&gt; Â  Â  Â  Â if (req.verb == "DELETE") {
&gt; Â  Â  Â  Â  Â  Â throw {
&gt; Â  Â  Â  Â  Â  Â  Â  Â forbidden:
&gt; Â  Â  Â  Â  Â  Â  Â  Â "delete is forbidden"
&gt; Â  Â  Â  Â  Â  Â };
&gt; Â  Â  Â  Â }
&gt; Â  Â  Â  Â return "_update/hello/" + matches[1];
&gt; Â  Â }
&gt; }
&gt;
&gt;
&gt; let me know if it's ok for you,
&gt;
&gt; - benoÃ®t
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [ANNOUNCE] Apache CouchDB 0.10.1 has been released</title>
<author><name>Vlad GURDIGA &lt;gurdiga@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cda7069940912041711i1c165bb4wde61a9a809f0a91e@mail.gmail.com%3e"/>
<id>urn:uuid:%3cda7069940912041711i1c165bb4wde61a9a809f0a91e@mail-gmail-com%3e</id>
<updated>2009-12-05T01:11:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Gut! =)

On Thu, Dec 3, 2009 at 9:21 PM, Noah Slater &lt;nslater@tumbolia.org&gt; wrote:
&gt; Hello,
&gt;
&gt; Apache CouchDB 0.10.1 has been released and is available for download:
&gt;
&gt; Â  Â  Â  Â http://couchdb.apache.org/downloads.html
&gt;
&gt; Changes in this release:
&gt;
&gt; Â  Â  Â  Â * Fixed test suite to work with build system.
&gt; Â  Â  Â  Â * Fixed a problem with statistics timers and system sleep.
&gt; Â  Â  Â  Â * Fixed an edge case for HTTP redirects during replication.
&gt; Â  Â  Â  Â * Fixed HTTP timeout handling for replication.
&gt; Â  Â  Â  Â * Fixed query parameter handling in OAuthâ€™d replication.
&gt; Â  Â  Â  Â * Fixed a bug preventing mixing languages with lists and views.
&gt; Â  Â  Â  Â * Avoid OS process leaks in lists.
&gt;
&gt; CouchDB is a document-oriented database that can be queried and indexed in a MapReduce
fashion using JavaScript. CouchDB also offers incremental replication with bi-directional
conflict detection and resolution.
&gt;
&gt; CouchDB provides a RESTful JSON API than can be accessed from any environment that allows
HTTP requests. There are myriad third-party client libraries that make this even easier from
your programming language of choice. CouchDB's built in Web administration console speaks
directly to the database using HTTP requests issued from your browser.
&gt;
&gt; CouchDB is written in Erlang, a robust functional programming language ideal for building
concurrent distributed systems. Erlang allows for a flexible design that is easily scalable
and readily extensible.
&gt;
&gt; Relax and prosper,
&gt;
&gt; Noah


</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Paul Joseph Davis (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1995689134.1259970080641.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1995689134-1259970080641-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T23:41:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786243#action_12786243
] 

Paul Joseph Davis commented on COUCHDB-592:
-------------------------------------------

The downside is on the theoretical side and for me its a hold the line type of position. I
wouldn't veto a patch for it but I'm not about to write it.

The issue is that once we start doing allowing the official releases to have all sorts of
conditional compilation options we have to officially support each permutation of those options.
Spending extra time tracking down weird compilation configurations is not something I would
enjoy.

And there's also the fact that this is a pretty easy hack to remove all parts of the build
system that'd require JS, cURL, and ICU. And the build system doesn't change *that* often
so it wouldn't be hard too hard to keep in sync outside of trunk.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Ari Lerner (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c370980087.1259960360690.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c370980087-1259960360690-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:59:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786159#action_12786159
] 

Ari Lerner commented on COUCHDB-592:
------------------------------------

Perhaps I'm mistaken, but I don't see the downsides to providing a --without-js-libs option
to the configure script...

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Paul Joseph Davis (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c640501283.1259960120697.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c640501283-1259960120697-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:55:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786157#action_12786157
] 

Paul Joseph Davis commented on COUCHDB-592:
-------------------------------------------

Also, I should mention that I don't really foresee providing this as part of any official
distribution. Its pretty core to CouchDB to provide these things, and removing them should
be considered a private modification. It really shouldn't be too hard though.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Paul Joseph Davis (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1175772825.1259960120631.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1175772825-1259960120631-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:55:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786156#action_12786156
] 

Paul Joseph Davis commented on COUCHDB-592:
-------------------------------------------

Don't forget the ICU dependency that you'd have to remove as well then.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Ari Lerner (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1679742161.1259960000630.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1679742161-1259960000630-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:53:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786155#action_12786155
] 

Ari Lerner commented on COUCHDB-592:
------------------------------------

That's exactly what I want Glenn.

The extra dependency of the JS library is limiting and somewhat of a deal-breaker for the
project I'm working on (in an environment where every dependency is a hurdle for implementation)

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Glenn Rempe (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1199825833.1259959760661.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1199825833-1259959760661-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:49:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786150#action_12786150
] 

Glenn Rempe commented on COUCHDB-592:
-------------------------------------

Noah,

I believe you can use CouchDB without http access if you use the Hovercraft Erlang library.

http://github.com/jchris/hovercraft
http://github.com/grempe/hovercraft (Includes fixes for trunk couchdb pending merge to jchris
master)

If you mixed that with Erlang views wouldn't that be a reason to want to eliminate any external
build time dependencies other than Erlang?  CouchDB should optimally be able to operate in
pure erlang mode. No?  This is something the couchdb team should encourage imho.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Paul Joseph Davis (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c1442600099.1259957180634.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1442600099-1259957180634-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T20:06:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786121#action_12786121
] 

Paul Joseph Davis commented on COUCHDB-592:
-------------------------------------------

The quickest thing to do would be to delete the relevant sections from configure.ac and src/couchdb/priv/Makefile
to avoid that. Though be aware that at some time in the nearish future JS might be a test
time dependency so you won't be able to run the test suite from make check.



&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Ari Lerner (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c2037780141.1259954360760.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c2037780141-1259954360760-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T19:19:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786088#action_12786088
] 

Ari Lerner commented on COUCHDB-592:
------------------------------------

I don't want to have to require the SpiderMonkey javascript library when building couch.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Noah Slater (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c946745183.1259953880759.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c946745183-1259953880759-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T19:11:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COUCHDB-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786082#action_12786082
] 

Noah Slater commented on COUCHDB-592:
-------------------------------------

I'm not sure what you want.

Do you want to be able to disable the building of any JS component at all? Why?

What has that to do with HTTP? There is no way to use CouchDB without using HTTP at the emoment.

&gt; Build and configure without the js library
&gt; ------------------------------------------
&gt;
&gt;                 Key: COUCHDB-592
&gt;                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
&gt;             Project: CouchDB
&gt;          Issue Type: New Feature
&gt;          Components: Build System
&gt;         Environment: Any?
&gt;            Reporter: Ari Lerner
&gt;
&gt; I am trying to use couchdb without the requirements of the js library. I will not be
accessing couch (nor do I want access) through an http interface, but an erlang client library.

&gt; Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Ang.: Re: using Erlang's debugger with couchdb</title>
<author><name>Robert Dionne &lt;dionne@dionne-associates.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cE95FF14B-638E-42A1-91FD-1D2EF36FF5E2@dionne-associates.com%3e"/>
<id>urn:uuid:%3cE95FF14B-638E-42A1-91FD-1D2EF36FF5E2@dionne-associates-com%3e</id>
<updated>2009-12-04T19:05:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
interesting. I just tried this in Distel and am able to step through it just fine. I would
think at some level Distel is using the Erlang debugger.




On Dec 4, 2009, at 1:48 PM, Filipe David Manana wrote:

&gt; Hello,
&gt; thanks for the suggestion Torbjörn, I had not yet the time to test it
&gt; but it seems promising (I am mostly an Emacs user also). It's on my
&gt; todo list now.
&gt; 
&gt; I found the cause of the problem. When debugging using Erlang's
&gt; debugger, he considers the Length variable used in the second case
&gt; statement  (attribution to #att.len) to be already bound. This is so
&gt; because the previous case statement also uses a variable named Length
&gt; in 2 of its branches.
&gt; 
&gt; Just renaming the second one from Length to Length2
&gt; (chouch_httpd_db.erl line 1045) avoids the badmatch error:
&gt; 
&gt;            [#att{
&gt;                name = FileName,
&gt;                type = case couch_httpd:header_value(Req,"Content-Type") of
&gt;                    undefined -&gt;
&gt;                        % We could throw an error here or guess by the FileName.
&gt;                        % Currently, just giving it a default.
&gt;                        &lt;&lt;"application/octet-stream"&gt;&gt;;
&gt;                    CType -&gt;
&gt;                        list_to_binary(CType)
&gt;                    end,
&gt;                data = case couch_httpd:body_length(Req) of
&gt;                    undefined -&gt;
&gt;                        &lt;&lt;""&gt;&gt;;
&gt;                    {unknown_transfer_encoding, Unknown} -&gt;
&gt;                        exit({unknown_transfer_encoding, Unknown});
&gt;                    chunked -&gt;
&gt;                        fun(MaxChunkSize, ChunkFun, InitState) -&gt;
&gt;                            couch_httpd:recv_chunked(Req, MaxChunkSize,
&gt;                                ChunkFun, InitState)
&gt;                        end;
&gt;                    0 -&gt;
&gt;                        &lt;&lt;""&gt;&gt;;
&gt;                    Length when is_integer(Length) -&gt;
&gt;                        fun() -&gt; couch_httpd:recv(Req, 0) end;
&gt;                    Length -&gt;
&gt;                        exit({length_not_integer, Length})
&gt;                    end,
&gt;                len = case couch_httpd:header_value(Req,"Content-Length") of
&gt;                    undefined -&gt;
&gt;                        undefined;
&gt;                    Length2 -&gt;
&gt;                        list_to_integer(Length2)
&gt;                    end
&gt;                    }]
&gt;    end,
&gt; 
&gt; I wonder why this badmatch error only occurs when interpreting the
&gt; code with the debugger and not during normal execution.
&gt; Anyone has a clue?
&gt; 
&gt; cheers
&gt; 
&gt; 2009/12/2 Torbjörn Törnkvist &lt;tobbe@klarna.com&gt;:
&gt;&gt; For some more light weight debugging I can recomend redbug.  It is included
&gt;&gt; in the eper repo at google code.
&gt;&gt; 
&gt;&gt; --Tobbe
&gt;&gt; 
&gt;&gt; Den 12 1, 2009 11:50 PM, "Robert Dionne" &lt;dionne@dionne-associates.com&gt;
&gt;&gt; skrev:
&gt;&gt; 
&gt;&gt; I've had great luck using Distel[1]  on top of aquamacs. Bill Clementson
&gt;&gt; wrote a couple of nice how to pieces[2] to get you started. Works like a
&gt;&gt; champ
&gt;&gt; 
&gt;&gt; [1] http://github.com/bdionne/distel
&gt;&gt; [2] http://bc.tech.coop/blog/070528.html
&gt;&gt; 
&gt;&gt; On Dec 1, 2009, at 5:34 PM, Filipe David Manana wrote: &gt; Hello, &gt; &gt; I am
&gt;&gt; having a strange sit...
&gt;&gt; 
&gt; 
&gt; 
&gt; 
&gt; -- 
&gt; Filipe David Manana,
&gt; fdmanana@gmail.com
&gt; PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0xC569452B
&gt; 
&gt; "Reasonable men adapt themselves to the world.
&gt; Unreasonable men adapt the world to themselves.
&gt; That's why all progress depends on unreasonable men."



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Ang.: Re: using Erlang's debugger with couchdb</title>
<author><name>Filipe David Manana &lt;fdmanana@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3ccadf1c690912041048h589e3fd0s886294f640bafe49@mail.gmail.com%3e"/>
<id>urn:uuid:%3ccadf1c690912041048h589e3fd0s886294f640bafe49@mail-gmail-com%3e</id>
<updated>2009-12-04T18:48:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,
thanks for the suggestion TorbjÃ¶rn, I had not yet the time to test it
but it seems promising (I am mostly an Emacs user also). It's on my
todo list now.

I found the cause of the problem. When debugging using Erlang's
debugger, he considers the Length variable used in the second case
statement  (attribution to #att.len) to be already bound. This is so
because the previous case statement also uses a variable named Length
in 2 of its branches.

Just renaming the second one from Length to Length2
(chouch_httpd_db.erl line 1045) avoids the badmatch error:

            [#att{
                name = FileName,
                type = case couch_httpd:header_value(Req,"Content-Type") of
                    undefined -&gt;
                        % We could throw an error here or guess by the FileName.
                        % Currently, just giving it a default.
                        &lt;&lt;"application/octet-stream"&gt;&gt;;
                    CType -&gt;
                        list_to_binary(CType)
                    end,
                data = case couch_httpd:body_length(Req) of
                    undefined -&gt;
                        &lt;&lt;""&gt;&gt;;
                    {unknown_transfer_encoding, Unknown} -&gt;
                        exit({unknown_transfer_encoding, Unknown});
                    chunked -&gt;
                        fun(MaxChunkSize, ChunkFun, InitState) -&gt;
                            couch_httpd:recv_chunked(Req, MaxChunkSize,
                                ChunkFun, InitState)
                        end;
                    0 -&gt;
                        &lt;&lt;""&gt;&gt;;
                    Length when is_integer(Length) -&gt;
                        fun() -&gt; couch_httpd:recv(Req, 0) end;
                    Length -&gt;
                        exit({length_not_integer, Length})
                    end,
                len = case couch_httpd:header_value(Req,"Content-Length") of
                    undefined -&gt;
                        undefined;
                    Length2 -&gt;
                        list_to_integer(Length2)
                    end
                    }]
    end,

I wonder why this badmatch error only occurs when interpreting the
code with the debugger and not during normal execution.
Anyone has a clue?

cheers

2009/12/2 TorbjÃ¶rn TÃ¶rnkvist &lt;tobbe@klarna.com&gt;:
&gt; For some more light weight debugging I can recomend redbug. Â It is included
&gt; in the eper repo at google code.
&gt;
&gt; --Tobbe
&gt;
&gt; Den 12 1, 2009 11:50 PM, "Robert Dionne" &lt;dionne@dionne-associates.com&gt;
&gt; skrev:
&gt;
&gt; I've had great luck using Distel[1] Â on top of aquamacs. Bill Clementson
&gt; wrote a couple of nice how to pieces[2] to get you started. Works like a
&gt; champ
&gt;
&gt; [1] http://github.com/bdionne/distel
&gt; [2] http://bc.tech.coop/blog/070528.html
&gt;
&gt; On Dec 1, 2009, at 5:34 PM, Filipe David Manana wrote: &gt; Hello, &gt; &gt; I am
&gt; having a strange sit...
&gt;



-- 
Filipe David Manana,
fdmanana@gmail.com
PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0xC569452B

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."


</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (COUCHDB-592) Build and configure without the js library</title>
<author><name>&quot;Ari Lerner (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c183351822.1259952320632.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c183351822-1259952320632-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T18:45:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Build and configure without the js library
------------------------------------------

                 Key: COUCHDB-592
                 URL: https://issues.apache.org/jira/browse/COUCHDB-592
             Project: CouchDB
          Issue Type: New Feature
          Components: Build System
         Environment: Any?
            Reporter: Ari Lerner


I am trying to use couchdb without the requirements of the js library. I will not be accessing
couch (nor do I want access) through an http interface, but an erlang client library. 

Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Updating the CouchDB roadmap</title>
<author><name>Robert Newson &lt;robert.newson@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c46aeb24f0912041017p51523be9m6045428baea87dea@mail.gmail.com%3e"/>
<id>urn:uuid:%3c46aeb24f0912041017p51523be9m6045428baea87dea@mail-gmail-com%3e</id>
<updated>2009-12-04T18:17:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Support for compressed attachments? I think there's a ticket for it,
but the basic idea is to support Accept-Encoding/Content-Encoding form
the client and store the attachment with compression (and
decompressing on demand).

A bulk insertion endpoint that included attachments (without base64
inflation) would also be nice.

On Fri, Dec 4, 2009 at 5:55 PM, Dirkjan Ochtman &lt;djc.ochtman@gmail.com&gt; wrote:
&gt; On Fri, Dec 4, 2009 at 18:32, Noah Slater &lt;nslater@tumbolia.org&gt; wrote:
&gt;&gt; Hey, does anyone want to start the discussion off?
&gt;
&gt; Question from one of those trailing around on actual releases, that
&gt; may help getting started: what big-ticket features are in trunk, but
&gt; not 0.10.1?
&gt;
&gt; Cheers,
&gt;
&gt; Dirkjan
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Updating the CouchDB roadmap</title>
<author><name>Dirkjan Ochtman &lt;djc.ochtman@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3cea2499da0912040955v27500932t97476b63335f5159@mail.gmail.com%3e"/>
<id>urn:uuid:%3cea2499da0912040955v27500932t97476b63335f5159@mail-gmail-com%3e</id>
<updated>2009-12-04T17:55:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Fri, Dec 4, 2009 at 18:32, Noah Slater &lt;nslater@tumbolia.org&gt; wrote:
&gt; Hey, does anyone want to start the discussion off?

Question from one of those trailing around on actual releases, that
may help getting started: what big-ticket features are in trunk, but
not 0.10.1?

Cheers,

Dirkjan


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Updating the CouchDB roadmap</title>
<author><name>Noah Slater &lt;nslater@tumbolia.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/couchdb-dev/200912.mbox/%3c7FA8B434-5788-43D9-AA0D-AD77E8B72A53@tumbolia.org%3e"/>
<id>urn:uuid:%3c7FA8B434-5788-43D9-AA0D-AD77E8B72A53@tumbolia-org%3e</id>
<updated>2009-12-04T17:32:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

On 3 Dec 2009, at 19:29, Noah Slater wrote:

&gt; As part of the release procedure, this is a request to update the roadmap document:
&gt; 
&gt; 	http://couchdb.apache.org/roadmap.html
&gt; 
&gt; Please comment on what should be added, and what should be removed.
&gt; 
&gt; After a we reach consensus, I will update the roadmap.

Hey, does anyone want to start the discussion off?

</pre>
</div>
</content>
</entry>
</feed>
