Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zero deployment CouchDB embedded in a Windows app?

I'm probably dreaming here, but am wondering if there's any possibility of completely embedding a minimal CouchDB engine within a Windows application, such that the app can be run without requiring installation (of CouchDB/Erlang) on the user's computer.

like image 911
devios1 Avatar asked Jul 06 '11 21:07

devios1


4 Answers

I already provide this slimmed down / bundled ability - check here https://github.com/dch/couchdb/downloads and specifically the lean bundle at 16MiB erlang + all couch love here https://github.com/downloads/dch/couchdb/couchdb-1.1.0+COUCHDB-1152_otp_R14B03_lean.7z

Some brief notes on bundling and embedding couchdb on windows at wiki.apache.org/couchdb/Quirks_on_Windows including how to hide the erlang window (erl.exe -detached) at startup.

Ask on CouchDB @user mailing list if you want more info or help while you have a crack at this.

like image 159
dch Avatar answered Nov 11 '22 22:11

dch


While not a code solution, you could use one of the bundling applications that can embed files and other files into one executable. One example would be BoxedApp.

like image 38
Joel Lucsy Avatar answered Nov 11 '22 20:11

Joel Lucsy


Why bother. It is so easy to install Erlang on Windows. Just bundle up the whole thing including the erl.exe binary and have your installer unzip it into a folder. The only thing that you would need to change would be the batch files, or better yet, discard them and write your own batch file to start up CouchDb. Also, it is a good idea to use a different port that either the normal Erlang port (or the usual CouchDB port) and maybe even get Erlang to use localhost as its "shortname".

like image 1
Michael Dillon Avatar answered Nov 11 '22 21:11

Michael Dillon


The CouchDB wiki does provide at least a few tips for Integrating CouchDB into your Windows Applications. YMMV, from what I can tell it's more or less just tips on creating a relocatable build. You'll want to likely generate a solid random admin user/password into the local.ini file during the install process and set up proper permissions on all created databases (to protect against any potential cross-site scripting vulnerabilities) in addition to ensuring the socket binding only happens on the default localhost interface.

like image 1
natevw Avatar answered Nov 11 '22 21:11

natevw