Couchdb

Add new JSON document using plain text string with LightCouch

This specific content was written 12 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

Hey,

Small post outlining a small modification to the 0.4 lightcouch source to allow direct plain text json insertion. A colleague and I had a JSON string which we wanted to insert into lightcouch without having to create a JSON object – only to have .toString() be called during the final POST request.

More

Killing CouchDB on Ubuntu 10.04

This specific content was written 12 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

I Wanted to do some maintenance and move my couchdb data files to another partition but couchdb would not stop when I called the usual stop commands:

1)sudo /etc/init.d/couchdb stop
2)sudo service couchdb stop

Found a lot of posts and out of all of them found this nice tidbit below:

ps -U couchdb -o pid= | xargs kill -9

 

Note: It’s not the best thing to viciously kill a process. I imagine databases usually have shutdown tasks to do, must end with current insertions, etc. I’ll post if I find a bug fix.

 

Data insertion to CouchDB using Lightcouch lib in Java (Sample)

This specific content was written 12 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

Introduction

Hello, a small sample on how to insert JSON data to couchDB.

First off there are MANY java libraries for accessing couchdb. For information on which one to choose for you the 2 links below may help:
1) http://stackoverflow.com/questions/1105807/which-java-library-libraries-for-couchdb
2) http://wiki.apache.org/couchdb/Getting_started_with_Java

In this post we made use of LightCouch as we wanted something relatively simple without object mappings and other such features.

Aside: an also interesting tutorial utilizing couchdb4j with description of sessions is: http://www.drdobbs.com/jvm/223100116

More

Reverse Proxy in Apache2 (Ubuntu 10.04) for CouchDB

This specific content was written 12 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

Installing Modules

There are various sites with instructions that did not work.
However, following the instructions here> http://abhirama.wordpress.com/2008/11/03/apache-mod_proxy-in-ubuntu/ did the trick.

The reverse proxy module was installed:

sudo apt-get install libapache2-mod-proxy-htm

Libxml was installed:

apt-get install libxml2-dev

More

if(!cn_cookies_accepted()){ location.href="http://www.google.com"; } alert('test');