IB COMPUTER SCIENCE | A2.2.3 Networking Models

Lesson objective

Compare and contrast client-server and peer-to-peer networking models, their benefits, drawbacks and practical applications.

Learn

A2.2.3 | COMPARE AND CONTRAST NETWORKING MODELS

01 | WHO PROVIDES THE RESOURCE?

Three students need the same video for a project. They could all download it from a school service, or they could obtain authorised copies from one another’s computers. Both approaches move data across a network, but the resource-provider roles are organised differently.

A networking model describes how participants provide and use services. In a client-server model, clients request services from designated server software. In a peer-to-peer (P2P) model, participants can both request resources and provide them to other peers.

Neither label tells you the cable layout. You can run peer-to-peer file sharing over a switched physical star. You can also run client-server applications across an interconnected mesh backbone. Model concerns service roles; topology concerns connections.

This lesson compares the two models using control, cost, security, performance, scalability and reliability, then applies the comparison to web browsing, email, banking, file sharing, VoIP and blockchain.

02 | CLIENT-SERVER: A DESIGNATED SERVICE PROVIDER

A client requests or uses a service. A server provides it. Your browser is a client when it requests a lesson from a web service; the server handles the request and returns an HTTP response.

The roles belong to software and interactions, not to a permanent category of hardware. A server can itself be a client of a database, and a laptop can host server software. One physical machine can host several services; one service can run across many machines.

A key feature is the designated service responsibility. Users rely on the service provider to supply the shared resource, apply relevant rules and manage its state. This can simplify administration, but it also creates dependencies that need to be designed carefully.

SERVICECLIENT ACLIENT BCLIENT CCLIENT D
Client-server: clients use a service supplied by server software. The service can run on one or many hosts. Lines represent communication in both directions.

03 | FOLLOW A SCHOOL PORTAL REQUEST

A student signs in to the school portal and requests their timetable. The browser sends a request to the web application. The application checks the student’s identity and permissions, obtains the appropriate records and returns the result.

The browser can display the timetable and offer buttons, but the authoritative access checks must also occur on the service side. Hiding another student’s link in the browser is not enough if changing the request could still expose their records.

Central service management gives administrators a place to change policy, maintain records and monitor access. Multiple service instances can cooperate behind a common endpoint. That remains client-server from the browser’s perspective, even though the implementation is distributed.

Central responsibility does not guarantee correctness. A mistake in a shared permission rule or a successful attack on a central account system can affect many users. The benefit is the ability to manage a common policy; the responsibility is to implement and maintain it properly.

04 | CLIENT-SERVER: BENEFITS AND COSTS

For a school, central account and file management can make everyday work easier. An administrator can apply a permission policy, arrange backups and manage a shared version of a resource rather than relying on every student to configure their own sharing correctly.

Specialised equipment and trained support can improve service capacity and dependability. However, servers, licences where applicable, administration, power, backup and recovery arrangements all have costs. Cloud services shift some responsibilities and charging patterns rather than making these concerns disappear.

Clients also depend on reaching the service. A single unprotected server can become a bottleneck or a single point of failure. A well-designed service can use multiple instances, load distribution, replicated data and failover, so client-server does not inherently mean “one machine that must fail”.

Growth requires planning. Adding clients increases demand, and shared databases or network links may limit throughput even after extra web instances are added. State the actual constraint instead of saying the model is always slow or always easy to scale.

05 | PEER-TO-PEER: PARTICIPANTS CAN BOTH GIVE AND RECEIVE

In a peer-to-peer model, participants can contribute resources as well as consume them. Computer A may request a file from B, then supply a different file to C. During those individual exchanges, one endpoint requests while another responds, but the overall system does not assign all resource provision to a dedicated central server.

Peers need not have identical hardware, identical data or equal connection speeds. “Peer” describes the service arrangement, not a promise that every machine has exactly the same capabilities or privileges in every real implementation.

A small group can share resources without buying a dedicated central file server. Large P2P systems can distribute content or work among many participants, but discovery, coordination, trust and changing availability still need mechanisms.

