一個針對RethinkDB的輕量級 Node.js ORM 框架:Thinky
Thinky 是一個輕量級的 Node.js 的 ORM 框架,用于支持 RethinkDB 分布式數據庫.
// Create a new post
var post = new Post({
title: "Hello World!",
content: "This is an example."
});
// Create a new author
var author = new Author({
name: "Michel"
});
// Join the documents
post.author = author;
post.saveAll().then(function(result) {
/
post = result = {
id: "0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a",
title: "Hello World!",
content: "This is an example.",
idAuthor: "3851d8b4-5358-43f2-ba23-f4d481358901",
author: {
id: "3851d8b4-5358-43f2-ba23-f4d481358901",
name: "Michel"
}
}
/
});</pre>
RethinkDB 設計用來存儲 JSON 文檔的分布式數據庫,可通過簡單操作實現多機分布式存儲。支持表的聯合和分組查詢。

特點:
簡單編程模型
- JSON 數據模型和一致性
- 分布式聯合查詢、子查詢、聚合查詢和原子更新操作
- Hadoop 風格的 map/reduce.
輕松管理
- 提供友好的 Web 和命令行管理工具
- 服務器和網絡故障時的謹慎處理
- 多數據中心復制和故障轉移
水平伸縮
- 數據分片和復制到多個節點
- 自動化并行查詢和分布式查詢
- 通過 MVCC 并發實現無鎖操作
項目主頁:http://www.baiduhome.net/lib/view/home/1398823083906
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!