w

https://zh.wikipedia.org/wiki/主从式架构

主从式架构 (Client–server model) 或客户端-服务器(Client/Server)结构简称C/S结构,是一种网络架构,它把客户端 (Client) (通常是一个采用图形用户界面的程序)与服务器 (Server) 区分开来。每一个客户端软件的实例都可以向一个服务器或应用程序服务器发出请求。有很多不同类型的服务器,例如文件服务器游戏服务器等。

主从式架构通过不同的途径应用于很多不同类型的应用程序,最常见就是目前在因特网上用的网页。例如,当你在维基百科阅读文章时,你的电脑和网页浏览器就被当做一个客户端,同时,组成维基百科的电脑、数据库和应用程序就被当做服务器。当你的网页浏览器向维基百科请求一个指定的文章时,维基百科服务器从维基百科的数据库中找出所有该文章需要的信息,结合成一个网页,再发送回你的浏览器。

主从式架构意图提供一个可伸缩 (scalable)的架构,借此网上的计算机或者处理过程是一个客户端或者服务器。服务器软件一般,但不总是,运行在强大的专用商业计算机上。另一方面,客户端一般运行在普通个人电脑或者工作站上。

服务端的特征:

  • 被动的角色(从)。
  • 等待来自用户端的请求。
  • 处理请求并传回结果。

用户端的特征:

  • 主动的角色(主)。
  • 发送请求。
  • 等待直到收到响应。

服务器可以是有状态或者无状态的。无状态的服务器不会保留任何两个请求之间的信息,有状态服务器会记住请求之间的信息。这些信息的作用域可以是全局的或者某个事务 (session)的。静态 HTML 页面服务器是一个无状态服务器的例子,Apache Tomcat 是一个有状态服务器。

伺服端与用户端的互动经常使用循序图描述,循序图是 UML 中的一个标准。

https://en.wikipedia.org/wiki/Client-server_model

Comparison with peer-to-peer architecture

In addition to the client–server model, distributed computing applications often use the peer-to-peer (P2P) application architecture.

In the client–server model, the server is often designed to be a centralized system that serves many clients. The computing power, memory and storage requirements of a server must be scaled appropriately to the expected work load (i.e., the number of clients connecting simultaneously). Load balancing and failover systems are often employed to scale the server implementation.

In a peer-to-peer network, two or more computers (peers) pool their resources and communicate in a decentralized system. Peers are coequal, or equipotent nodes in a non-hierarchical network. Unlike clients in a client–server or client–queue–client network, peers communicate with each other directly.[15] In peer-to-peer networking, an algorithm in the peer-to-peer communications protocol balances load, and even peers with modest resources can help to share the load.[15] If a node becomes unavailable, its shared resources remain available as long as other peers offer it. Ideally, a peer does not need to achieve high availability because other, redundant peers make up for any resource downtime; as the availability and load capacity of peers change, the protocol reroutes requests.

client-server model peer-to-peer architecture 主从式架构的更多相关文章

  1. Client–server model

    Client–server model From Wikipedia, the free encyclopedia The client–server model of computing ] Oft ...

  2. Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization【转】

    https://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Proto ...

  3. Peer To Peer——对等网络

    今年的考试.大问题没怎么出现. 就是考英语第二天的下午,发生网络阻塞的现象,不影响大局.可是事出有因,我们还是须要看看是什么影响到了考生抽题.最后查了一圈,发现其它几场的英语考试听力都是19M大小,而 ...

  4. SharePoint Client Object Model API 介绍以及工作原理解析

    CSOM和ServerAPI 的对比 SharePoint从2010开始引入了Client Object Model的API(后文中用CSOM来代替),从名字来看,我们可以简单的看出,该API是面向客 ...

  5. [并发并行]_[线程模型]_[Pthread线程使用模型之三 客户端/服务端模型(Client/Server]

    Pthread线程使用模型之三 客户端/服务端模型(Client/Server) 场景 1.在客户端/服务端模型时,客户端向服务端请求一些数据集的操作. 服务端执行执行操作独立的(多进程或跨网络)– ...

  6. Netty:一种非易失堵塞client/server相框

    Netty:一种非易失堵塞client/server相框 作者:chszs.转载需注明.博客主页:http://blog.csdn.net/chszs Netty是一个异步事件驱动的网络应用框架,为J ...

  7. 深入浅出 Redis client/server交互流程

    综述 最近笔者阅读并研究redis源码,在redis客户端与服务器端交互这个内容点上,需要参考网上一些文章,但是遗憾的是发现大部分文章都断断续续的非系统性的,不能给读者此交互流程的整体把握.所以这里我 ...

  8. 解决在使用client object model的时候报“object does not belong to a list”错误

    在查看别人代码的时候,发现了个有意思的问题,使用client object model将一个文件check in 我使用的是如下语句获取file Microsoft.SharePoint.Client ...

  9. 关于SharePoint 的Client object model该何时load和execut query的一点自己的看法

    很多人在用client object model的时候,不知道何时或者该不该load,今天看到一个观点描述这个问题,觉得很有道理,和大家分享.那就是写client object model就像写sql ...

随机推荐

  1. hdu1509(Windows Message Queue) 优先队列

    点击打开链接 Problem Description Message queue is the basic fundamental of windows system. For each proces ...

  2. Android 之UI自适应解决方式

    1.概况 作为Android开发者,最头疼的莫过于让自己开发的程序在不同终端上面的显示效果看起来尽量一致(当然.假设要充分利用大屏幕的优势另当别论).在全球范围内来讲.android有着数以亿计的设备 ...

  3. mysql调用存储过程出现Illegal mix of collations错误

    执行sql语句正常 执行存储过程 异常 提示 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMP ...

  4. 在训练CNN时,loss稳定在log(类别数)

    参见知乎问题! https://www.zhihu.com/question/275774218 很多框架都会有一个问题,当卷积 weight NaN 之后,卷积的 output 会变成 NaN.然后 ...

  5. MTU的概念,什么是路径MTU? MTU发现机制,TraceRoute(了解)

    1.MTU的概念      MTU即Maximum Transmission Unit 最大传输单元.它是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位). 2.路径MTU     ...

  6. Linux管理员必须知道的sudo命令

    "Sudo"是Unix/Linux平台上的一个很实用的工具,它同意系统管理员分配给普通用户一些合理的"权利",让他们执行一些仅仅有超级用户或其它 特许用户才干完 ...

  7. Atitit. . 软件命名空间与类名命名单词的统计程序设计v2

    Atitit. . 软件命名空间与类名命名单词的统计程序设计v2 1. 要实现的目标1 1.1. Camel字符串模式的分词处理1 1.2. 多个大写的处理1 1.3. 数字与字幕的分离1 1.4.  ...

  8. char device

    /** * alloc_chrdev_region() - register a range of char device numbers * @dev: output parameter for f ...

  9. shell实现洗牌随机

    洗牌问题: 洗一副扑克,有什么好办法?既能洗得均匀,又能洗得快?即相对于一个文件来说怎样 高效率的实现乱序排列? 关于洗牌问题,其实已经有了一个很好的shell解法,这里另外给三个基于AWK的方法, ...

  10. 模式识别 - libsvm的函数调用方法 具体解释

    libsvm的函数调用方法 具体解释 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26261173 须要载入(load)SVM的 ...