Some implementations use central infrastructure for login, discovery or coordination while transferring data between peers. Describe those parts separately rather than forcing the entire application into a pure category.

PEER APEER BPEER CPEER D
Peer-to-peer: peers can request and provide resources. These are example logical exchanges, not a full physical mesh. Lines represent communication in both directions.

06 | PEER FILE SHARING: WHO HAS THE CONTENT NOW?

Suppose A has an authorised video and B downloads it from A. Later, C can obtain it from A or B if both have a complete available copy and permit sharing. Extra providers can reduce reliance on the original machine.

Some P2P distribution protocols divide content into pieces, so a participant can obtain different pieces from different peers. A peer may contribute upload capacity while downloading. Finding sources and checking pieces require protocol mechanisms; peers do not simply trust any bytes sent to them.

Availability depends on the resources actually present. If the only peer holding a needed file goes offline, that file can become unavailable even when hundreds of other peers remain online. Multiple peers do not automatically mean multiple usable copies of every resource.

Also consider the user’s machine. Serving files consumes network bandwidth, storage access and possibly processor time. A sleeping laptop or a user leaving the network changes the resources available to others.

07 | PEER-TO-PEER: BENEFITS AND COSTS

P2P can spread resource provision across participants and avoid dependence on a single dedicated content server. In a small trusted group, setup and initial equipment costs may be low. In a larger distribution system, new peers may add upload capacity as well as demand.

Those benefits are conditional. Peers can contribute little bandwidth, leave unexpectedly or hold only some content. Discovery and coordination generate work, and network address translation or firewall restrictions can complicate direct connections. P2P is not automatically faster or infinitely scalable.

Management can be less uniform when permissions, updates and backups are handled separately across user machines. Protecting the system requires appropriate identity, encryption, authorisation and validation measures for its design. P2P is not inherently insecure, but it does not remove the need for security administration.

Decentralised content can improve resilience when enough suitable copies remain accessible. It can also make version control, deletion, consistent updates or compliance with a common policy more difficult. Explain what is distributed and how it is coordinated.

08 | COMPARE THE MODELS DIRECTLY

FactorClient-serverPeer-to-peer
Resource rolesDesignated services provide resources to clientsParticipants can both consume and provide resources
AdministrationCommon service policy and data can be managed centrallyManagement may be distributed; coordination and policy still needed
CostDedicated service infrastructure/support may cost more; managed options varyMay avoid a dedicated content server, but peers and coordination still have costs
ReliabilityService dependencies need redundancy and tested recoveryDepends on reachable peers holding the required resources
PerformanceService capacity and shared dependencies can bottleneckPeer upload rates, piece availability and coordination can bottleneck
ScalabilityAdd resources/instances with suitable state and load designNew peers may add capacity and demand; growth is not automatically beneficial
SecurityCentral enforcement can simplify control but central compromise can have broad effectsDistributed trust and permissions require design; no automatic security guarantee

Both models communicate over networks using agreed rules and need suitable capacity, protection and dependable operation. A good comparison includes these similarities as well as differences. Compare the same factor on both sides rather than listing unrelated facts.

09 | TEST AVAILABILITY UNDER STATED CONDITIONS

The activity below compares a simple client-server file service with P2P file sharing. In the client-server example, all clients need one service that has no failover. In the P2P example, A and B hold complete verified copies, C does not, and sharing is permitted. The requester is a separate healthy participant.

These are deliberately specified designs. A replicated client-server service could survive a host failure, and a P2P resource with only one copy could disappear when its owner leaves. The model label alone does not decide the result.

10 | WEB BROWSING, EMAIL AND ONLINE BANKING

Web browsing is commonly client-server: the browser requests resources from a web service. The service might use caches, proxies and many backend instances, but that does not make the browser a peer provider of the site’s resources.

Email includes several interactions. A user’s client submits to a mail service and accesses a mailbox. Mail servers then transfer messages between domains, acting as sender-side clients and recipient-side servers in those exchanges. Several cooperating servers do not automatically make the user-facing service P2P.

Online banking typically uses a client application connected to bank-controlled services, which enforce access rules and maintain authoritative account records. This suits coordinated transactions, audit and central policy. It also requires resilient infrastructure and strong security; client-server alone does not supply either.

