Alex Schenkman | 19 Apr 17:48 2014

How to delay view responses until index is rebuilt

Hi list,

According to what I see in the logs and the results I get, the following
might be happening. Given that:

1) I update a document (using an update handler)
2) Couch starts an index update
3) I request a view
4) I get the "old" view results
5) Couch finnish its re-indexing
6) I request the same view again
7) I get the new view results

I understand why this might be happening, but in my use case, I woud prefer
couch delaying the answer to the view request, until the index is rebuilt.
That is, once I update a document, I want views to reflect the change. Even
if this means being unresponsive for a second.

Is it possible to tell couch to behave this way?
I could not find any setting for this in the config file.

Thanks in advance!
Alex Schenkman | 18 Apr 21:46 2014

Howto delay view requests until indexes are rebuilt

Hi list,

According to what I see in the logs and the results I get, the following
might be happening. Given that:

1) I update a document (using an update handler)
2) Couch starts an index update
3) I request a view
4) I get the "old" view results
5) Couch finnish its re-indexing
6) I request the same view again
7) I get the new view results

I understand why this is happening, but in my use case, I woud prefer couch
delaying the answer to the view request, until the index is rebuilt.
Is it possible to tell couch to behave this way?
I could not find any setting for this in the config file.

Thanks in advance!
Omer Yousaf | 17 Apr 16:21 2014
Picon

Installing CouchDB from Source: Problem Installing SpiderMonkey1.8.5

Hi,
In installing CouchDB from source I am stuck at the installing
SpiderMonkey1.8.5 step. In order to run the ./configure command for couchdb
I must specify paths "--with-js-lib" and "--with-js-include" but failing to
install SpiderMonkey prevents me from doing so. I have tried to install
spidermonkey by doing following steps:
1) unpack js185-1.0.0.tar.gz and libmozjs185-devel-1.0.0-3.tar.bz2 packages
2) cd to js-1.8.5\js\src folder
3) run the command: ./configure
    or:  ./configure
--with-js-lib=/cygdrive/c/cygwin/home/omer.yousaf/src/js-1.8.5/js/src/usr/lib

--with-js-include=/cygdrive/c/cygwin/home/omer.yousaf/src/js-1.8.5/js/src/usr/include
I get the error "configure: error: installation or configuration problem:
C++ compiler cannot create executables".
Can you guide me as to how to get spidermonkey installed. Just FYI, I am
using this page for instructions on how to build couchdb from source
https://github.com/apache/couchdb/blob/master/INSTALL.Windows.
Best Regards,
Omer Yousaf
NorthBay Solutions, Lahore
Diogo Júnior | 17 Apr 12:35 2014
Picon

Extending CouchCB

Hi, I want to be able to "log/ signal" when a client request a GET db/_changes request and when it performs
requests on _local /_revs_diff /_bulk_docs etc. I want to simply apply a specific logic on the requests
that clients might be doing and log only the ones that I want to a specific file. So, I need to analyze the http
request content in order to detect what's the request for and only then decide if I want to log it or not. But I
don't want to replace the normal couchdb behaviour and I don't want my couchdb clients to execute any other
requests to other proxy url, etc

I've been studying the external process subject but I was not able to understand if this is the best choice
for me.

How would you implement this kind of stuff?
--
Eng.º Diogo Júnior
Researcher | R&D Department

Fraunhofer Portugal AICOS
Edifício Central Rua Alfredo Allen, 455/461
4200-135 Porto Portugal
How to find us
Phone: +351 22 0408 300
www: www.fraunhofer.pt

Noah Slater | 17 Apr 12:05 2014
Picon

[BLOG] CouchDB Weekly News, April 17

Hi folks,

The CouchDB Weekly News is out:

https://blogs.apache.org/couchdb/entry/couchdb_weekly_news_april_17

Highlights: status of the two big merges, help us with the 1.6.0
release, and catch up on important discussions and happenings in the
wider CouchDB community.

Please help us promote the news:

https://twitter.com/CouchDB/status/456730985460031489

http://www.reddit.com/r/nosql/comments/239ae0/couchdb_weekly_news_april_17/

https://plus.google.com/109226482722655790973/posts/VzP4zuj4L7k

https://blogs.apache.org/couchdb/entry/couchdb_weekly_news_april_17

Thank you,

--

-- 
Noah Slater
https://twitter.com/nslater

Me Self | 17 Apr 10:31 2014
Picon

windows install

Hi All

Having trouble installing couchdb 1.5.1_R16B02 binary on Window 7.

I selected not to install as a window service. Chose the default location
C:\Program Files (x86)\Apache Software Foundation\CouchDB\. Ran
bin\couchdb.bat. Resulted in an endless scroll of error messages.

The readme says that permissions on /var and /etc was set to make them
accessible by anyone but they weren't. After fixing that I tried running
couchdb.bat again but same errors. What do I need to do?

