BASE事务模型高级数据库及大规模存储技术.pptx

BASE事务模型高级数据库及大规模存储技术.pptx

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
高级数据库及大规模存储技术AgendaCAP原理BASE模型一致性问题1.1 ACID语义Atomicity: All or nothing. Consistency: Consistent state of data and transactions. Isolation: Transactions are isolated from each other. Durability: When the transaction is committed, state will be durable.任何存储都可以获得原子性、格里性和持久性,但是我们会一直需要一致性?No!可以通过放弃ACID特性,以达到更高性能和可伸缩性1.2 CAP定理Also known as Brewer’s Theorem by Prof. Eric Brewer, published in 2000 at University of Berkeley.“Of three properties of a shared data system: data consistency, system availability and tolerance to network partitions, only two can be achieved at any given moment.”Proven by Nancy Lynch et al. MIT labs./~brewer/cs262b-2004/PODC-keynote.pdf/~/~brewer/cs262b-2004/PODC-keynote.pdfbrewer/cs262b-2004/PODC-keynote.pdf1.3 CAP语义1.3 CAP 语义Consistency任何节点在同一时刻看到的数据是一样的Availability每个请求都会得到一个是否成功地响应Partial Tolerance由于网络失效,数据划分成跨越网络的片段尽管消息丢失或者系统部分失效,系统依然能够运转 1.3.1 Consistencyread account Xbalance - 100set account X balance = 0set account X balance = 0set account X balance = 0set account X balance = 0DB node 1DB node 2Client 2Client 1 1.3.2 Availabilityread account Xbalance - 100read account Xbalance - 100set account X balance = 0set account X balance = 0set account X balance = 0set account X balance = 0Servers eventually agreebalance is 0.Happy customer walksaway, richer by 200.DB node 1DB node 2Client 2Client 11.3.3 网络失效问题IP网络会面临所有情况TCP网络duplicate、reorderDrop是一种特殊的delay完全的失效检测是不可能的1 /homes/arvind/cs425/doc/fischer.pdf“Impossibility of Distributed Consensus with One Faulty Process”, Fischer, Lynch and Paterson1.4 证明(1)Let’s consider a simple system:Service A writes valuesService B reads valuesValues are replicated between nodesThese are “ideal” systemsBug-free, predictableNode 1V0ANode 2V0B1.4 证明(2)“Sunny day scenario”:A writes a new value V1The value is replicated to node 2B reads the new valueNode 1V1V1V0ANode 2V1V0V1B1.4 证明(3)What happens if the network drops?A writes a new value V1Replication failsB still sees the old valueThe system is inconsistentNode 1V1V1

文档评论(0)

xingyuxiaxiang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档