什麼是分散式系統,分散式系統例子?

最近在學分散式系統,學的很困惑,到底什麼是分布系統,分散式系統到底有什麼用,既然是分散式系統那為什麼有些還有server。然後分散式系統和編程有什麼關係。希望大神們能為我解決疑惑


Client/Server

When two parties communicate with each other, if they dont play the same role. We call one of them client, the other server. For example, Git, there could be many clones of same repository, and by design no clone is superior to others. However, when pushing some commits from clone A to clone B, clone A plays as the client, clone B plays as the server. And when pushing some commits from clone B to clone A, clone B plays as the client, clone A plays as the server.

Furthermore, they may play different roles at one layer, and play the same role at another. For example, BitTorrent, at TCP layer, two nodes play different roles if the connection is not opened simultaneously, however at application layer, they always play the same role.

So whether or not there are clients and servers has nothing to do with whether it is distributed or not.

Distributed

As opposed to centralized systems, distributed systems would distribute work load to more than one machine, to scale out or to tolerate failures or both. For example, Googles GFS is to scale out and to tolerate failures, but Chubby alone is just to tolerate failures.

Programming

Most often, a program which by design is centralized, would not automatically make good use of more than one machine, unless you have a sufficiently smart compiler.


我覺得要先清楚什麼是集中式的處理系統,然後它的瓶頸是啥,這也是為什麼會出現分散式系統的原因。單機的計算能力和存儲能力是有限的,面對海量的數據,往往需要很多機器共同協作處理,也就是集群來處理。這種場景會比單機複雜得多,比如硬碟存儲的瓶頸會變成網路傳輸的瓶頸,不同機器的計算怎麼協調,保證計算的正確性。這也就出現了各種分散式的解決方案,如分散式存儲(如hadoop的hdfs),分散式計算(如spark)等。分散式系統可以從宏觀看也是對外提供類似單機的服務,只是它能突破單機的處理瓶頸,理論上可以一直橫向擴展機器來滿足更大的處理需求。


推薦閱讀:

如何評價 ZeroNet,是否是革命性的創新?其發展前景如何?與傳統網路相比有何優缺點?

TAG:分散式計算 | 去中心化 | 分散式存儲 | 面向對象編程 | 分散式系統 |