Understanding the Basics of Backend Engineering: A Comprehensive Guide for Beginners

In our day-to-day activities, we interact with apps, websites, and other digital tools. Behind these tools, lies the concept of backend engineering. It is the aspect of the web that processes data and business logic, behind the scenes. For someone trying to get started with backend engineering, there are some concepts that one should understand for a smoother learning journey. This article will explore some of these concepts and how they are essential in backend development.

How the internet works

The internet is a huge collection of interconnected computers that can communicate with each other. This communication flows from the client to the server and back to the client. But what is a client? What is a server? A client is a device (computer/ smartphone/etc) that requests a service/ resource on the internet. On the other hand, a server is a device on the internet, that receives requests from the client and responds with the requested data.

For this communication, computers need a set of rules on how to exchange data. That's where TCP/IP protocol comes in. It defines the rules and formats to be used in computer-computer communication. In a network, each device has a unique IP address. Think of it as a house number on the street, that the delivery guys use to identify which house requested a Pizza and which needs a Burger. An IP address looks like 192.168.1.1. But can you memorize a bunch of these weird numbers? Probably not. We need a more memorable name for the (houses) if we were to make a delivery. Think of a phone directory with hundreds of phone numbers. To remember the owners of these phone numbers, you save the numbers against their owners. Something like: Mr White —> +81 323 6374. Similarly to houses and phone directories, we have systems that map IP addresses to easily memorable names so instead of having to remember the IP address of Google/ Facebook, you can just key in its domain name. These systems are known as domain name systems (DNS).

Request flow: What happens behind the scenes?

When you use your browser (client) to access a certain website, it sends a request to the server (the device where the website is hosted) specifying the information that you are looking for (Normally, the website domain name). The server then receives the request and locates the requested files/ resources. At times, many users may try to access the same website. To manage the high number of requests, a load balancer distributes them appropriately across the available servers. Think of a cafe with 5 chefs, a kitchen supervisor, and waiters. When a customer enters the premises, a waiter will take the customer's request to the kitchen for processing. In the kitchen, it is the work of the supervisor to see which chef is less busy/ has a lower workload to process the incoming order. In this case, the supervisor acts as a load balancer, ensuring that a particular chef is not overwhelmed with orders.

The server will process the request by retrieving the requested resources from the database and sending it back to the client. When the chef (server) receives an order (request) for popcorn (resource), he/she will look for the popcorn machine (database), take out the desired amount, package it, and send it to the customer (client) through the waiter( API).

HTTP Verbs: The language of clients and servers

Earlier on, we saw how the client sends a request to the server. In that request, the client will specify the actions that it needs, Whether it is to read data, delete some information, update user profiles, or save some files into the database. To achieve this, each request from the server contains a verb for the desired action - HTTP verbs. They include: GET, PUT, PATCH, DELETE, POST, etc.

  1. GET - retrieves information from the server

  2. POST - submits data to the server

  3. PUT/PATCH - used for updating information

  4. DELETE - deletes resources

Why backend engineering is important

Backend engineering acts as the core of the web and mobile applications by ensuring that data is stored, retrieved, and manipulated appropriately depending on user requests. Thus, understanding the above concepts will give you a solid foundation for backend engineering.