Distributed programming is the art of solving the same problem that you can solve on a single computer using multiple computers.

## Basic

• Scalability
• Performance (and latency)：performance 和 latency 之间有 tradeoff，你可以把更多的数据汇总一起处理，这样更快，但是 latency 就高了。
• Availability
$$Availability = uptime / (uptime + downtime)$$

### What Prevents us from achieving good thinds?

• 节点的数量
• 节点之间的距离

• 随着节点数量的增加，增加了系统出现故障的概率
• 随着节点数量的增加，增加了节点之间的 communication cost
• 地理距离的增加，增加了系统之间通信的 minimum latency

### Abstractions and models

• System model (asynchronous / synchronous)
• Failure model (crash-fail, partitions, Byzantine)
• Consistency model (strong, eventual)

### Design techniques: partition and replicate

partition 和 replicate 是解决分布式问题的两个绝招，可以理解为分而治之。

Partition:

• Partitioning improves performance by limiting the amount of data to be examined and by locating related data in the same partition
• Partitioning improves availability by allowing partitions to fail independently, increasing the number of nodes that need to fail before availability is sacrificed

Replication：

• Replication improves performance by making additional computing power and bandwidth applicable to a new copy of the data
• Replication improves availability by creating additional copies of the data, increasing the number of nodes that need to fail before availability is sacrificed

Only one consistency model for replication – strong consistency – allows you to program as-if the underlying data was not replicated. Other consistency models expose some internals of the replication to the programmer. However, weaker consistency models can provide lower latency and higher availability – and are not necessarily harder to understand, just different.

## 发送评论编辑评论

|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
（╯‵□′）╯︵┴─┴
￣﹃￣
(/ω＼)
∠( ᐛ 」∠)＿
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ｀)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ(￣∇￣o)
ヾ(´･ ･｀｡)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò｡)
Σ(っ °Д °;)っ
( ,,´･ω･)ﾉ"(´っω･｀｡)
╮(╯▽╰)╭
o(*////▽////*)q
＞﹏＜
( ๑´•ω•) "(ㆆᴗㆆ)

Emoji