Lena Reinhard | 19 Dec 12:22 2014

[BLOG] The CouchDB Weekly News and Highlights in 2014 are out

Hi everyone,

this week’s CouchDB Weekly News is out, this time with many highlights from
2014:

http://blog.couchdb.org/2014/12/19/couchdb-weekly-news-december-19-2014-and-couchdb-highlights-in-2014/

Thanks to Andy, Jan and Akshat for their contributions.

We want to ask you to help us promote the News, this is also a way to
contribute to the project –
Twitter:  https://twitter.com/CouchDB/status/545897769391890432
Reddit:
http://www.reddit.com/r/CouchDB/comments/2ps1rr/couchdb_weekly_news_december_19_2014_and_couchdb/
G+:
https://plus.google.com/b/109226482722655790973/+CouchDB/posts/D52no8zKZet
Facebook:
https://www.facebook.com/permalink.php?story_fbid=604937966205098&id=507603582605204
Linkedin:
https://www.linkedin.com/company/5242010/comments?topic=5951663846908248064&type=U&scope=5242010&stype=C&a=jZvy&goback=.bzo_*1_*1_*1_*1_*1_*1_*1_apache*5couchdb

This is the last issue of the Weekly News in 2014, we'll be back on January
08, 2015. Thanks to everyone who supported and shared the News this year.

Best,
Lena
Mike | 16 Dec 11:43 2014
Picon

stream CouchDB changes into PostgreSQL

Hi Everyone,

We switch from Postgres to Couch for our main datasource about 5 years 
ago. One of the main reasons was for master/master replication our data 
suites the using a schema less model.

Ever since the switch I have always wanted to be able use sql to query 
the data as opposed to writing add hoc scripts to put csv/xls reports 
together.  With all the json/jsonb stuff happening with postgres 
recently I decided to scratched that itch last week with:

Node libary to stream CouchDB changes into PostgreSQL with a simple 
client example.
https://github.com/sysadminmike/couch-to-postgres/

It is fairly simple to get going and start running SELECT queries on the 
docs in your couchdb. It is also possible to use your couch views as 
tables.  It provides something similar Elastic Search river plugin but 
for Postgres.

By adding a few some extra bits allows not only for SELECT queries on 
the data but also UPDATE/INSERTS/(DELETES todo) on your couchdb docs 
within Postgres.

Thanks for reading,

Mike.

Steve Genoud | 15 Dec 08:38 2014

Re: Update function introl

Hei Sam,

