Skip to Content
构建可扩展分布式系统:方法与实践
book

构建可扩展分布式系统:方法与实践

by Ian Gorton
May 2024
Intermediate
278 pages
5h 24m
Chinese
China Machine Press
Content preview from 构建可扩展分布式系统:方法与实践
36
3
分布式系统要点
正如第
2
章所述,扩展系统自然涉及添加多个独立的动态变化部分。我们在多台机器上
运行软件组件,在多个存储节点上运行数据库,归根结底都是为了增加系统的处理能
力。一言以蔽之,我们的解决方案分布在不同位置的多台机器上,每台机器并行处理事
件,且它们之间通过网络交换消息。
分布式系统的基本特征对我们设计、构建和运维解决方案的方式有着深远的影响。本章
将介绍分布式系统要点,它们是了解分布式软件系统的问题及其复杂性所需的基本信
息,内容包括进行网络通信的硬件和软件、远程方法调用、如何处理通信故障的影响、
分布式协作以及分布式系统中棘手的时间问题。
3.1
通信基础
每个分布式系统都包含通过网络进行通信的软件组件。例如,若移动银行应用程序请求
用户的当前账户余额,则会出现以下(简化的)通信序列:
1.
移动银行应用程序通过蜂窝网络向银行发送请求以检索用户的余额。
2.
请求通过
Internet
路由到银行的
Web
服务器所在的位置。
3.
银行的
Web
服务器对请求进行身份验证(确认它来自假定的用户)并向数据库服务
器发送账户余额请求。
4.
数据库服务器从磁盘读取账户余额并返回给
Web
服务器。
5.
Web
服务器将余额作为应用程序请求的响应消息返回,消息穿过互联网和蜂窝网络
路由,直到余额神奇地出现在移动设备的屏幕上。
上述步骤听起来很简单,但实际操作上,一系列的通信隐藏着巨大的复杂性。我们将在
后续内容中探索其中的复杂性。
 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho

Publisher Resources

ISBN: 9787111750697