Types of Network

Challenge 6-1: Network Programming

In modern-day computer systems, there are generally two kinds of network we have to understand.

Peer-to-peer network (P2P) – the simplest form of a network: 2 (or more) computers connected directly to each other. In a P2P network there is no hierarchy, meaning both computers can access the data of the other and they can share resources together. P2P networks are often quite vulnerable to attacks, because accessing any one computer in the network lets you get access to all the information stored in the entire network!

Client-server network – These are slightly more complex and are typically used with a larger number of devices (even millions!). Client-server networks are the most common type of networks in the world today.

The client-server network architecture is based on a centralized “server” (a.k.a., a single central computer) which provides a common connection point for many different “clients” (a.k.a., different devices or users). In this type of network, the client transmits a request to the server, which then sends a response back to the client. The image below gives a useful visualization of this:

In a client-server network, as opposed to a P2P network, there is a strict hierarchy - the server is in charge of what information is available to which client, what gets sent and when. The clients often don't have free access to the server's data, or each other. This makes client-server networks much more secure than P2P networks, but also much slower.

A company such as Google may have thousands of servers to accommodate its many, many clients all around the world. Perhaps one of the world’s biggest networks, however, is the Internet! The word "Internet" is even short for "International Network"!

The Internet is a “network of networks and connects computers all around the globe. At home, your router acts as the server and is connected to the Internet. Through your router, all your other home devices such as your computer, smartphone (or Netflix on your TV!) can also share that Internet access.