Defining Distributed Systems 定义分布式系统
- A system in which hardware or software components located at networked computers communicate and coordinate their actions only by message passing.
- A distributed system is a collection of independent computers that appear to the users as a single computer.
- A distributed system is one on which I cannot get any work done because some machine I have never heard of has crashed.
- 分布式系统是一个系统,其中位于网络计算机上的硬件或软件只能通过消息传递来进行通信或协调它们的操作。
- 分布式系统是一组独立的计算机。但对于使用者而言,它们表现为一台单一的计算机。
- 分布式系统是这样的系统,我会因为一些我从未听说过的机器崩溃了而无法完成我的工作。
Networks vs. Distributed Systems 网络与分布式系统对比
- Networks: A media for interconnecting local and wide area computers and exchanging messages based on protocols. Network entities are visible and they are explicitly addressed(IP address).
- Distributed System: The existence of multiple autonomous computers is transparent.
- 网络:一种用于连接本地和广域范围的计算机,并基于协议交换消息的媒介。网络实体是可见的,并且它们具有明确的地址(IP地址)。
- 分布式系统:多台自治计算机的存在是透明的。
Many problems(e.g., openness, reliability) are in common, but at different levels.
- Networks focus on packages, routing, etc., whereas distributed systems focus on applications.
- Every distributed system relies on services provided by a computer network.
很多问题(例如,开放性、可靠性)在网络和分布式系统中都存在,但是在不同的层次上。
- 网络侧重于数据包,路由等,而分布式系统侧重于应用程序。
- 每个分布式系统都依赖于计算机网络提供的服务。
Distributed systems are based on familiar and widely used computer networks:
- Internet
- Intranet
- Wireless networks
分布式系统基于熟悉且广泛使用的计算机网络:
- 互联网
- 内部网络
- 无线网络
Reasons for Distributed Systems 选择分布式系统的原因
- Functional separation
- Inherent distribution
- Power imbalance and load variation
- Reliability
- Economics
- 功能分离
- 固有分布
- 权力不平衡和负载变化
- 可靠性
- 经济性
Functional Separation 功能分离
Existence of computers with different capabilities and purposes:
- Clients and Servers
- Data collection and data processing
不同的计算机具有不同的功能和目的:
- 客户端和服务端
- 数据收集和数据处理
Inherent Distribution 固有分布
- Information: Different information is created by different people(e.g., Web pages)
- People: Computer supported collaborated work(e.g., virtual teams, engineering, virtual surgery)
- Retail stores and inventory systems for supermarket chains(e.g., Coles, Woolworths)
- 信息:不同的人创建和维护不同的信息(例如,网页上的内容)。
- 人员:计算机支持的协作工作(例如,虚拟团队、工程和虚拟手术)。
- 零售商店和连锁超市的库存系统(例如,Coles、Woolworths)。
Power Imbalance and Load Variation 权力不平衡和负载变化
Distribute computational load among different computers.
将计算负载在不同的计算机之间分布。
Reliability 可靠性
Long-term preservation and backup(replication) at different locations.
在不同的位置进行长期数据保存和数据备份(复制)。
Economics 经济性
- Sharing a printer by many users and reducing the cost of ownership.
- Building a supercomputer out of a network of computers.
- 通过多个用户共享一台打印机来节省成本。
- 使用计算机网络构建超级计算机。
Consequences of Distributed Systems 分布式系统的后果
- Concurrency - each system is autonomous
- Carry out tasks independently.
- Tasks coordinate their actions by exchanging messages.
- Heterogeneity
- No global clock
- Independent failures
- 并发性 - 每个系统都是自治的
- 每个计算机系统独立地执行任务。
- 通过消息交换协调任务。
- 异构性
- 无全局时钟
- 独立失效
Characteristics of Distributed Systems 分布式系统特性
- Parallel activities: Autonomous components execute concurrent tasks.
- Communication via message passing: No shared memory.
- Resource sharing: Printer, database, other services.
- No global state: No single process can have knowledge of the current global state of the system.
- No global clock: Only limited precision for processes to synchronize their clocks.
- 并行活动:自治组件执行并发任务。
- 通过消息传递通信:没有共享内存。
- 共享资源:打印机、数据库、其他服务。
- 没有全局状态:没有单个进程了解系统的当前全局状态。
- 没有全局时钟:进程只能在有限精度上达到时钟同步。
Goals of Distributed Systems 分布式系统的目标
- Connecting users and resources
- Transparency
- Openness
- Scalability
- Enhanced availability
- Concurrency
- 连接用户和资源
- 透明性
- 开放性
- 可扩展性
- 增强的可用性
- 并发性
Examples of Distributed Systems and its Applications 分布系统及其应用示例
Distributed Systems 分布式系统
- Cluster: A type of parallel or distributed processing system, which consists of a collection of interconnected stand-alone computers cooperatively working together as a single, integrated computing resource.
- Cloud: A type of parallel and distributed system, which consists of a collection of interconnected and virtualized computers that are dynamically provisioned and presented as one or more unified computing resources based on service-level agreements established through negotiation between the service and customers.
- 集群:一种并行或分布式处理系统,由一组互相连接的独立计算机组成,它们合作工作,像一个单一的、集成的计算资源。
- 云计算:一种并行和分布式系统,由一组互相连接的虚拟计算机组成。根据服务商和消费者之间的协商建立的服务级别的协议,这些虚拟计算机被动态分配资源并表现为一个或多个独立的计算资源。
Applications 应用
- Web(and many of its applications like online bookshop)
- Data Centers and Clouds
- Wide area storage systems
- Internet banking systems
- User-level communication(Skype, Zoom)
- 网站(以及许多应用程序,如在线书店)
- 数据中心和云计算
- 广域存储系统
- 互联网银行系统
- 用户级通信(如Skype、Zoom)
Challenges of Distributed Systems 分布式系统的挑战
- Heterogeneity: Heterogeneous components must be able to interoperate.
- Distribution transparent: Distribution should be hidden from the user as much as possible.
- Fault tolerance: Failures of a component should not result in failure of the whole system.
- Scalability: The system should work efficiently with an increasing number of users. System performance should increase with the inclusion of additional resources.
- Concurrency: Shared access to resources must be possible.
- Openness: Interface must be publicly available to ease the inclusion of new components.
- Security: The system should only be used in the way intended.
- 异构性:异构组件必须能够互操作。
- 分布透明性:分布应该尽可能地向用户隐藏。
- 容错性:组件的失效不应该导致整个系统的失效。
- 可扩展性:面对不断增长的用户数量,系统应该高效工作。并且系统应该能在添加额外资源时提高性能。
- 并发性:确保资源的有效共享。
- 开放性:分布式系统的接口应该是公开可用的,以便容易添加新的组件。
- 安全性:确保系统仅以预期的方式使用。
Heterogeneity 异构性
Heterogeneous components must be able to interoperate across different:
- Operating systems
- Hardware architectures
- Communication architectures
- Programming languages
- Software interfaces
- Security measures
- Information representation
异构性指的是分布式系统中的各个组件必须能够在不同的方面进行互操作,这些方面包括:
- 操作系统
- 硬件架构
- 通信架构
- 编程语言
- 软件接口
- 安全措施
- 信息表示
Transparent 透明性
Transparent: To hide from the user and the application programmmer the separation / distribution of components, so that the system is perceived as a whole rather than a collection of independent components.
Three forms of transparency:
- Access transparency: Access to local or remote resources is identical(e.g., Network File System / Dropbox).
- Location transparency: Access without knowledge of location(e.g., separation of domain name from machine address).
- Failure transparency: Tasks can be completed despite failures(e.g., message retransmission, failure of a Web server node should bring down the website).
透明性: 在用户和应用程序员看来,系统被视为一个整体,而不是独立组件的集合,以隐藏组件的分离和分布,从而使用户不感知系统的分布。
三种形式的透明性:
- 访问透明性:这意味着对本地或远程资源的访问是相同的。(例如,像网络文件系统或Dropbox这样的系统可以让用户以相同的方式访问本地或远程文件。)
- 位置透明性:这表示用户可以在不知道资源实际位置的情况下访问它们。(例如,将域名与机器地址分离开,使用户能够使用域名访问资源,而不必知道资源在哪台机器上。)
- 失效透明性:这表示系统可以在发生失效的情况下继续执行任务。(例如,消息重传机制可以确保消息在网络中传递,即使有些消息可能会丢失。此外,Web服务器节点的失效不应导致整个网站的崩溃,从而确保了故障透明性。)
Fault Tolerance 容错性
- Failure: an offered service no longer complies with its specification(e.g., no longer available or very slow to be usable)
- Fault: cause of a failure(e.g., crash of a component)
- Fault tolerance: no failure despite faults, i.e., programs to handle failures and hides them from users.
- 失效:指提供的服务不再符合其规范(例如,不再可用或变得非常慢以至于无法使用)。
- 故障:是导致失效的原因(例如,组件的崩溃或错误)。
- 容错性:指尽管存在故障,系统仍能正常工作。也就是说,系统已经经过编程来处理失效,将失效隐藏在用户视线之外。
Concurency 并发性
Provide and manage concurrent access to shared resources:
- Fair scheduling
- Preserve dependencies(e.g., distributed transactions - buy a book using credit card, make sure user has sufficient funds prior to finalizing order)
- Avoid deadlocks
并发性指在分布式系统中提供和管理对共享资源的并发访问:
- 公平调度
- 保持依赖关系(例如,分布式事务可能需要在购买商品之前检查用户的信用卡余额)。
- 避免死锁
Openness and Interoperability 开放性和互操作性
Open system: a system that implements sufficient open specifications for interfaces, services, and supporting formats to enable properly engineered applications software to be ported with a wide range of systems with minimal changes, to interoperate with other applications on local and remote systems, and to interact with users in a style which facilitates user portability.
开放系统:开放系统为接口、服务和支持格式实施了足够开放的规范,使得经过合理工程设计的应用软件可以在不需要大规模更改的情况下移植到广泛范围的系统上。这样以便用来与本地或远程系统上的其他应用程序进行互操作,而且以一种促成用户可移植性的方式与用户互动(用户可以轻松地迁移到不同的系统或平台,并且他们与系统的互动方式应该是一致的,无需学习不同操作系统上的不同界面,而可以在不同操作系统上保持相似的用户体验)。
Summary 总结
- Distributed systems are pervasive.
- The Internet enables users throughout the world to access its services from everywhere.
- Resource sharing is the main factor for constructing distributed systems.
- Construction of distributed systems faces many issues: Heterogeneity, Openness, Security, Scalability, Failure handling, Concurrency, and Transparency.
- Distributed systems enable globalization:
- Community(Virtual teams, social networks)
- Science(e-Science, e-Health)
- Business(e-Banking)
- Entertainment(YouTube, Meta.com)
- Communication(Zoom, WhatsApp)
- 分布式系统是无处不在的,它们存在于我们生活的各个方面。
- 互联网使全球用户能够从任何地方访问其服务。
- 资源共享是构建分布式系统的主要动机。
- 构建分布式系统面临许多挑战和问题,包括异构性、开放性、安全性、可扩展性、失效处理、并发性和透明性。
- 分布式系统促进了全球化:
- 社区(虚拟团队、社交网络)
- 科学(电子科学、电子健康)
- 商业(电子银行等)
- 娱乐(YouTube、Meta.com)
- 通信(Zoom、WhatsApp等)
记忆技巧:“前因后果中特性,未来目标和挑战,54567”
- 原因是“固有权力经济功能可靠”(5)
- 后果是“异构并发时钟失效”(4)
- 特性是“并行状态通信共享时钟”(5)
- 目标是“扩展并发开放透明,连接增强”(6)
- 挑战是“扩展并发开放透明,异构安全容错”(7)