Couchbase

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(图片)
(图片)
第119行: 第119行:
 
image:couchbase-server-cluster.png|集群
 
image:couchbase-server-cluster.png|集群
 
image:couchbase-cluster-manager-internals.png|集群管理器架构
 
image:couchbase-cluster-manager-internals.png|集群管理器架构
 +
image:couchbase-database-engine-architecture.png|数据库引擎架构
 
image:couchbase-server-mapreduce-workflow.png|MapReduce工作流
 
image:couchbase-server-mapreduce-workflow.png|MapReduce工作流
 
image:couchbase-server-sharding-and-replicating.png|分片和复制
 
image:couchbase-server-sharding-and-replicating.png|分片和复制

2017年9月20日 (三) 13:41的版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Couchbase Thanks, Wikipedia.

Couchbase 是一个开源(Apache V2) 的面向文档的 NoSQL 数据库。

Couchbase 基于 Apache CouchDBMembase 合并构建,Couchbase 使用 Membase 替换掉了 Memcached

Couchbase 可用于文档数据库、键/值存储、分布式Cache。

Couchbase-server.png

目录

关系

Couchbase 与 Membase, CouchDB 的关系

  • Membase公司有一个名为Membase的产品,它是个键/值、持久化、可伸缩的解决方案,使用了memcached wire协议。
  • Membase公司与CouchOne公司合并后,合并之后的公司名取自每个公司名的一部分,即Couchbase。
  • Couchbase产品包含了CouchDB的一个副本,Couchbase产品向CouchDB添加了缓存、集群等功能,比较了Couchbase与CouchDB。CouchDB的创建者及Couchbase的联合创始人Damien Katz表示他将专注于Couchbase,因为这是一个很好的机会,可以重新实现CouchDB,抛弃无法满足需求的、强化可用的功能,并将Membase的可伸缩性、速度、集群与缓存特性添加到合并后的Couchbase产品中。Damien对根据意见来决定的Apache项目的速度与进展表示遗憾,人们对于成功的商业产品需求的增长速度是飞快的。CouchDB产品具有更多的特性,如高级的复制与报表功能,但速度上却不尽如人意,也无法应付高负载。这两个产品的融合是成功的,Couchbase终将破茧而出。

优点

  • Erlang 语言带来的优势;
  • iOSAndroid 移动终端数据存储支持;
  • 产品家族覆盖移动端到数据中心;
  • 移动端、单节点、多节点的数据同步;
  • 缓存、K/V、文档存储的融合;
  • 面向游戏,玩家、怪兽数据的JSON格式存储;
  • Apache Hadoop的集成。

安装

iOS/Android

iOSAndroid NoSQL 数据库引擎

Couchbase-lite.png

Debian

直接下载 deb安装包

dpkg -i couchbase-server-enterprise_3.0.1-debian7_amd64.deb
http://localhost:8091
Administrator/your password
/etc/init.d/couchbase-server start

或者

apt-get install libssl1.0.0
dpkg -i couchbase-server version.deb // only ubuntu, debian没有提供此包, 需源码安装。 
mkdir ~/bin
export PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
... 以下类似 OS X 的做法。

OS X

直接下载安装包

或者 brew install cmake erlang git icu4c libevent snappy v8
v8, 3.25.30, is unsupported
cd /usr/local/Library
git checkout 0e4fe7f /usr/local/Library/Formula/v8.rb
brew unlink v8
brew install v8
brew pin v8
git checkout -- /usr/local/Library/Formula/v8.rb
export PATH=$PATH:/usr/local/bin:/usr/local/opt/icu4c/bin
brew install repo

进入 https://github.com/couchbase/manifest 选择安装版本,如:3.0.2
$ mkdir couchbase
$ cd couchbase
$ repo init -u git://github.com/couchbase/manifest.git -m rel-3.0.2.xml
$ repo sync
$ make

可能出现的错误:

Undefined symbols for architecture x86_64   
"v8::Function::Call(v8::Handle<v8::Value>, int, v8::Handle<v8::Value>*)", referenced from: ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

换个版本安装:repo init -u git://github.com/couchbase/manifest.git -m rel-2.5.2.xml --config-name & repo sync & make 出现错误:

checking for tc_malloc in -ltcmalloc_minimal... no
configure: error: Unable to link with libtcmalloc_minimal"
make[1]: *** [memcached/Makefile] Error 1

参考Ubuntu:sudo apt-get install build-essential libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so

Google-perftools ,该项目包括TcMalloc、heap-checker、heap-profiler和cpu-profiler共4个组件。在只使用TcMalloc情况下可以不编译其他三个组件。

获得 gperftools-2.3.zip

./configure
make
sudo make install

再重新 $make //编译通过,OK!

Docker

Hadoop

Elasticsearch

Solr

Spring

系统

  • Cluster Quota is 2335MB per node, this server only has 1336MB 加入集群的要求,可在 Settings > Cluster 设置。

文档

图片

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