couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Frequently_asked_questions" by SebastianCohnen
Date Wed, 17 Mar 2010 17:00:02 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Frequently_asked_questions" page has been changed by SebastianCohnen.
The comment on this change is: Complete refactoring of FAQs (TOC get's build automatically);
Added a question on Views; Removed outdated stuff.
http://wiki.apache.org/couchdb/Frequently_asked_questions?action=diff&rev1=24&rev2=25

--------------------------------------------------

  ## page was renamed from FAQ
  ## page was renamed from Faq
+ = Frequently Asked Questions =
  A handy FAQ for all your CouchDB related questions.
  
+ <<TableOfContents(3)>>
- === About Couchdb ===
-   * [[#what_is_couchdb|What is CouchDB?]]
-   * [[#is_couchdb_ready_for_production|Is CouchDB Ready for Production?]]
-   * [[#what_does_couch_mean|What Does Couch Mean?]]
-   * [[#what_language|What Language is CouchDB Written in?]]
-   * [[#what_platform|What Platforms are Supported?]]
-   * [[#what_license|What is the License?]]
- 
- === Using Couchdb ===
-   * [[#how_much_stuff|How Much Stuff can I Store in CouchDB?]]
-   * [[#how_sequences|How Do I Do Sequences?]]
-   * [[#how_replication|How Do I Use Replication?]]
-   * [[#how_find_conflicts|How do I find out which conflicts occurred during replication]]
-   * [[#how_spread_load|How can I spread load across multiple nodes?]]
-   * [[#why_no_mnesia|Why Does CouchDB Not Use Mnesia?]]
-   * [[#i_can_has_no_http|Can I talk to CouchDB without going through the HTTP API?]]
-   * [[#unicode_data|Erlang has been slow to adopt Unicode. Is Unicode or UTF-8 a problem
with CouchDB?]]
-   * [[#transactions|How do I use transactions with CouchDB?]]
- 
- === Views ===
-   * [[#how_fast_views|How Fast are CouchDB Views?]]
-   * [[#slow_view_building|Creating my view index takes ages, WTF?]]
-   * [[#update_views_more_often|I want to update my view indexes more often than only when
a user reads it. How do I do that best?]]
-   * [[#relationships|How do I model relationships in CouchDB? / Where are my JOINs?]]
-   * [[#view_share_code|How do I share code/functions between views? / Why can I not?]]
- 
- === Security ===
-   * [[#secure_remote_server|I use CouchDB on a remote server and I don't want it to listen
on a public port for security reasons. Is there a way to connect to it from my local machine
or can I still use Futon with it?]]
- 
- === Couchdb on your system ===
-   * [[#finding_the_logfiles|Where are the Couchdb logfiles located?]]
  
  If you have a question not yet answered in this FAQ please hit the edit button and add your
question at the end. Check back in a few days, someone may have provided an answer.
+ 
  
  <<Anchor(what_is_couchdb)>>
  == What is CouchDB? ==
  
  CouchDB is a document-oriented, Non-Relational Database Management Server (NRDBMS). The
[[http://incubator.apache.org/couchdb/docs/intro.html|Introduction]] and [[http://incubator.apache.org/couchdb/docs/overview.html|Overview]]
provide a high level overview of the CouchDB system.
  
+ 
+ 
  <<Anchor(is_couchdb_ready_for_production)>>
  == Is CouchDB Ready for Production? ==
  
  Beta Release. CouchDB has not yet reached version 1.0. However, there are projects successful
using CouchDB in a variety of contexts. See InTheWild for a partial list of projects using
CouchDB.
  
+ 
+ 
  <<Anchor(what_does_couch_mean)>>
  == What Does Couch Mean? ==
  
  It's an acronym, Cluster Of Unreliable Commodity Hardware. This is a statement of Couch's
long term goals of massive scalablility and high reliability on fault-prone hardware. The
distributed nature and flat address space of the database will enable node partitioning for
storage scalabilty (with a map/reduce style query facility) and clustering for reliability
and fault tolerance.
  
+ 
+ 
  <<Anchor(what_language)>>
  == What Language is CouchDB Written in? ==
  
@@ -60, +38 @@

  
  CouchDB's default view server uses Mozilla's Spidermonkey Javscript library which is written
in C. It also supports easy integration of view servers written in any language.
  
+ 
+ 
  <<Anchor(what_platform)>>
  == What Platforms are Supported? ==
  
@@ -67, +47 @@

  
  Windows is not officially supported but it should work, please let us know.
  
+ 
+ 
  <<Anchor(what_license)>>
  == What is the License? ==
  
@@ -79, +61 @@

  
  You may also look into [[http://tilgovi.github.com/couchdb-lounge/|couchdb-lounge]].
  
+ 
+ 
  <<Anchor(how_sequences)>>
  == How Do I Do Sequences? ==
  
  Or, where is my AUTO_INCREMENT?! With replication sequences are hard to realize. Sequences
are often used to ensure unique identifiers for each row in a database table. CouchDB generates
unique ids from its own and you can specify your own as well, so you don't really need a sequence
here. If you use a sequence for something else, you might find a way to express in CouchDB
in another way.
  
+ 
+ 
  <<Anchor(how_replication)>>
  == How Do I Use Replication? ==
  
@@ -96, +82 @@

  
  Where $source_database and $target_database can be the names of local database or full URIs
of remote databases. Both databases need to be created before they can be replicated from
or to.
  
+ 
+ 
  <<Anchor(how_find_conflicts)>>
  == How do I review conflicts occured during replication? ==
  
@@ -107, +95 @@

  
  See also [[Replication_and_conflicts]]
  
+ 
+ 
  <<Anchor(how_spread_load)>>
  == How can I spread load across multiple nodes? ==
  
  Using an http proxy like nginx, you can load balance GETs across nodes, and direct all POSTs,
PUTs and DELETEs to a master node. CouchDB's triggered replication facility can keep multiple
read-only servers in sync with a single master server, so by replicating from master ->
slaves on a regular basis, you can keep your content up to date.
+ 
  
  
  <<Anchor(why_no_mnesia)>>
@@ -123, +114 @@

    * Mnesia replication is suitable for clustering, but not disconnected, distributed edits.
Most of the "cool" features of Mnesia aren't really useful for CouchDB.
    * Also Mnesia isn't really a general-purpose, large scale database. It works best as a
configuration type database, the type where the data isn't central to the function of the
application, but is necessary for the normal operation of it. Think things like network routers,
HTTP proxies and LDAP directories, things that need to be updated, configured and reconfigured
often, but that configuration data is rarely very large.
  
+ 
+ 
  <<Anchor(i_can_has_no_http)>>
  == Can I talk to CouchDB without going through the HTTP API? ==
  
  CouchDB's data model and internal API map the REST/HTTP model so well that any other API
would basically reinvent some flavour of HTTP. However, there is a plan to refactor CouchDB's
internals so as to provide a documented Erlang API.
+ 
+ 
  
  <<Anchor(unicode_data)>>
  == Erlang has been slow to adopt Unicode. Is Unicode or UTF-8 a problem with CouchDB? ==
  CouchDB uses Erlang binaries internally. All data coming to CouchDB must be UTF-8 encoded.
+ 
  
  
  <<Anchor(transactions)>>
@@ -184, +180 @@

  This solution represents roughly 3.5 minutes of total thinking for the particular problem
you've presented. There may be better ways of doing this! That said, it does substantially
reduce conflicting updates, and cuts down on the need to respond to a conflict with a new
update. Under this model, you won't have multiple users attempting to change data in primary
product entry. At the very worst, you'll have multiple users attempting to claim a single
ticket, and if you've grabbed several of those from your view, you simply move on to the next
ticket and try again
  
  (This FaQ entry was borrowed from [[http://stackoverflow.com/questions/299723/can-i-do-transactions-and-locks-in-couchdb]]
with permission from the author.)
+ 
+ 
  
  <<Anchor(update_views_more_often)>>
  == I want to update my view indexes more often than only when a user reads it. How do I
do that best? ==
@@ -211, +209 @@

  choice of language for helper scripts is Python, but any will do,
  whatever suits you best.
  
+ 
+ 
  <<Anchor(secure_remote_server)>>
  == I use CouchDB on a remote server and I don't want it to listen on a public port for security
reasons. Is there a way to connect to it from my local machine or can I still use Futon with
it? ==
  
@@ -225, +225 @@

  Now you can connect to the remote CouchDB through
  http://localhost:5984/
  
+ 
+ 
  <<Anchor(how_fast_views)>>
  == How Fast are CouchDB Views? ==
  
@@ -232, +234 @@

  
  The major advantage of the architecture is, however, that it is designed for high traffic.
No locking occurs is the storage module (MVCC and all that) allowing any number of parallel
readers as well as serialized writes. With replication, you can even set up multiple machines
for a horizontal scale-out and data partitioning (in the future) will let you cope with huge
volumes of data. (See [[http://jan.prima.de/~jan/plok/archives/72-Some-Context.html|slide
13 of Jan Lehnardt's essay]] for more on the storage module or the whole post for detailed
info in general).
  
+ 
+ 
  <<Anchor(slow_view_building)>>
  == Creating my view index takes ages, WTF? ==
  
@@ -245, +249 @@

  
  4) You are using Erlang release R11B (or 5.5.x). Update to at least R12B-3 (or 5.6.3).
  
+ 
+ 
  <<Anchor(relationships)>>
  == How do I model relationships in CouchDB? / Where are my JOINs? ==
  
  See: http://www.cmlenz.net/archives/2007/10/couchdb-joins
  
+ 
+ 
  <<Anchor(view_share_code)>>
  == How do I share code/functions between views? / Why can I not? ==
  
- See: [[HTTP_view_API#view_share_code]]
+ See: [[HTTP_view_API#Sharing_Code_Between_Views]]
+ 
+ 
+ 
+ <<Anchor(views_update_docs)>>
+ == Can Views update documents or databases? ==
+ No. Views are always read-only to databases and their documents.
+ 
  
  <<Anchor(finding_the_logfiles)>>
- == Where are the Couchdb logfiles located? ==
+ == Where are the CouchDB logfiles located? ==
  
  * For a default linux/unix installation the logfiles are located here:
-  {{{
+ {{{
  /usr/local/var/log/couchdb/couch.log
-  }}}
+ }}}
  
-  This is set in the { { {default.ini} } } file located here:
+ This is set in the {{{default.ini}}} file located here:
-  {{{
+ {{{
  /etc/couchdb/default.ini
-  }}}
+ }}}
  
  * If you've installed from source and are running couchdb in dev mode the logfiles are located
here:
-  {{{
+ {{{
  YOUR-COUCHDB-SOURCE-DIRECTORY/tmp/log/couch.log
-  }}}
+ }}}
  
-  Read [[Running_Couchdb_in_Dev_Mode]] for more information.
- 

Mime
View raw message