ArangoDB介紹
ArangoDB是一個開源NoSQL數據庫,官網:https://www.ArangoDB.org/
ArangoDB支持靈活的數據模型,比如文檔Document、圖Graph以及鍵值對Key-Value存儲。ArangoDB同時也是一個高性能的數據庫,它使用類SQL查詢或JavaScript擴展來構建高性能應用。
ArangoDB值得稱贊的一點,可以在樹莓派上運行ArangoDB 1.4版。
ArangoDB的特性:
1)多模型數據庫
可以靈活的使用鍵值對、文檔、圖及其組合構建你的數據模型。
2)查詢便利
ArangoDB有類SQL的AQL查詢語言,還可以通過REST方式進行查詢。
3)可通過JavaScript進行擴展
無語言范圍的限制,可以從前端到后端都使用同一種語言。
4)高性能
ArangoDB速度極快
5)Foxx - 構建自己的API
用JavaScript和ArangoDB構建應用,Foxx運行在DB內部,可快速訪問數據。
6)空間利用率高
跟其它文檔型數據庫相比,ArangoDB占用的存儲空間更少,因為ArangoDB是模式自由的元數據模式。
7)簡單易用
ArangoDB可以在幾秒內啟動運行,同時可使用圖形界面來管理你的ArangoDB。
8)多OS支持
ArangoDB支持Windows、Linux和OSX等操作系統,還支持樹莓派。
9)開源且免費
ArangoDB開源免費,它采用了Apache 2許可證協議。
10)復制
ArangoDB支持主從集群
簡單說下Aerospike的安裝,我這邊有個服務器是Ubuntu的,那就用它了。 如果有Docker的話,那敢情好了。直接下載image,run一下就好了。
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/ubuntu12' tar -xvf aerospike.tgz cd aerospike-server-community-*-ubuntu12 sudo ./asinstall # will install the .rpm packages sudo service aerospike start && \ sudo tail -f /var/log/aerospike/aerospike.log | grep cake
有時候自己手動啟動。
sudo /etc/init.d/aerospike start
另外大家可以學習下python的aerospike庫。 Python
# import the module import aerospike # Configuration for the client config = { 'hosts': [ ('127.0.0.1', 3000) ] } # Create a client and connect to the database client = aerospike.client(config).connect() # Records are addressable via a tuple of (namespace, set, key) key = ('test', 'demo', 'foo') # Write a record client.put(key, { 'name': 'John Doe', 'age': 32 }) # Read a record (key, metadata, record) = client.get(key) # Close Connection to Cluster client.close()
性能比較見 http://www.infoq.com/cn/news/2013/04/NoSQL-Benchmark 整體看來 如果是充分利用內存提速的話 要比mongodb好!