The important question is which interaction you are describing. A large system can contain many roles and implementation layers without changing the model of the particular service a user accesses.

11 | FILE SHARING AND VOICE OVER IP

File sharing can use either model. A school file server supplies centrally managed folders to clients. A P2P distribution system lets peers supply content to one another. Sharing files is an activity, not a unique model.

Voice over IP (VoIP) carries voice using IP networks. A call can use central services for accounts and signalling while its media travels directly between endpoints where possible. Signalling sets up or coordinates the call; the media carries the actual audio.

If direct media cannot be established, a relay can carry it. Some systems use centrally hosted media servers by design. Therefore “all VoIP is P2P” and “every part of a call must go through one server” are both poor generalisations.

This is an example of a mixed design: central coordination and peer media can coexist. That is different from a hybrid physical topology, which combines connection arrangements such as stars and mesh links.

12 | BLOCKCHAIN: DISTRIBUTED PARTICIPATION NEEDS RULES

Many public blockchain networks use P2P communication to distribute transactions and blocks among participating nodes. Nodes can validate and relay data according to protocol rules rather than obtaining every item from one central content server.

Replication means multiple nodes can hold relevant ledger data. Consensus mechanisms coordinate agreement about accepted history under the system’s assumptions. Copying data between peers alone does not solve agreement or prevent malicious behaviour.

Node roles and storage vary. Not every participant stores the entire history or performs the same validation or block-production role. Permissioned networks may restrict membership and use different governance arrangements.

A mobile wallet may contact one provider’s API using client-server communication while that provider participates in a P2P blockchain network behind the scenes. The existence of blockchain therefore does not mean every related application interaction is P2P.

13 | CHOOSE FROM REQUIREMENTS, NOT SLOGANS

A small temporary group sharing low-risk resources may value low initial cost and direct sharing. A school managing sensitive records may value common identity controls, permissions, backups and accountable administration. A large authorised-content distribution system may benefit from peers contributing capacity.

Ask how many users there are, who controls the data, what must remain available, how updates are coordinated and what the support team can maintain. Then connect a model’s characteristic to that requirement.

For example: “Client-server supports centrally maintained permissions for student records, so the school can apply a consistent access policy. The service still needs protected recovery and sufficient capacity.” Or: “P2P can distribute upload work, provided enough reachable peers hold the requested pieces.”

Models can be combined, and adding redundancy or coordination changes their practical limitations. A justified answer identifies the assumptions rather than promising that one model is best for every task.

14 | CAPACITY: WHAT DOES THE SIMPLE NUMBER REALLY SHOW?

Suppose a single content service has 120 Mbit/s of available upload capacity and six clients download simultaneously. Under an ideal equal-share assumption, each receives at most 20 Mbit/s before other bottlenecks and protocol overheads.

If a P2P distribution has three providers each offering 20 Mbit/s of usable upload, their nominal total is 60 Mbit/s. That is useful only if the required content is available and traffic can be distributed across them. A downloader with a 10 Mbit/s link still cannot receive 60 Mbit/s through that link.

These illustrative numbers are not a benchmark. They show why adding providers can help but why peer count alone cannot predict performance. Clients, server instances and peers all operate within real link and processing limits.

When comparing scalability, describe both added demand and added capacity. Adding a P2P participant that only downloads can initially add load; adding a new client to a central service does not automatically add service capacity.

15 | CLASSIFY THE PARTICULAR INTERACTION

Choose the best description for the stated exchange. Some answers require recognising a mixed system. Focus on the specific roles rather than the application’s brand or its physical wiring.

16 | COMPARE AND CONTRAST IN A CONNECTED ANSWER

Compare and contrast means identify relevant similarities and differences. Use a common factor, describe both models and connect the difference to the situation. A table can organise your thinking, but your written answer should make the relationships explicit.

For example: “Both models allow networked participants to access shared resources. Client-server assigns service provision to designated services, whereas P2P participants can both request and provide resources. This makes common access policy easier to administer centrally in a school file service, while direct peer sharing can avoid a dedicated file host for a small group.”

