tags:

views:

212

answers:

1

hello all
Im about to start using couchdb directly from erlang, and have been reading the hovercraft APi for some time... today I sat down to actually install it and have realized that there's hardly any documentation out there that deals with how to go about doing it...
there is a very brief instruction here:
http://github.com/sendtopms/hovercraft#readme

how does one go about packaging this with their app?
hovercraft git readme instructions are a bit vague.
I poked around couchdb's startup scripts and found the command that actually runs erlang and initializes its module path, along with initial commands (-eval) that initialize couchdb. it is all in /usr/local/bin/couchdb (on my standard couchdb 0.10.1 install - Im aware that hovercraft works with 0.11 only). Either way, the command is at line 217...

so my thought is to perhaps append this command with appropriate paths/initializations of my own application modules (.beam). appending is via '-pa' command line flag, and then initialization of custom app would be appended after the last '-eval'.

this will definitely work but I was wondering if there's a less invasive way of integrating hovercraft/custom apps with couchdb in the same VM.

Im trying to be pretty specific here, my previous iteration of this question was too vague and broad.

thanks

+1  A: 

When I use hovercraft I run it inside of my CouchDB src directory.

I'd answer more specifically but it's exactly as described in Basic Usage in the hovercraft README.

My final note is that you shouldn't use Hovercraft unless you really really need it. The HTTP interface to CouchDB will be more scalable, have better error handling, and allow you to do interface from any language.

J Chris A
well http by itself is fine with me, its more json decoding/encoding that can be gotten rid of, in favor of BERT which would avoid the overhead since its handled by native code in the VM... that and I would prefer to run some of my other logic in the same process as the VM for performance... thanks
deepblue
thanks for writing the cool library, somehow it always amazed me that couchdb was developed for so long (relatively) without a proper erlang api
deepblue