[go: nahoru, domu]

Jump to content

Apache CouchDB: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Users: Big companies with CouchDB and their usecase
m Disambiguating links to Canal+ (link changed to Canal+ (French TV channel)) using DisamAssist.
 
(15 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Cleanup-PR|1=article|date=November 2023}}
{{confused|Couchbase Server}}
{{Short description|Document-oriented NoSQL database}}
{{Infobox software
{{Infobox software
| name = Apache CouchDB
| name = Apache CouchDB
Line 36: Line 39:
The CouchDB project was created in April 2005 by Damien Katz, a former [[Lotus Notes]] developer at [[IBM]]. He self-funded the project for almost two years and released it as an open-source project under the [[GNU General Public License]].
The CouchDB project was created in April 2005 by Damien Katz, a former [[Lotus Notes]] developer at [[IBM]]. He self-funded the project for almost two years and released it as an open-source project under the [[GNU General Public License]].


In February 2008, it became an [[Apache Incubator]] project and was offered under the [[Apache License]] instead.<ref>[http://mail-archives.apache.org/mod_mbox/incubator-general/200802.mbox/%3c3d4032300802121136p361b52ceyfc0f3b0ad81a1793@mail.gmail.com%3e Apache mailing list announcement] on mail-archives.apache.org</ref> A few months after, it graduated to a top-level project.<ref>[http://mail-archives.apache.org/mod_mbox/incubator-couchdb-dev/200811.mbox/%3c3F352A54-5FC8-4CB0-8A6B-7D3446F07462@jaguNET.com%3e Re: Proposed Resolution: Establish CouchDB TLP] on mail-archives.apache.org</ref> This led to the first stable version being released in July 2010.<ref>[https://www.pcworld.com/article/201046/couchdb_nosql_database_ready_for_production_use.html "CouchDB NoSQL Database Ready for Production Use"], article from PC World of July 2010</ref>
In February 2008, it became an Apache Incubator project and was offered under the [[Apache License]] instead.<ref>[http://mail-archives.apache.org/mod_mbox/incubator-general/200802.mbox/%3c3d4032300802121136p361b52ceyfc0f3b0ad81a1793@mail.gmail.com%3e Apache mailing list announcement] on mail-archives.apache.org</ref> A few months after, it graduated to a top-level project.<ref>[http://mail-archives.apache.org/mod_mbox/incubator-couchdb-dev/200811.mbox/%3c3F352A54-5FC8-4CB0-8A6B-7D3446F07462@jaguNET.com%3e Re: Proposed Resolution: Establish CouchDB TLP] on mail-archives.apache.org</ref> This led to the first stable version being released in July 2010.<ref>[https://www.pcworld.com/article/201046/couchdb_nosql_database_ready_for_production_use.html "CouchDB NoSQL Database Ready for Production Use"] {{Webarchive|url=https://web.archive.org/web/20101115160351/http://www.pcworld.com/article/201046/couchdb_nosql_database_ready_for_production_use.html |date=2010-11-15 }}, article from PC World of July 2010</ref>


In early 2012, Katz left the project to focus on [[Couchbase Server]].<ref>{{cite web|last=Katz|first=Damien|title=The future of CouchDB|url=http://damienkatz.net/2012/01/the_future_of_couchdb.html|access-date=15 April 2012}}</ref>
In early 2012, Katz left the project to focus on [[Couchbase Server]].<ref>{{cite web|last=Katz|first=Damien|title=The future of CouchDB|url=http://damienkatz.net/2012/01/the_future_of_couchdb.html|access-date=15 April 2012}}</ref>


Since Katz's departure, the Apache CouchDB project has continued, releasing 1.2 in April 2012 and 1.3 in April 2013. In July 2013, the CouchDB community merged the codebase for [[BigCouch]], [[Cloudant]]'s clustered version of CouchDB, into the Apache project.<ref>{{cite web|last=Slater|first=Noah|title=Welcome BigCouch|url=https://blogs.apache.org/couchdb/entry/welcome_bigcouch|access-date=25 July 2013}}</ref> The BigCouch clustering framework is included in the current release of Apache CouchDB.<ref name="couch2bigcouch">{{cite web|url=https://blog.couchdb.org/2016/09/20/2-0/|title= '2.0'|date= 20 September 2016|access-date= 13 January 2017}}</ref>
Since Katz's departure, the Apache CouchDB project has continued, releasing 1.2 in April 2012 and 1.3 in April 2013. In July 2013, the CouchDB community merged the codebase for [[BigCouch]], [[Cloudant]]'s clustered version of CouchDB, into the Apache project.<ref>{{cite web|last=Slater|first=Noah|title=Welcome BigCouch|date=25 July 2013 |url=https://blogs.apache.org/couchdb/entry/welcome_bigcouch|access-date=25 July 2013}}</ref> The BigCouch clustering framework is included in the current release of Apache CouchDB.<ref name="couch2bigcouch">{{cite web|url=https://blog.couchdb.org/2016/09/20/2-0/|title= '2.0'|date= 20 September 2016|access-date= 13 January 2017}}</ref>


Native clustering is supported at version 2.0.0. And the new Mango Query Server provides a simple JSON-based way to perform CouchDB queries without JavaScript or MapReduce.
Native clustering is supported at version 2.0.0. And the new Mango Query Server provides a simple JSON-based way to perform CouchDB queries without JavaScript or MapReduce.
Line 60: Line 63:
: All items have a unique URI that gets exposed via HTTP. It uses the [[Hypertext Transfer Protocol#Request methods|HTTP methods]] POST, GET, PUT and DELETE for the four basic [[Create, read, update and delete|CRUD]] (Create, Read, Update, Delete) operations on all resources.
: All items have a unique URI that gets exposed via HTTP. It uses the [[Hypertext Transfer Protocol#Request methods|HTTP methods]] POST, GET, PUT and DELETE for the four basic [[Create, read, update and delete|CRUD]] (Create, Read, Update, Delete) operations on all resources.


CouchDB also offers a built-in administration interface accessible via Web called Futon.<ref>[http://guide.couchdb.org/draft/tour.html#welcome "Welcome to Futon"] from "CouchDB The Definitive Guide"</ref>
CouchDB also offers a built-in administration interface accessible via Web called Fauxton.<ref>{{cite web|url=https://github.com/apache/couchdb-fauxton|title=couchdb-fauxton|website=GitHub|publisher=apache|access-date=2 May 2023}}</ref>


== Use cases and production deployments ==
== Use cases and production deployments ==
Line 70: Line 73:
Users of CouchDB include:
Users of CouchDB include:
* [[CERN]] uses CouchDB as database for the Data Management System at the [[Large Hadron Collider]].<ref>{{Cite web |date=2010-08-26 |title=Why Large Hadron Collider Scientists are Using CouchDB |url=https://readwrite.com/lhc-couchdb/ |access-date=2022-03-29 |website=ReadWrite |language=en-US}}</ref>
* [[CERN]] uses CouchDB as database for the Data Management System at the [[Large Hadron Collider]].<ref>{{Cite web |date=2010-08-26 |title=Why Large Hadron Collider Scientists are Using CouchDB |url=https://readwrite.com/lhc-couchdb/ |access-date=2022-03-29 |website=ReadWrite |language=en-US}}</ref>
* [[Red Cross]] use the application iDAT for electronically casework in disaster areas. Here CouchDB is used as multi-node peer-to-peer offline-first database for iDAT.<ref>{{Citation |title=iDAT |date=2021-07-31 |url=https://github.com/redcross/idat |publisher=Red Cross Code |access-date=2022-03-29}}</ref>
* [[Red Cross]] use the application iDAT for completing casework electronically in disaster areas. Here CouchDB is used as multi-node peer-to-peer offline-first database.<ref>{{Citation |title=iDAT |date=2021-07-31 |url=https://github.com/redcross/idat |publisher=Red Cross Code |access-date=2022-03-29}}</ref>
* [[Node.js]] uses CouchDB as replicating database for the complete package management in npm.<ref>{{Cite web |date=2021-10-19 |title=What’s new from GitHub Changelog? September 2021 recap |url=https://github.blog/2021-10-19-whats-new-from-github-changelog-september-2021-recap/ |access-date=2022-03-29 |website=The GitHub Blog |language=en-US}}</ref>
* [[IBM]] Cloud services are based at a fundamental level on CouchDB.<ref>{{Cite web |title=Database-Deep-Dives-CouchDB |url=https://www.ibm.com/cloud/blog/database-deep-dives-couchdb |access-date=2022-03-29 |website=www.ibm.com |date=19 July 2019 |language=en-us}}</ref>
* [[IBM]] Cloud services are based at a fundamental level on CouchDB.<ref>{{Cite web |title=Database-Deep-Dives-CouchDB |url=https://www.ibm.com/cloud/blog/database-deep-dives-couchdb |access-date=2022-03-29 |website=www.ibm.com |language=en-us}}</ref>
* [[United Airlines]] uses CouchDB for the in-flight entertainment systems in over 3,000 planes.<ref>{{Cite web |title=Database-Deep-Dives-CouchDB |url=https://www.ibm.com/cloud/blog/database-deep-dives-couchdb |access-date=2022-03-29 |website=www.ibm.com |date=19 July 2019 |language=en-us}}</ref><ref>{{Cite web |title=United Airlines Streamlines Operations With Couchbase {{!}} Case Study |url=https://www.couchbase.com/customers/united-airlines |access-date=2022-03-29 |website=www.couchbase.com}}</ref>
* [[United Airlines]] uses CouchDB for the in-flight entertainment systems in over 3,000 planes. <ref>{{Cite web |title=Database-Deep-Dives-CouchDB |url=https://www.ibm.com/cloud/blog/database-deep-dives-couchdb |access-date=2022-03-29 |website=www.ibm.com |language=en-us}}</ref><ref>{{Cite web |title=United Airlines Streamlines Operations With Couchbase {{!}} Case Study |url=https://www.couchbase.com/customers/united-airlines |access-date=2022-03-29 |website=www.couchbase.com}}</ref>
* [[Amadeus IT Group]], for some of their back-end systems.{{citation needed|date=June 2015}}
* [[Amadeus IT Group]], for some of their back-end systems.{{citation needed|date=June 2015}}
* [[Credit Suisse]], for internal use at commodities department for their marketplace framework.<ref name="couchdbinthewild">[http://wiki.apache.org/couchdb/CouchDB_in_the_wild "CouchDB in the wild"] {{Webarchive|url=https://web.archive.org/web/20170720124015/http://wiki.apache.org/couchdb/CouchDB_in_the_wild |date=2017-07-20 }} article of the product's Web, a list of software projects and websites using CouchDB</ref>{{better source needed|reason=Given source is a wiki. See WP:SPS.|date=June 2015}}
* [[Credit Suisse]], for internal use at commodities department for their marketplace framework.<ref name="couchdbinthewild">[http://wiki.apache.org/couchdb/CouchDB_in_the_wild "CouchDB in the wild"] {{Webarchive|url=https://web.archive.org/web/20170720124015/http://wiki.apache.org/couchdb/CouchDB_in_the_wild |date=2017-07-20 }} article of the product's Web, a list of software projects and websites using CouchDB</ref>{{better source needed|reason=Given source is a wiki. See WP:SPS.|date=June 2015}}
* [[Meebo]], for their social platform (Web and applications).{{citation needed|date=January 2016}} Meebo was acquired by Google and most products were shut down on July 12, 2012.<ref>{{cite web|url=https://techcrunch.com/2012/06/09/meebo-product-shutdown/ |title=Meebo Gets The Classic Google Acq-hire Treatment: Most Products To Shut Down Soon |first=Kim-Mai |last=Cutler |date=9 June 2012|access-date=7 January 2016|work=TechCrunch|publisher=AOL Inc.}}</ref>
* [[Meebo]], for their social platform (Web and applications).{{citation needed|date=January 2016}} Meebo was acquired by Google and most products were shut down on July 12, 2012.<ref>{{cite web|url=https://techcrunch.com/2012/06/09/meebo-product-shutdown/ |title=Meebo Gets The Classic Google Acq-hire Treatment: Most Products To Shut Down Soon |first=Kim-Mai |last=Cutler |date=9 June 2012|access-date=7 January 2016|work=TechCrunch|publisher=AOL Inc.}}</ref>
* [[npm (software)|npm]], for their package registry.<ref>{{cite web|url=https://github.com/npm/npm-registry-couchapp|title=npm-registry-couchapp|website=GitHub|publisher=npm|date=17 June 2015|access-date=7 January 2016}}</ref>
* [[npm (software)|npm]] uses CouchDB as replicating database for their package registry.<ref>{{cite web|url=https://github.com/npm/npm-registry-couchapp|title=npm-registry-couchapp|website=GitHub|publisher=npm|date=17 June 2015|access-date=7 January 2016}}</ref>
* [[Sophos]], for some of their back-end systems.{{citation needed|date=June 2015}}
* [[Sophos]], for some of their back-end systems.{{citation needed|date=June 2015}}
* [[BBC]], for a dynamic CMS-Platform.<ref>[http://www.erlang-factory.com/conference/London2009/speakers/endafarrell CouchDB at the BBC as a fault tolerant, scalable, multi-data center key-value store]</ref>
* [[BBC]], for a dynamic CMS-Platform.<ref>[http://www.erlang-factory.com/conference/London2009/speakers/endafarrell CouchDB at the BBC as a fault tolerant, scalable, multi-data center key-value store]</ref>
* [[Canonical (company)|Canonical]] began using it in 2009 for its synchronization service "Ubuntu One",<ref>[http://mail-archives.apache.org/mod_mbox/couchdb-dev/200910.mbox/%3C4AD53996.3090104@canonical.com%3E Email from Elliot Murphy (Canonical)] {{Webarchive|url=https://web.archive.org/web/20110505005955/http://mail-archives.apache.org/mod_mbox/couchdb-dev/200910.mbox/%3C4AD53996.3090104@canonical.com%3E |date=2011-05-05 }} to the CouchDB-Devel list</ref> but stopped using it in November 2011.<ref>[http://linux.slashdot.org/story/11/11/22/171228/canonical-drops-couchdb-from-ubuntu-one Canonical Drops CouchDB From Ubuntu One (Slashdot)]</ref>
* [[Canonical (company)|Canonical]] began using it in 2009 for its synchronization service "Ubuntu One",<ref>[http://mail-archives.apache.org/mod_mbox/couchdb-dev/200910.mbox/%3C4AD53996.3090104@canonical.com%3E Email from Elliot Murphy (Canonical)] {{Webarchive|url=https://web.archive.org/web/20110505005955/http://mail-archives.apache.org/mod_mbox/couchdb-dev/200910.mbox/%3C4AD53996.3090104@canonical.com%3E |date=2011-05-05 }} to the CouchDB-Devel list</ref> but stopped using it in November 2011.<ref>[http://linux.slashdot.org/story/11/11/22/171228/canonical-drops-couchdb-from-ubuntu-one Canonical Drops CouchDB From Ubuntu One (Slashdot)]</ref>
* [[Canal+|CANAL+]] for international on-demand platform at CANAL+ Overseas.
* [[Canal+ (French TV channel)|CANAL+]] for international on-demand platform at CANAL+ Overseas.
* [[Protogrid]], as storage back-end for their rapid application development framework <ref>{{Cite web|url=http://protogrid.com/bisc/de/001-about|title = Protogrid - Über uns}}</ref>
* [[Protogrid]], as storage back-end for their rapid application development framework <ref>{{Cite web|url=http://protogrid.com/bisc/de/001-about|title = Protogrid - Über uns}}</ref>


Line 87: Line 89:
CouchDB manages a collection of [[JSON]] documents. The documents are organised via views. Views are defined with [[aggregate function]]s and filters are computed in parallel, much like [[MapReduce]].
CouchDB manages a collection of [[JSON]] documents. The documents are organised via views. Views are defined with [[aggregate function]]s and filters are computed in parallel, much like [[MapReduce]].


Views are generally stored in the database and their indexes updated continuously. CouchDB supports a view system using external socket servers and a JSON-based protocol.<ref name="Apache, View Server" >[http://wiki.apache.org/couchdb/ViewServer View Server Documentation] {{Webarchive|url=https://web.archive.org/web/20081020160035/http://wiki.apache.org/couchdb/ViewServer |date=2008-10-20 }} on wiki.apache.org</ref> As a consequence, view servers have been developed in a variety of languages (JavaScript is the default, but there are also PHP, Ruby, Python and Erlang).
Views are generally stored in the database and their indexes are updated continuously. CouchDB supports a view system using external socket servers and a JSON-based protocol.<ref name="Apache, View Server" >[http://wiki.apache.org/couchdb/ViewServer View Server Documentation] {{Webarchive|url=https://web.archive.org/web/20081020160035/http://wiki.apache.org/couchdb/ViewServer |date=2008-10-20 }} on wiki.apache.org</ref> As a consequence, view servers have been developed in a variety of languages (JavaScript is the default, but there are also PHP, Ruby, Python and Erlang).


=== Accessing data via HTTP ===
=== Accessing data via HTTP ===
Line 142: Line 144:
"rev": "946B7D1C"
"rev": "946B7D1C"
}</syntaxhighlight>
}</syntaxhighlight>
|-
|get a list of databases
|<syntaxhighlight lang="bash">
curl http://127.0.0.1:5984/_all_dbs
</syntaxhighlight>
|<syntaxhighlight lang="javascript">
["_replicator","_users","wiki"]
</syntaxhighlight>
|}
|}

==PouchDB==
The [[PouchDB]] is a Javascript implementation of CouchDB which is API compatible with it. So you can use CouchDB on the server side and Pouch in the application itself and once the application comes online you can sync both. This is especially useful for progressive web applications that rely on an offline first approach.


==Open source components==
==Open source components==
Line 199: Line 206:
* [https://code.google.com/p/async-couchdb-client/ Asynchronous CouchDB client for Java]
* [https://code.google.com/p/async-couchdb-client/ Asynchronous CouchDB client for Java]
* [https://github.com/KimStebel/sprouch Asynchronous CouchDB client for Scala]
* [https://github.com/KimStebel/sprouch Asynchronous CouchDB client for Scala]
* {{cite web|last=Lehnardt|first=Jan|title=Couch DB at 10,000 feet|url=http://video.google.com/videoplay?docid=-3714560380544574985&hl=en#|work=Erlang eXchange 2008|access-date=15 April 2012|year=2008}}
* {{cite web|last=Lehnardt|first=Jan|title=Couch DB at 10,000 feet|url=http://video.google.com/videoplay?docid=-3714560380544574985&hl=en|work=Erlang eXchange 2008|access-date=15 April 2012|year=2008|archive-date=9 November 2012|archive-url=https://web.archive.org/web/20121109191546/http://video.google.com/videoplay?docid=-3714560380544574985&hl=en|url-status=dead}}
* {{cite web|last=Lenhardt|first=Jan|title=CouchDB for Erlang Developers|url=http://www.erlang-factory.com/conference/London2009/speakers/janlehnardt|work=Erlang Factory London 2009|access-date=15 April 2012|year=2009|archive-url=https://web.archive.org/web/20110619041527/http://www.erlang-factory.com/conference/London2009/speakers/janlehnardt|archive-date=19 June 2011|url-status=dead}}
* {{cite web|last=Lenhardt|first=Jan|title=CouchDB for Erlang Developers|url=http://www.erlang-factory.com/conference/London2009/speakers/janlehnardt|work=Erlang Factory London 2009|access-date=15 April 2012|year=2009|archive-url=https://web.archive.org/web/20110619041527/http://www.erlang-factory.com/conference/London2009/speakers/janlehnardt|archive-date=19 June 2011|url-status=dead}}
* {{cite web|last=Katz|first=Damien|title=CouchDB and Me|url=http://www.infoq.com/presentations/katz-couchdb-and-me|work=RubyFringe|publisher=InfoQ|access-date=15 April 2012|date=January 2009|archive-url=https://web.archive.org/web/20110427212129/http://www.infoq.com/presentations/katz-couchdb-and-me|archive-date=27 April 2011|url-status=dead}}
* {{cite web|last=Katz|first=Damien|title=CouchDB and Me|url=http://www.infoq.com/presentations/katz-couchdb-and-me|work=RubyFringe|publisher=InfoQ|access-date=15 April 2012|date=January 2009|archive-url=https://web.archive.org/web/20110427212129/http://www.infoq.com/presentations/katz-couchdb-and-me|archive-date=27 April 2011|url-status=dead}}

Latest revision as of 09:33, 15 May 2024

Apache CouchDB
Original author(s)Damien Katz, Jan Lehnardt, Naomi Slater, Christopher Lenz, J. Chris Anderson, Paul Davis, Adam Kocoloski, Jason Davies, Benoît Chesneau, Filipe Manana, Robert Newson
Developer(s)Apache Software Foundation
Initial release2005; 19 years ago (2005)
Stable release
3.3.3[1] Edit this on Wikidata / 4 December 2023; 6 months ago (4 December 2023)
Repository
Written inErlang, JavaScript, C, C++
Operating systemCross-platform
TypeDocument-oriented database
LicenseApache License 2.0
Websitecouchdb.apache.org Edit this on Wikidata

Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang.

CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API.[2]

CouchDB was first released in 2005 and later became an Apache Software Foundation project in 2008.

Unlike a relational database, a CouchDB database does not store data and relationships in tables. Instead, each database is a collection of independent documents. Each document maintains its own data and self-contained schema. An application may access multiple databases, such as one stored on a user's mobile phone and another on a server. Document metadata contains revision information, making it possible to merge any differences that may have occurred while the databases were disconnected.

CouchDB implements a form of multiversion concurrency control (MVCC) so it does not lock the database file during writes. Conflicts are left to the application to resolve. Resolving a conflict generally involves first merging data into one of the documents, then deleting the stale one.[3]

Other features include document-level ACID semantics with eventual consistency, (incremental) MapReduce, and (incremental) replication. One of CouchDB's distinguishing features is multi-master replication, which allows it to scale across machines to build high-performance systems. A built-in Web application called Fauxton (formerly Futon) helps with administration.

History[edit]

Couch is an acronym for cluster of unreliable commodity hardware.[4] The CouchDB project was created in April 2005 by Damien Katz, a former Lotus Notes developer at IBM. He self-funded the project for almost two years and released it as an open-source project under the GNU General Public License.

In February 2008, it became an Apache Incubator project and was offered under the Apache License instead.[5] A few months after, it graduated to a top-level project.[6] This led to the first stable version being released in July 2010.[7]

In early 2012, Katz left the project to focus on Couchbase Server.[8]

Since Katz's departure, the Apache CouchDB project has continued, releasing 1.2 in April 2012 and 1.3 in April 2013. In July 2013, the CouchDB community merged the codebase for BigCouch, Cloudant's clustered version of CouchDB, into the Apache project.[9] The BigCouch clustering framework is included in the current release of Apache CouchDB.[10]

Native clustering is supported at version 2.0.0. And the new Mango Query Server provides a simple JSON-based way to perform CouchDB queries without JavaScript or MapReduce.

Main features[edit]

ACID Semantics
CouchDB provides ACID semantics.[11] It does this by implementing a form of Multi-Version Concurrency Control, meaning that CouchDB can handle a high volume of concurrent readers and writers without conflict.
Built for Offline
CouchDB can replicate to devices (like smartphones) that can go offline and handle data sync for you when the device is back online.
Distributed Architecture with Replication
CouchDB was designed with bi-directional replication (or synchronization) and off-line operation in mind. That means multiple replicas can have their own copies of the same data, modify it, and then sync those changes at a later time.
Document Storage
CouchDB stores data as "documents", as one or more field/value pairs expressed as JSON. Field values can be simple things like strings, numbers, or dates; but ordered lists and associative arrays can also be used. Every document in a CouchDB database has a unique id and there is no required document schema.
Eventual Consistency
CouchDB guarantees eventual consistency to be able to provide both availability and partition tolerance.
Map/Reduce Views and Indexes
The stored data is structured using views. In CouchDB, each view is constructed by a JavaScript function that acts as the Map half of a map/reduce operation. The function takes a document and transforms it into a single value that it returns. CouchDB can index views and keep those indexes updated as documents are added, removed, or updated.
HTTP API
All items have a unique URI that gets exposed via HTTP. It uses the HTTP methods POST, GET, PUT and DELETE for the four basic CRUD (Create, Read, Update, Delete) operations on all resources.

CouchDB also offers a built-in administration interface accessible via Web called Fauxton.[12]

Use cases and production deployments[edit]

Replication and synchronization capabilities of CouchDB make it ideal for using it in mobile devices, where network connection is not guaranteed, and the application must keep on working offline.

CouchDB is well suited for applications with accumulating, occasionally changing data, on which pre-defined queries are to be run and where versioning is important (CRM, CMS systems, by example). Master-master replication is an especially interesting feature, allowing easy multi-site deployments.[13]

Users[edit]

Users of CouchDB include:

  • CERN uses CouchDB as database for the Data Management System at the Large Hadron Collider.[14]
  • Red Cross use the application iDAT for completing casework electronically in disaster areas. Here CouchDB is used as multi-node peer-to-peer offline-first database.[15]
  • IBM Cloud services are based at a fundamental level on CouchDB.[16]
  • United Airlines uses CouchDB for the in-flight entertainment systems in over 3,000 planes.[17][18]
  • Amadeus IT Group, for some of their back-end systems.[citation needed]
  • Credit Suisse, for internal use at commodities department for their marketplace framework.[19][better source needed]
  • Meebo, for their social platform (Web and applications).[citation needed] Meebo was acquired by Google and most products were shut down on July 12, 2012.[20]
  • npm uses CouchDB as replicating database for their package registry.[21]
  • Sophos, for some of their back-end systems.[citation needed]
  • BBC, for a dynamic CMS-Platform.[22]
  • Canonical began using it in 2009 for its synchronization service "Ubuntu One",[23] but stopped using it in November 2011.[24]
  • CANAL+ for international on-demand platform at CANAL+ Overseas.
  • Protogrid, as storage back-end for their rapid application development framework [25]

Data manipulation: documents and views[edit]

CouchDB manages a collection of JSON documents. The documents are organised via views. Views are defined with aggregate functions and filters are computed in parallel, much like MapReduce.

Views are generally stored in the database and their indexes are updated continuously. CouchDB supports a view system using external socket servers and a JSON-based protocol.[26] As a consequence, view servers have been developed in a variety of languages (JavaScript is the default, but there are also PHP, Ruby, Python and Erlang).

Accessing data via HTTP[edit]

Applications interact with CouchDB via HTTP. The following demonstrates a few examples using cURL, a command-line utility. These examples assume that CouchDB is running on localhost (127.0.0.1) on port 5984.

Action Request Response
Accessing server information
curl http://127.0.0.1:5984/
{
  "couchdb": "Welcome",
  "version":"1.1.0"
}
Creating a database named wiki
curl -X PUT http://127.0.0.1:5984/wiki
{"ok": true}
Attempting to create a second database named wiki
curl -X PUT http://127.0.0.1:5984/wiki
{
  "error":"file_exists",
  "reason":"The database could not be created, the file already exists."
}
Retrieve information about the wiki database
curl http://127.0.0.1:5984/wiki
{
  "db_name": "wiki",
  "doc_count": 0,
  "doc_del_count": 0,
  "update_seq": 0,
  "purge_seq": 0,
  "compact_running": false,
  "disk_size": 79,
  "instance_start_time": "1272453873691070",
  "disk_format_version": 5
}
Delete the database wiki
curl -X DELETE http://127.0.0.1:5984/wiki
{"ok": true}
Create a document, asking CouchDB to supply a document id
curl -X POST -H "Content-Type: application/json" --data \
'{ "text" : "Wikipedia on CouchDB", "rating": 5 }' \
http://127.0.0.1:5984/wiki
{
  "ok": true,
  "id": "123BAC",
  "rev": "946B7D1C"
}
get a list of databases
curl http://127.0.0.1:5984/_all_dbs
["_replicator","_users","wiki"]

Open source components[edit]

CouchDB includes a number of other open source projects as part of its default package.

Component Description License
Erlang Erlang is a general-purpose concurrent programming language and runtime system. The sequential subset of Erlang is a functional language with strict evaluation, single assignment, and dynamic typing Apache 2.0 (Release 18.0 and later)
Erlang Public License (Earlier releases)
ICU International Components for Unicode (ICU) is an open-source project of mature C/C++ and Java libraries for Unicode support, software internationalization and software globalization Unicode License
jQuery jQuery is a lightweight cross-browser JavaScript library that emphasizes interaction between JavaScript and HTML MIT License
OpenSSL OpenSSL is an open-source implementation of the SSL and TLS protocols. The core library (written in the C programming language) implements the basic cryptographic functions and provides various utility functions Apache 1.0 and the four-clause BSD License
SpiderMonkey SpiderMonkey is a performant JavaScript engine maintained by the Mozilla Foundation. It contains an interpreter, a JIT compiler and a garbage collector MPL 2.0

See also[edit]

References[edit]

  1. ^ "Release 3.3.3". 4 December 2023. Retrieved 19 December 2023.
  2. ^ Apache Software Foundation. "Apache CouchDB". Retrieved 15 April 2012.
  3. ^ Smith, Jason. "What is the CouchDB replication protocol? Is it like Git?". StackOverflow. Stack Exchange. Retrieved 14 April 2012.
  4. ^ "Exploring CouchDB". Developer Works. IBM. March 31, 2009. Retrieved September 30, 2016.
  5. ^ Apache mailing list announcement on mail-archives.apache.org
  6. ^ Re: Proposed Resolution: Establish CouchDB TLP on mail-archives.apache.org
  7. ^ "CouchDB NoSQL Database Ready for Production Use" Archived 2010-11-15 at the Wayback Machine, article from PC World of July 2010
  8. ^ Katz, Damien. "The future of CouchDB". Retrieved 15 April 2012.
  9. ^ Slater, Noah (25 July 2013). "Welcome BigCouch". Retrieved 25 July 2013.
  10. ^ "'2.0'". 20 September 2016. Retrieved 13 January 2017.
  11. ^ CouchDB, Technical Overview Archived October 20, 2011, at the Wayback Machine
  12. ^ "couchdb-fauxton". GitHub. apache. Retrieved 2 May 2023.
  13. ^ Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison from Kristóf Kovács
  14. ^ "Why Large Hadron Collider Scientists are Using CouchDB". ReadWrite. 2010-08-26. Retrieved 2022-03-29.
  15. ^ iDAT, Red Cross Code, 2021-07-31, retrieved 2022-03-29
  16. ^ "Database-Deep-Dives-CouchDB". www.ibm.com. 19 July 2019. Retrieved 2022-03-29.
  17. ^ "Database-Deep-Dives-CouchDB". www.ibm.com. 19 July 2019. Retrieved 2022-03-29.
  18. ^ "United Airlines Streamlines Operations With Couchbase | Case Study". www.couchbase.com. Retrieved 2022-03-29.
  19. ^ "CouchDB in the wild" Archived 2017-07-20 at the Wayback Machine article of the product's Web, a list of software projects and websites using CouchDB
  20. ^ Cutler, Kim-Mai (9 June 2012). "Meebo Gets The Classic Google Acq-hire Treatment: Most Products To Shut Down Soon". TechCrunch. AOL Inc. Retrieved 7 January 2016.
  21. ^ "npm-registry-couchapp". GitHub. npm. 17 June 2015. Retrieved 7 January 2016.
  22. ^ CouchDB at the BBC as a fault tolerant, scalable, multi-data center key-value store
  23. ^ Email from Elliot Murphy (Canonical) Archived 2011-05-05 at the Wayback Machine to the CouchDB-Devel list
  24. ^ Canonical Drops CouchDB From Ubuntu One (Slashdot)
  25. ^ "Protogrid - Über uns".
  26. ^ View Server Documentation Archived 2008-10-20 at the Wayback Machine on wiki.apache.org

Bibliography[edit]

External links[edit]