第一范文网 - 专业文章范例文档资料分享平台

NoSQL数据库学习教程

来源:用户分享 时间:2025/7/5 22:54:51 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

http://blog.sina.com.cn/mpl398235717

Map Reduce已经烂大街了,不过还是要提一下。 参见:http://zh.wikipedia.org/wiki/MapReduce

Handling Deletes

但我们执行删除操作的时候必须非常谨慎,以防丢失掉相应的版本信息。

通常我们给一个Object标注上\已删除\的标签。在足够的时间之后,我们在确保版本一致的情况下可以将它彻底删除。回收他的空间。

存储实现

One strategy is to use make the storage implementation pluggable. e.g. A local

MySQL DB, Berkeley DB, Filesystem or even a in memory Hashtable can be used as a storage mechanism.

Another strategy is to implement the storage in a highly scalable way. Here are some techniques that I learn from CouchDB and Google BigTable.

CouchDB has a MVCC model that uses a copy-on-modified approach. Any update will cause a private copy being made which in turn cause the index also need to be modified and causing the a private copy of the index as well, all the way up to the root pointer.

http://blog.sina.com.cn/mpl398235717

http://blog.sina.com.cn/mpl398235717

Notice that the update happens in an append-only mode where the modified data is appended to the file and the old data becomes garbage. Periodic garbage collection is done to compact the data. Here is how the model is implemented in memory and disks

In Google BigTable model, the data is broken down into multiple generations and the memory is use to hold the newest generation. Any query will search the mem data as well as all the data sets on disks and merge all the return results. Fast detection of whether a generation contains a key can be done by checking a bloom filter.

http://blog.sina.com.cn/mpl398235717

http://blog.sina.com.cn/mpl398235717

When update happens, both the mem data and the commit log will be written so that if the

节点变化

Notice that virtual nodes can join and leave the network at any time without impacting the operation of the ring.

When a new node joins the network

? 新加入的节点宣告自己的存在(广播或者其他手段)

? 他的邻居节点要调整Key的分配和复制关系。这个操作通常是同步的 ? 这个新加入的节点异步的拷贝数据

? 这个节点变化的操作被发布到其他节点

http://blog.sina.com.cn/mpl398235717

http://blog.sina.com.cn/mpl398235717

Notice that other nodes may not have their membership view updated yet so they may still forward the request to the old nodes. But since these old nodes (which is the neighbor of the new joined node) has been updated (in step 2), so they will

http://blog.sina.com.cn/mpl398235717

搜索更多关于: NoSQL数据库学习教程 的文档
NoSQL数据库学习教程.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1fh7b37ify7px008u2lt_7.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top