分散式系统: 现代软体架构与设计考量

分散式系统: 现代软体架构与设计考量

[1] The Definition of Distribution: A distributed system is a collection of autonomous computing elements that appears to its users as a single coherent system.

Collection of autonomous computing elements
达到搜集算力是分散式系统的必要条件,一般来说是透过P2P (Peer to Peer) 连线方式做到。而在这种网路连线下,主要有3个 Issues 。1. How do verify member node? 2. Node connection state check Issue. 3. Can nonmember elements access member elements ?Single coherent system
使用者在存取系统的时候,并不会感受到是存取不同的装置,会认为他是同一个系统。而要达到这样子统合各装置的能力,则需要 Middleware 的帮忙。Middleware and distribution systems
Middleware 用于统合各个 Node 的资源,让使用者无法感知到存取的服务,可能是处于不同的机器。根据上述定义,分散式系统应如下图的架构,各个算力资源(element) 透过网路来介接,并串联成一个整体的生态系,即使是外部资源存取,也不会察觉该服务的节点差异。
GitBook draft

Distribution System Design Goals

Resource Sharing

Resource 不仅是指硬体资源也包含周边资源,ex: 印表机等等

Making distribution transparent

TransparentDescriptionAccess不同的机器之前互相可以存取,即使是不同的作业系统或硬体规格。Location使用者在不同位置存取时,不会感受到区别。ex: 透过 URL 进行存取。Relocation当使用者转移位置时,不会感知到也不影响使用。Migration使用者随着移动,不影响资料的一致性。Replication当系统进行备份的时候,不影响使用者。Concurrency系统可以让多个使用者同时存取。Failure Tolerance当系统失败重启的时后,不影响使用者。

为了做到 Transparent 应考量 Separating policy from mechanism 因为採用 Monolithic 难以有足够的弹性做到Transparent的目地。拆分成多个Service 更能够做到 migration、replication、Failure Tolerance等目地。

Being scalable
在分散式系统中,Masking Failures Issue 是非常困难且重要的。因此,系统的 Scalability 就是相当重要的,使得 Service 故障排除的过程,不影响使用者。 然而在 Scalability 本身就会牵涉到另一个议题,要如何不让使用者察觉,因此 Degree of distribution transparency 就是值得被考虑的议题。

Degree of distribution transparency

在分散式系统中会因为地区的不同,存取时间会受到影响。若要完全 distribution transparency ,使用者体验则会影响到,因此需要对使用者分级,通常是以地区作为区分。

If such reliability cannot be guaranteed, it's then best to always perform only local execution, leading to the copy-before-use principle.

Being Open

提供一个公开的介面,给其他装置存取。如URL、DNS、IDL (Interface Definition Language)

Caching

在 Replica 的架构下衍伸出来的问题是,Cache 的状态的一致性

Type of Distributed systems

在分散式系统中,主要有三种大的服务型态的High Performance Distributed Computing, Distribution Information, Pervasive Computing,等三种服务的型态。

High Performance Distributed Computing
属于高性能的计算能力,主要有两种。一种是属于丛集式的实体服务,组合一个大型的联合系统。

Cluster Computing
透过建置实体机器,串连起算力以提供服务。

Cloud Computing
由服务商建制丛集式的服务,由服务商将算力切分出来,主要分为三种型态IaaS (Infrastructure-as-a-Service)、PaaS(Platform-as-a-Service)、SaaS (Software-as-a-Service)等三种型态。

Distributed Information Systems
这种服务型态主要就是现在主流服务的型态 (Query/Response) 的服务型态,有 Transaction Process (TP) 进行搜集全部的 Requests,进行 serving。

Pervasive Systems
Sensors 本身自形成一个网路,与云端上的的服务进行沟通。

参考文件

[1] van Steen, Maarten, and Andrew S. Tanenbaum. "A brief introduction to distributed systems." Computing 98.10 (2016): 967-1009.


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章