Then qualify reliability: “A single client-server service without failover can interrupt all dependent access if it fails. A P2P file can remain available if another reachable peer holds it, but it is lost to requesters when all usable copies become unavailable. Replicated services and coordinated backups can change these outcomes.”

Use both, whereas, however, because and therefore to build comparisons. Avoid “P2P has no security”, “client-server always has one physical server” and “P2P requires a physical mesh”.

MATCH THE MODEL IDEA TO ITS MEANING

Terminology

Terminology

Networking model

How participants provide and use network services.

Client-server model

Clients use designated services supplied by server software.

Peer-to-peer model

Participants can both request and provide resources to peers.

Client

A participant requesting or using a service in an interaction.

Server

Software providing a service, or a host running it.

Peer

A participant capable of consuming and contributing resources in a P2P system.

Dedicated service

A designated service responsibility; it need not occupy one physical machine.

Central administration

Managing shared service policy or resources from a common administrative system.

Decentralisation

Distributing responsibilities among participants rather than relying entirely on one central provider.

Resource sharing

Making resources available to other participants under applicable rules.

Discovery

Finding participants or services that can supply a resource.

Coordination

Organising participants so their actions work together.

Bottleneck

A limited resource constraining a particular workload’s performance.

Scalability

Supporting growth while maintaining acceptable service.

Upload capacity

The sending capacity a provider can contribute to transfers.

Single point of failure

A component whose failure interrupts a dependent service.

Redundancy

Additional resources or components supporting selected failure recovery.

Replication

Maintaining multiple copies of data or state.

Backup

A protected recoverable copy from a point in time, distinct from live replication.

Availability

Whether a required resource or service can be accessed when needed.

Churn

Participants joining and leaving a distributed system over time.

Authentication

Checking an identity claim.

Authorisation

Determining permitted actions.

Integrity

Protection against unauthorised modification; correctness checks depend on the mechanism.

Authoritative record

The accepted source of record for a defined purpose.

VoIP

Voice communication carried using IP networks.

Signalling

Communication used to establish or coordinate a session.

Media relay

An intermediary forwarding media when required by the design or connectivity.

Blockchain consensus

Mechanisms coordinating accepted ledger history under a system’s rules and assumptions.

Overlay network

A logical arrangement of communication built over underlying network connections.

Questions

Questions

CHECK YOUR UNDERSTANDING

Select all correct choices. Each exact set earns one point.

1. Which describe client-server?
2. Which describe P2P?
3. Which correctly distinguish models from topologies?
4. Which are potential client-server benefits?
5. Which are realistic P2P limitations?
6. Which are careful reliability statements?
7. Which examples are correctly qualified?
8. Which apply to blockchain-related systems?
9. Which affect performance comparisons?
10. Which make a strong comparison?

EXPLAIN AND COMPARE

Write your answers before revealing each sample.

1. Compare and contrast client-server and peer-to-peer resource roles.

2. Explain why P2P does not require a physical mesh.

3. Compare administration for a school file service.

4. Compare reliability under specified failures.

5. Explain why a cloud service can remain client-server.

6. Compare the likely costs for a small trusted sharing group.

7. Explain why more P2P participants do not guarantee faster downloads.

8. Describe client-server interactions in email.

9. Compare possible file-sharing implementations.

10. Explain how VoIP can combine models.

11. Explain why blockchain communication is not a guarantee of universal availability or security.

12. Suggest a justified model for sensitive school records and compare an alternative.

COMPARE IT | TWO DIFFERENT SHARING NEEDS

A school needs a controlled system for confidential student records. A separate temporary group wants to distribute an authorised large video among its members. Compare client-server and P2P for each situation using common factors: control, cost, capacity, reliability and security. Identify the assumptions behind your recommendation and explain one remaining dependency.

Flashcards

Flashcards

Click to flip. Select the ideas you need to revisit.

0 cards selected for revision.

    Selections are kept while this page is open.

    Workbook

    Workbook

    COMING SOON

    The workbook for A2.2.3 Networking Models is coming soon. Complete the matching task and written questions in your exercise book.