Everything you need to know about servers

·

4 min read

Everything you need to know about servers

Before we jump into the world of servers, let's take a moment to understand the different types of applications that we use. You must be aware of all the programming languages like Node.js, Python, Java, and many more that are used to create different types of applications, each having its pros and cons.

Now, applications are mainly divided into two categories - standalone and client-server models.

Standalone applications are those that work independently on a single device without requiring any external connections. For instance, the calculator that you have installed on your smartphone performs calculations without relying on any external servers. All the processing happens on your device itself, making it self-contained and independent.

Second, comes the client-server applications. The client-server model is the way to go when it comes to interacting with a server that manages resources and processes requests. In a chat app, you are the client, and the app is installed on your smartphone or computer. You compose and send messages, while the chat server manages user accounts, receives, stores, and relays messages between clients, and ensures coordinated communication. So, when it comes to managing resources and processing requests, the client-server model is the way to do it.

Well, now let's talk about something super important - servers!

A server is like a really helpful friend who has access to a ton of information. It's a special kind of computer that's always ready to listen and help out whenever other computers or devices need something.

Think about it like this - when you need a file or website, you just ask your server friend and they quickly share it with you. It's pretty cool, right?

But here's the thing - your server friend needs to be on all the time, kind of like the central hub of a busy city. That way, everyone can communicate with the server and share stuff.

So, remember - servers are awesome and super helpful, but they need to be on all the time to work their magic.

There are many types of servers. Some are :

Four types of servers are commonly used in computer networks. They are:

  1. Web server - This type of server hosts and delivers web pages or content to users over the internet. Examples of web servers include Apache and Nginx.

  2. File server - This server manages and provides access to files within a network. Users can store, retrieve, or share files on the server. An example of a file server is Windows Server.

  3. Database server - This server manages and provides access to databases. It handles database queries, updates, and data retrieval. Examples of database servers include MySQL Server and Microsoft SQL Server.

  4. Mail server - This server manages and transfers emails over a network. It handles email storage, sending, and receiving. An example of a mail server is Microsoft Exchange Server.

Now let's talk about server-side code or backend code and the client-side code

Server-side code -

Let's imagine a Chef in a Restaurant - The server side is like the kitchen in a restaurant. It's where all the cooking and preparation happen. People (clients) at the tables (devices) tell the waiter (browser) what they want. The waiter takes the order to the kitchen (server). The chef (server-side code) prepares the meal based on the order. It gets everything ready to be served. Once the meal is ready, the waiter brings it back to the table (browser) for the people to enjoy.

Client-side code -

Imagine a Diner at the table-

Client Request--The diner (client-side) looks at the menu (website) and decides what they want. They tell the waiter (browser) their order.

While waiting, the diner might chat with friends, check the menu again, or do other things at the table (browser activities)(this is known as Client Processing).

When the food (data) arrives from the kitchen (server), the diner enjoys the meal (sees the website content) at their table (browser).

In the world of computing, the collaboration between clients and servers forms the backbone of various applications and services. Servers, whether hosting websites, managing files, databases, or handling emails, play a vital role in enabling seamless communication and resource sharing across networks.

So, next time you send a message in a chat app or access a webpage, remember the behind-the-scenes work of servers making it all possible. Whether it's the independence of standalone applications or the collaborative nature of client-server models, understanding these concepts sheds light on the dynamic and interconnected world of modern computing.

If you have any thoughts, questions, or feedback, I would love to hear from you. Thank you for being an engaged reader!