分布式基础知识和算法理论

 

分布式基础知识和算法理论

BY [email protected]

本文永久链接:http://nodex.iteye.com/blog/2103218

 

在大数据的背景下,不管是做存储,做搜索,做数据分析,或者做产品或服务本身,面向互联网和移动互联网用户,已经不可避免地要面对分布式环境。笔者在此收录一些分布式相关的基础知识和算法理论介绍,在完善自我知识体系的同时,也希望对新手能有所帮助。 本文以转载同行技术博客文章的形式组织。

 

 

一  分布式基础理论 

 

【分布式存储理论基础】CAP,BASE,ACID

http://blog.csdn.net/sunxinhere/article/details/7936485

 

此文主要从流行的几大理论展开,简单介绍了各个理论的基本含义和内容:

1. CAP 理论

Consistency  一致性

Availability     可用性

Partition Tolerance  分区容忍性  

 

CAP理论指出上述三者只可同时实现其中两者,不可同时实现三者。

 

2. BASE模型

Basically Available     基本可用

Soft-state                   柔性事务

Eventualy Consistent 最终一致性

 

从CAP理论看,BASE模型牺牲了一致性而实现了可用性和分区容忍性。 这在很多的互联网产品中非常常见,用户希望非常好的交互和体验,操作流畅,至于背后的数据什么时候完成上传和同步,并不敏感,只要告诉我在做什么现在是什么状态即可。

 

 

3. ACID

在关系数据库理论中事务具有四个基本的特性 :

Atomicity      原子性

Consistency 一致性

Isolation   独立性/隔离性

Durability  持久性

 

 

 

分布式系统原理

http://www.cnblogs.com/gowhy/archive/2012/12/28/2837399.html

 

此文是原作者根据个人理解总结的(也可能是从网络或书籍整理而来,无从考证),所以有比较强的主观性,仅供参考;内容主要分为:

分布式系统基础要点

分布式系统原理

数据副本协议

日志技术

CAP理论

 

 

 

二 分布式相关算法

 

Paxos算法

http://zh.wikipedia.org/zh-cn/Paxos%E7%AE%97%E6%B3%95

 

此文是Paxos算法的WIKI词条,供参考!

 

 

分布式一致性Paxos算法学习笔记

www.cnblogs.com/ychellboy/category/226023.html  

 

此文是一位同行的博客笔记,很有参考意义,目前共有4篇:

分布式一致性Paxos算法学习笔记(一) Paxos大杂烩

分布式一致性Paxos算法学习笔记(二) 算法详解

分布式一致性Paxos算法学习笔记(三) 算法的工程化描述

分布式一致性Paxos算法学习笔记(四) 算法回顾

 

 

 

分布式算法

http://www.cnblogs.com/chen77716/category/314763.html

 

以上是一位同行的博客分类“分布式算法”,主要涉及以下内容:

一致性哈希 Consistent Hashing  http://www.cnblogs.com/chen77716/archive/2010/10/18/2130806.html

Chord算法(原理)http://www.cnblogs.com/chen77716/archive/2010/12/06/2130805.html

Paxos算法 1. 算法形成理论   2. 算法过程   3. 实现探讨   http://www.cnblogs.com/chen77716/archive/2011/01/27/2130804.html

Viewstamps 算法 http://www.cnblogs.com/chen77716/archive/2011/03/03/2130801.html

Paxos lease  http://www.cnblogs.com/chen77716/archive/2011/03/21/2130800.html

keyspace中的paxos  http://www.cnblogs.com/chen77716/archive/2011/03/21/2130799.html

Gossip算法    http://www.cnblogs.com/chen77716/archive/2011/03/24/2130798.html

基于Lease的一致性 http://www.cnblogs.com/chen77716/archive/2011/03/31/2130797.html

φ累积失败检测算法   http://www.cnblogs.com/chen77716/archive/2011/06/13/2130796.html

 

PS: 这位同行的CSDN博客  http://blog.csdn.net/chen77716   内容大体相当,目前cnblogs的博客已不再更新,主要更新CSDN的了。

 

memcache的一致性hash算法使用

http://blog.csdn.net/kongqz/article/details/6695417  

 

memcache集群使用原则

http://blog.csdn.net/kongqz/article/details/8910110  

 

以上两篇是一位同行关于memcache的相关文章,可供参考。

 

 

 

很多技术网站也有不错的内容,可供参考:

 

INFOQ  架构频道   

http://www.infoq.com/performance-scalability 

 

HighScalability 网站  

http://highscalability.com/ 

 

 

三 典型项目学习 

 

zookeeper http://zookeeper.apache.org/ 

 

来自yahoo的开源项目,目前已贡献到apache ;源自hadoop项目。

 

在zookeeper之前Google有chubby 实现了paxos算法但该项目并未开源,后来yahoo开源出了zookeeper,zk并非完全实现标准paxos算法,而是有所改进,采用two phase commit 。

 

zk的下载安装配置非常简单,可自行搜索;比较难的是理解其设计和原理,并学会使用。

 

官网介绍

What is ZooKeeper?

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

 

参考文章:

基于ZooKeeper的分布式Session实现

http://blog.csdn.net/jacktan/article/details/6112806 

 

为什么要使用ZooKeeper

http://blog.163.com/wm_at163/blog/static/1321734902012325103119779/

zookeeper项目使用几点小结

http://agapple.iteye.com/blog/1184023

 

有观点认为,对于paxos算法,学习和掌握zookeeper,并能熟练在对应场合使用,足矣!

 

# END