Your use case would probably be better with a view (
http://docs.couchdb.org/en/latest/couchapp/views/intro.html).
You should add every tweet as an individual document and create a map
function such that which emits the hashtag as key. You can then easily
retrieve all tweets by hashtag. Moreover, every update of the db will take
the same time, you will be able to paginate the tweets of a popular hash
tag when you retrieve them and be safe from conflicts (if you start some
replications).
Note that this is a typical example of when you use CouchDB you need to
changes the way you are thinking about your db. The core of your attention
should be on how to query your data (i.e. how to create your views) more
than on how you structure your data.

Update functions are a completely different beast, they are here for
authorisation reasons (i.e. if you want to let users edit some documents).

Welcome in the couch community.

Best,
Steve

On Sun, Dec 14, 2014 at 2:22 AM, Sam Raker <sam.raker@...> wrote:
>
> I've got an application that pulls tweets from twitter and organizes them
> by hashtag, so
>
> {"_id": "#whatever", "tweets": [{tweet 1}, {tweet 2},...]}.
>
(Continue reading)

Sam Raker | 14 Dec 02:22 2014
Picon

Update function introl

I've got an application that pulls tweets from twitter and organizes them
by hashtag, so

{"_id": "#whatever", "tweets": [{tweet 1}, {tweet 2},...]}.

I'm noticing a performance hit with popular hashtags--my app pulls down the
whole document, appends the tweet to the array, and then puts the updated
doc back in the db.

I *think* this would be a good job for update functions, but I've had a
devil of a time learning much about them. I might just be a little dense,
but after reading through
https://wiki.apache.org/couchdb/Document_Update_Handlers and
http://docs.couchdb.org/en/latest/couchapp/ddocs.html#update-functions a
few times each, I'm still a bit lost. Can anyone recommend some good
resource for learning about update functions?

Thanks,
-sam
Nina Azimikhah | 11 Dec 21:42 2014
Picon

Couchdb binding with YCSB

Hi!

Is there anyone who knows how to bind YCSB with CouchDB? I'm a NoSQL
beginner and i'm trying to benchmark CouchDB with YCSB.

I managed to install and run CouchDB but i cant bind CouchDB to YCSB. I know
that an interfacelayer is necessary and i found one on github,
https://github.com/arnaud123/YCSB-couchdb-binding

I've added the folder YCSB-couchdb-binding-master into the YCSB folder where
all the other binding folders are and added to the POM.xml in the YCSB a
module called "couchdb". When im trying to build the dependencies with maven
"mvn clean package" i get the error "pom.xml in couchdb" is missing. So
where do i get that couchdb pom.xml? I created one on myself but i get the
error message:

[ERROR]   The project com.yahoo.ycsb:couchdb-binding:0.1.4
(/home/nina/YCSB/couchdb/pom.xml) has 1 error

[ERROR]     'dependencies.dependency.version' for
org.couchdb:couch-java-driver:jar must be a valid version but is
'${couchdb.version}'.  <at>  line 18, column 16

That means i need the couch-java-driver or something like the
mongodb-binding.jar but i've no idea how to get something like that.

I hope someone can help me to bind CouchDB with YCSB.

Thanks, Nina

(Continue reading)

Nina Azimikhah | 11 Dec 21:50 2014
Picon

Couchdb binding with YCSB

Hi!

Is there anyone who knows how to bind YCSB with CouchDB? I'm a NoSQL
beginner and i'm trying to benchmark CouchDB with YCSB.

I managed to install and run CouchDB but i cant bind CouchDB to YCSB. I know
that an interfacelayer is necessary and i found one on github,
https://github.com/arnaud123/YCSB-couchdb-binding

I've added the folder YCSB-couchdb-binding-master into the YCSB folder where
all the other binding folders are and added to the POM.xml in the YCSB a
module called "couchdb". When im trying to build the dependencies with maven
"mvn clean package" i get the error "pom.xml in couchdb" is missing. So
where do i get that couchdb pom.xml? I created one on myself but i get the
error message:

[ERROR]   The project com.yahoo.ycsb:couchdb-binding:0.1.4
(/home/nina/YCSB/couchdb/pom.xml) has 1 error

[ERROR]     'dependencies.dependency.version' for
org.couchdb:couch-java-driver:jar must be a valid version but is
'${couchdb.version}'.  <at>  line 18, column 16

That means i need the couch-java-driver or something like the
mongodb-binding.jar but i've no idea how to get something like that.

I hope someone can help me to bind CouchDB with YCSB.

Thanks, Nina

(Continue reading)

Lena Reinhard | 11 Dec 16:03 2014

[BLOG] The CouchDB Weekly News is out

Hi folks,

this week’s CouchDB Weekly News is out:

http://blog.couchdb.org/2014/12/11/couchdb-weekly-news-december-11-2014/

… with many new releases, opinion pieces, Q&A, “get involved”, job
opportunities and “time to relax!”-content.

We want to ask you to help us promote the News, this is also a way to
contribute to the project –
Twitter:  https://twitter.com/CouchDB/status/543054331436888065
Reddit:
http://www.reddit.com/r/CouchDB/comments/2oz4a1/the_couchdb_weekly_news_december_11_2014/
G+:
https://plus.google.com/b/109226482722655790973/+CouchDB/posts/d6n6zxR36mU
Facebook:
https://www.facebook.com/permalink.php?story_fbid=602552106443684&id=507603582605204
Linkedin:
https://www.linkedin.com/company/5242010/comments?topic=5948820632559955968&type=U&scope=5242010&stype=C&a=-RfN&goback=.bzo_*1_*1_*1_*1_*1_*1_*1_apache*5couchdb

Best,
Lena
Dave Cottlehuber | 11 Dec 11:24 2014

user@...

> Hi,
>  
> I have a CouchDB instance v1.3.0 with about 6 databases and one of them is used for historical  
> reporting usually with 15 million records and about 30 GB to 45 GB disk space.
> This Sunday it just crashed first rejecting http requests and then even killing the couchDB  
> process.
>  
> It is running in a Windows Server 2008 with about 32 GB of ram and 8 CPU cores.
>  
> While deleting a bunch of old records from the historical reports database this error  
> message pops-up
>  
> [Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.11190.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3654f0?rev=1-bf5e3f4fb9cc341b2c7be7599a4f7a8f

> 200
> [Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.10928.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3651d8?rev=1-7aca019d84960522a12a8d2a7c224e90

> 200
> [Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.13583.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3655d2?rev=1-467254a30672ad3c56d59ada50e81789

> 200
> [Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.195.0>] Index shutdown by monitor notice  
> for db: outbound-record-history idx: _design/RecordHistory
> [Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.202.0>] Index shutdown by monitor notice  
> for db: outbound-record-history idx: _design/FileFormatter
> [Sun, 07 Dec 2014 18:41:43 GMT] [error] [<0.13583.28>] Uncaught error in HTTP request:  
> {exit,
(Continue reading)

Alejandro Santiago | 11 Dec 00:53 2014

CouchDB is crashing and corrupting databases

Hi,

I have a CouchDB instance v1.3.0 with about 6 databases and one of them is used for historical reporting
usually with 15 million records and about 30 GB to 45 GB disk space.
This Sunday it just crashed first rejecting http requests and then even killing the couchDB process.

It is running in a Windows Server 2008 with about 32 GB of ram and 8 CPU cores.

While deleting a bunch of old records from the historical reports database this error message pops-up

[Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.11190.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3654f0?rev=1-bf5e3f4fb9cc341b2c7be7599a4f7a8f 200
[Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.10928.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3651d8?rev=1-7aca019d84960522a12a8d2a7c224e90 200
[Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.13583.28>] 15.128.50.71 - - DELETE
/outbound-record-history/6ebaaebd8f0bcffd18121a227a3655d2?rev=1-467254a30672ad3c56d59ada50e81789 200
[Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.195.0>] Index shutdown by monitor notice for db:
outbound-record-history idx: _design/RecordHistory
[Sun, 07 Dec 2014 18:41:43 GMT] [info] [<0.202.0>] Index shutdown by monitor notice for db:
outbound-record-history idx: _design/FileFormatter
[Sun, 07 Dec 2014 18:41:43 GMT] [error] [<0.13583.28>] Uncaught error in HTTP request: {exit,
                                                        {{badmatch,
                                                          {error,eio}},
                                                         [{couch_btree,
                                                           '-write_node/3-lc$^0/1-0-',
                                                           5,
                                                           [{file,
                                                             "c:/cygwin/relax/APACHE~1.0/src/couchdb/couch_btree.erl"},
                                                            {line,358}]},
                                                          {couch_btree,
(Continue reading)

Garren Smith | 11 Dec 10:27 2014
Picon

_changes heartbeat not working via ajax call

Hi All,

I’m having an issue with monitoring the changes feed of a database on Couchdb 1.6. I’m using jQuery to
monitor the changes feed of a database. I’ve set it to feed type to longpoll and I’ve set a hearbeat of 3
seconds. I want the request to return after 3 seconds if no changes happened on the document. This works
perfectly via curl using this:

curl
'http://127.0.0.1:5984/MY_DB/_changes?feed=longpoll&since=now&heartbeat=3000&include_docs=true' <http://127.0.0.1:5984/MY_DB/_changes?feed=longpoll&since=now&heartbeat=3000&include_docs=true'>

But if I try and do the exact same via jQuery it never returns. Any ideas on why it doesn’t and what I’m
doing wrong? Here are steps to reproduce with jQuery:

Ppen fauxton in browser: http://localhost:5984/_utils/fauxton/ <http://localhost:5984/_utils/fauxton/>
Open the dev console.
Run this code snippet:

function longpoll(last_seq) { 
 var query = $.param({
       since: last_seq || "now",
       include_docs: true,
       feed: 'longpoll',
       heartbeat: 3000
     });

  console.log('query ' + query);
     var promise = $.get('/qa_multi_1/_changes?' + query);
     promise.then(function (resp) {
        var parsedResp = JSON.parse(resp),
            results = parsedResp.results,
(Continue reading)

MRIT Consultancy | 10 Dec 20:32 2014
Picon

Windows 2012 R2 Data Center and Views error

I have installed couch 1.5 on Windows to d:\program files\laes and the following error is thrown when
attempting to touch a view in throws the following error:
NOTE: If install to c:\program files\laes it works with error.
There is also erlang dump file, if that is useful.

[Mon, 08 Dec 2014 10:57:52 GMT] [error] [emulator] Error in process <0.202.0> with exit value:
{{nocatch,{'EXIT',{{badmatch,{error,{enoent,[{erlang,open_port,[{spawn,"d:/Program
Files/laes/couchdb/lib/couch-1.5.0/priv/couchspawnkillable ./couchjs.exe
../share/couchdb/server/main.js"},[stream,{line,4096},... 

[Mon, 08 Dec 2014 10:57:52 GMT] [error] [<0.113.0>] httpd 500 error response:
{"error":"EXIT","reason":"{{badmatch,\n     {error,\n         {enoent,\n             [{erlang,open_port,\n                  [{spawn,\n                      
\"d:/Program Files/laes/couchdb/lib/couch-1.5.0/priv/couchspawnkillable ./couchjs.exe
../share/couchdb/server/main.js\"},\n                   [stream,{line,4096},binary,exit_status,hide]],\n                 
[]},\n              {couch_os_process,init,1,\n                  [{file,\n                      
\"c:/cygwin/relax/APACHE~1.0/src/couchdb/couch_os_process.erl\"},\n                   {line,148}]},\n             
{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,304}]},\n             
{proc_lib,init_p_do_apply,3,\n                  [{file,\"proc_lib.erl\"},{line,239}]}]}}},\n
[{couch_query_servers,new_process,3,\n     
[{file,\"c:/cygwin/relax/APACHE~1.0/src/couchdb/couch_query_servers.erl\"},\n      
{line,477}]},\n  {couch_query_servers,lang_proc,3,\n     
[{file,\"c:/cygwin/relax/APACHE~1.0/src/couchdb/couch_query_servers.erl\"},\n      
{line,462}]},\n  {couch_query_servers,handle_call,3,\n     
[{file,\"c:/cygwin/relax/APACHE~1.0/src/couchdb/couch_query_servers.erl\"},\n      
{line,334}]},\n  {gen_server,handle_msg,5,[{file,\"gen_server.erl\"},{line,585}]},\n  {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]}"}
[Mon, 08 Dec 2014 10:57:58 GMT] [debug] [<0.113.0>] OAuth Params:
[{"contractsmr1/_all_docs",[]}][Mon, 08 Dec 2014 10:57:58 GMT] [debug] [<0.113.0>] OAuth Params:
[][Mon, 08 Dec 2014 10:57:58 GMT] [debug] [<0.114.0>] OAuth Params: [{"limit","11"}][Mon, 08 Dec 2014
10:57:58 GMT] [debug] [<0.112.0>] OAuth Params: [{"startkey","\"_design/\""},                                  
{"endkey","\"_design0\""},                                   {"include_docs","true"}][Mon, 08 Dec 2014 10:57:58 GMT] [debug]
(Continue reading)


Gmane