This is some of the error output:

=CRASH REPORT==== 17-Apr-2014::09:59:23 ===
  crasher:
    initial call: couch_replicator_manager:init/1
    pid: <0.1082.0>
    registered_name: couch_replicator_manager
    exception exit: {unexpected_msg,
                        {'EXIT',<0.1083.0>,
                            {{badmatch,
                                 {changes_args,"continuous",fwd,0,
                                     1000000000000000,main_only,undefined,

 infinity,[],undefined,[],true,false,[]}},
                             [{couch_changes,handle_changes,3,
                                  [{file,

 "c:/relax/APACHE~2.0/src/couchdb/couch_changes.erl"},
(Continue reading)

Lena Reinhard | 16 Apr 14:24 2014

Your links for the CouchDB weekly news?

Hi everyone, 

the weekly question: 
if you want to submit a link for tomorrow's CouchDB Weekly News (especially topics which haven't been
discussed on the Mailing lists yet), please don't hesitate to send them to this thread until April 17th,
10am CEST.

Your support is highly appreciated!

Best from Berlin
Lena
Benoit Chesneau | 15 Apr 01:54 2014
Picon

couchbeam 1.0.3 has been released

I just released couchbeam 1.0.3 :

https://github.com/benoitc/couchbeam/releases/tag/1.0.3

Couchbeam is a simple *#erlang* library for * #CouchDB*. Couchbeam provides
you a full featured and easy client to access and manage multiple couchdb
Nodes.

Among new features, this one include latest version of hackney and the
performances should be improved on Linux and BSD systems.

Enjoy!

- benoit
Scott Weber | 14 Apr 05:14 2014
Picon
Picon

Handle the Welcome Request

Greetings again,
I am trying to handle the Welcome message that appears from a root request.
I am using version 1.5 on a Windows machine.

Specifically I want to direct the "/" request to another url.
After hours of searching, the closest I found was this:

https://issues.apache.org/jira/browse/COUCHDB-472
which describes putting the changes in the [httpd_global_handlers] section.

So I followed the changes documented at18/Aug/09 14:43
I replaced the root handler with both suggestions in the log. Neither worked, they gave me a "500 server error".
For example I set this:

/ = {couch_httpd_misc_handlers, handle_welcome_req, {<<"Welcome">>,"/me/there/page.html"}}

In the couch log, I get:
httpd 500 error response:
 {"error":"json_encode","reason":"{bad_term,{<<\"Welcome\">>,\"/me/there/page.html\"}}"}

Is there any other solution to this?

-Scott
Scott Weber | 13 Apr 23:28 2014
Picon
Picon

authentication_redirect is not working.

Lets start with this, because it is almost exactly what I am fighting with, but it doesn't work for me, like it
did appear to work for the person how posted this:

http://stackoverflow.com/questions/18966385/couchdb-access-denied-redirect

The application I am building is open to the public, using CouchDB for it's authentication, and 100% inside
CouchDB with all JS, CSS, HTML as attachments.

Logically the uses starts at a login page which has no security, and after success login, are redirected to
other databases that service page requests (which are based on their name, role, etc...)

When I go directly to a database without logging in, I can't access it.  Which is fine, except I am getting
that rather dry message:

{"error":"unauthorized","reason":"You are not authorized to access this db."}
Which is really counter intuitive for an application.

I have set the authentication redirect as describe in the link, to send them to the login page, but nothing
happens.  I still get the above dry message.

This is on both IE and FF.

Any idea how to get an acceptable page?  

-Scott
Suraj Kumar | 10 Apr 14:54 2014

Modeling Relationships and providing Transactional Integrity

[warning: cross-posted]

Hi,

We're attempting to build a model of a large scale, complex Infrastructure.
That means, every machine their supporting machines report to mothership.
Since our problem is truly that of high concurrency, choosing a solid data
base to keep state of this model became the focus in our erstwhile days. We
zero'ed in on CouchDB: actually, due to the fact that there is Erlang
powering it and that we can pull off other things (not met by CouchDB)
which Couch doesn't provide. One of those things was the notion of
Relationships.

What do I mean by "Relationships" really? Some "types" of Entities have
attributes which may potentially be related some other "types" of Entities
in specific known ways (1:1, 1:*, *:1).

The "Type" becomes the hazy part for schemaless systems like CouchDB.
However, let us now talk in Couch primitives.

Let us set aside the question of how this could potentially still result in
inconsistency in a live distributed database... and imagine if there could
be 'design' documents that describe how some attributes of some "types" of
documents are related to some other attributes of some other "types" of
documents. Imagine, if this could be used by this new 'Relationships'
engine to automatically validate and keep relational integrity of the
database. To describe in couch-terminology, it is a way to automatically
modify certain keys of related document whenever certain keys of a given
'type' of document changes.

(Continue reading)


Gmane