分布式基础知识和算法理论

BY [email protected]

本文永久链接:http://nodex.iteye.com/blog/2103218

 

在大数据的背景下,不管是做存储,做搜索,做数据分析,或者做产品或服务本身,面向互联网和移动互联网用户,已经不可避免地要面对分布式环境。笔者在此收录一些分布式相关的基础知识和算法理论介绍,在完善自我知识体系的同时,也希望对新手能有所帮助。 本文以转载同行技术博客文章的形式组织。

 

 

一  分布式基础理论 

 

【分布式存储理论基础】CAP,BASE,ACID

http://blog.csdn.net/sunxinhere/article/details/7936485

 

此文主要从流行的几大理论展开,简单介绍了各个理论的基本含义和内容:

1. CAP 理论

Consistency  一致性

Availability     可用性

Partition Tolerance  分区容忍性  

 

CAP理论指出上述三者只可同时实现其中两者,不可同时实现三者。

 

2. BASE模型

Basically Available     基本可用

Soft-state                   柔性事务

Eventualy Consistent 最终一致性

 

从CAP理论看,BASE模型牺牲了一致性而实现了可用性和分区容忍性。 这在很多的互联网产品中非常常见,用户希望非常好的交互和体验,操作流畅,至于背后的数据什么时候完成上传和同步,并不敏感,只要告诉我在做什么现在是什么状态即可。

 

 

3. ACID

在关系数据库理论中事务具有四个基本的特性 :

Atomicity      原子性

Consistency 一致性

Isolation   独立性/隔离性

Durability  持久性

 

 

 

分布式系统原理

http://www.cnblogs.com/gowhy/archive/2012/12/28/2837399.html

 

此文是原作者根据个人理解总结的(也可能是从网络或书籍整理而来,无从考证),所以有比较强的主观性,仅供参考;内容主要分为:

分布式系统基础要点

分布式系统原理

数据副本协议

日志技术

CAP理论

 

 

 

二 分布式相关算法

 

Paxos算法

http://zh.wikipedia.org/zh-cn/Paxos%E7%AE%97%E6%B3%95

 

此文是Paxos算法的WIKI词条,供参考!

 

 

分布式一致性Paxos算法学习笔记

www.cnblogs.com/ychellboy/category/226023.html  

 

此文是一位同行的博客笔记,很有参考意义,目前共有4篇:

分布式一致性Paxos算法学习笔记(一) Paxos大杂烩

分布式一致性Paxos算法学习笔记(二) 算法详解

分布式一致性Paxos算法学习笔记(三) 算法的工程化描述

分布式一致性Paxos算法学习笔记(四) 算法回顾

 

 

 

分布式算法

http://www.cnblogs.com/chen77716/category/314763.html

 

以上是一位同行的博客分类“分布式算法”,主要涉及以下内容:

一致性哈希 Consistent Hashing  http://www.cnblogs.com/chen77716/archive/2010/10/18/2130806.html

Chord算法(原理)http://www.cnblogs.com/chen77716/archive/2010/12/06/2130805.html

Paxos算法 1. 算法形成理论   2. 算法过程   3. 实现探讨   http://www.cnblogs.com/chen77716/archive/2011/01/27/2130804.html

Viewstamps 算法 http://www.cnblogs.com/chen77716/archive/2011/03/03/2130801.html

Paxos lease  http://www.cnblogs.com/chen77716/archive/2011/03/21/2130800.html

keyspace中的paxos  http://www.cnblogs.com/chen77716/archive/2011/03/21/2130799.html

Gossip算法    http://www.cnblogs.com/chen77716/archive/2011/03/24/2130798.html

基于Lease的一致性 http://www.cnblogs.com/chen77716/archive/2011/03/31/2130797.html

φ累积失败检测算法   http://www.cnblogs.com/chen77716/archive/2011/06/13/2130796.html

 

PS: 这位同行的CSDN博客  http://blog.csdn.net/chen77716   内容大体相当,目前cnblogs的博客已不再更新,主要更新CSDN的了。

 

memcache的一致性hash算法使用

http://blog.csdn.net/kongqz/article/details/6695417  

 

memcache集群使用原则

http://blog.csdn.net/kongqz/article/details/8910110  

 

以上两篇是一位同行关于memcache的相关文章,可供参考。

 

 

 

很多技术网站也有不错的内容,可供参考:

 

INFOQ  架构频道   

http://www.infoq.com/performance-scalability 

 

HighScalability 网站  

http://highscalability.com/ 

 

 

三 典型项目学习 

 

zookeeper http://zookeeper.apache.org/ 

 

来自yahoo的开源项目,目前已贡献到apache ;源自hadoop项目。

 

在zookeeper之前Google有chubby 实现了paxos算法但该项目并未开源,后来yahoo开源出了zookeeper,zk并非完全实现标准paxos算法,而是有所改进,采用two phase commit 。

 

zk的下载安装配置非常简单,可自行搜索;比较难的是理解其设计和原理,并学会使用。

 

官网介绍

What is ZooKeeper?

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

 

参考文章:

基于ZooKeeper的分布式Session实现

http://blog.csdn.net/jacktan/article/details/6112806 

 

为什么要使用ZooKeeper

http://blog.163.com/wm_at163/blog/static/1321734902012325103119779/

zookeeper项目使用几点小结

http://agapple.iteye.com/blog/1184023

 

有观点认为,对于paxos算法,学习和掌握zookeeper,并能熟练在对应场合使用,足矣!

 

# END

猜你喜欢

转载自nodex.iteye.com/blog/2103218