About C/S mode, B/S mode, P2P mode

1. C/S mode

Server-client, that is, Client-Server (C/S) structure. The C/S structure usually adopts a two-layer structure. The server is responsible for data management, and the client is responsible for completing the task of interacting with the user

insert image description here
As shown in the figure above, all "WeChat" can be clients, and they need to send the request to the server server first, and then send it to the receiver after the server processes it.

In life, when grabbing red envelopes during the Chinese New Year, sometimes I feel "stuck", because the server requests are frequent, so the response will be slow.

2. B/S mode

The B/S structure (Browser/Server, browser/server mode) is a network structure mode after the rise of the WEB, and the WEB browser is the main application software of the client.
This mode unifies the client and concentrates the core part of the system function realization on the server, which simplifies the development, maintenance and use of the system.
Only one browser, such as Chrome, Safari, Microsoft Edge, Netscape Navigator or Internet Explorer, needs to be installed on the client, and databases such as SQL Server, Oracle, and MYSQL are installed on the server. The browser exchanges data with the database through the Web Server.

Similar to the C/S mode, except that the client is replaced by a browser browser, and the client body is different .

insert image description here

3. P2P mode

The peer-to-peer service model (P2P for short), also known as the "peer-to-peer model", refers to a model that connects individuals to individuals through the Internet, bypassing the central platform and directly providing services and completing transactions. The word Peer means "peer" and "partner" in English.

The early meaning of P2P is the "peer-to-peer network protocol" in the field of computer communication, which breaks the traditional Client/Server (C/S) model and makes thousands of computers connected to each other in a peer-to-peer position.

Each host has two identities, which can be either Server or Client.

The following is an example of P2P download. P2P download is to divide a large file into several data blocks of equal/unequal size.

Suppose there are four people A, B, C, and D. A has a video of 500M. B, C, and D all want to download this video and want A to pass it to them.

insert image description here
A can pass 250m to B first, and B can pass part of it to C and D after getting it, C can pass another part to D, and A can also pass it to D. . It can be understood that in the “人人为我,我为人人”end, B, C, and D all successfully downloaded the video.

In the P2P download environment, the more hosts, the faster the download, which is just the opposite of C/S.

Guess you like

Origin blog.csdn.net/weixin_47505105/article/details/123490653