Introduction

The global network of computers that provides information and communication facilities using some standardized protocol is known as the Internet. The World Wide Web (WWW) refers to the interlinked resources that are stored across these interconnected computing machines. In broad categories, these machines are further classified into clients and servers. The client requests some resources from the server, and in return, the server provides the requested resources to the client. This communication between the client and server is carried out with the help of an API. Before diving deep into the discussion of API, let's understand the basic concepts of the World Wide Web and the Hypertext Transfer Protocol (HTTP). These concepts further paved the way for REST APIs, which we’ll discuss in the coming chapters.

There are many technologies that one might use for client-server communication, but we’ll focus on the HTTP, RPC, and WebSocket protocols in this chapter. We’ll start with WWW because that is the primary use case for an HTTP protocol. The other two (RPC and WebSockets) are used extensively in different use cases. We believe these three collectively cover the major concepts of client-server communications abstractions.

The World Wide Web

The World Wide Web (WWW) is a hypertext-based information system that interlinks documents spread and stored across millions of machines all over the Internet. It’s commonly known as the web or w3.

The World Wide Web was launched by the European Center for Nuclear Research (CERN) in 1989. The initial idea was to support giant teams working across a dozen or more countries and time zones using a constantly changing collection of reports, pictures, drawings, blueprints, and other materials produced by particle physics research. Tim Berners-Lee, a physicist at CERN, proposed the idea of a web of connected documents. The first (text-based) prototype was implemented 18 months later. At the Hypertext '91 conference, other academics were drawn to a public demonstration which inspired Marc Andreessen of the University of Illinois to create Mosaic's first graphical browser in February 1993. This was just the beginning of the World Wide Web, which in just a few decades has transformed millions of lives and revolutionized the world of information and networking.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.