<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Augusto Castilho Borges</title>
    <description>The latest articles on DEV Community by Augusto Castilho Borges (@castilhoborges).</description>
    <link>https://dev.to/castilhoborges</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1501099%2F7f97d560-c754-42dc-8300-1f7717c1ea85.png</url>
      <title>DEV Community: Augusto Castilho Borges</title>
      <link>https://dev.to/castilhoborges</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/castilhoborges"/>
    <language>en</language>
    <item>
      <title>How the Internet Works: From Sending a Photo to Receiving It</title>
      <dc:creator>Augusto Castilho Borges</dc:creator>
      <pubDate>Tue, 18 Feb 2025 18:28:55 +0000</pubDate>
      <link>https://dev.to/castilhoborges/how-the-internet-works-from-sending-a-photo-to-receiving-it-f28</link>
      <guid>https://dev.to/castilhoborges/how-the-internet-works-from-sending-a-photo-to-receiving-it-f28</guid>
      <description>&lt;h2&gt;
  
  
  Sending the Photo
&lt;/h2&gt;

&lt;p&gt;Let's assume you're using a messaging application on your desktop device. These devices are called &lt;strong&gt;End Systems&lt;/strong&gt; because they are at the edge of communication in a network, meaning they are responsible for sending and receiving information. Examples include smartphones, desktop computers, laptops, and even modern refrigerators. Let's also assume that your device already has the stored IP address of a particular friend. The &lt;strong&gt;IP address&lt;/strong&gt; works like your friend’s home address because it guides the message to its final destination.  &lt;/p&gt;

&lt;p&gt;Generally, our devices are connected to a &lt;strong&gt;Wi-Fi network&lt;/strong&gt; or, in the case of a computer or laptop, to an &lt;strong&gt;Ethernet cable&lt;/strong&gt;. These two terms refer to two different &lt;strong&gt;link technologies&lt;/strong&gt;. &lt;strong&gt;Links&lt;/strong&gt; are the connections that link one internet component to another. Both Wi-Fi and Ethernet are &lt;strong&gt;local links&lt;/strong&gt;, meaning they are used within &lt;strong&gt;local area networks (LANs)&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Once this connection is established and you send the photo, the first thing that happens is that your device &lt;strong&gt;breaks the image into multiple smaller packets&lt;/strong&gt;. Each packet, in addition to containing the delivery &lt;strong&gt;IP address&lt;/strong&gt;, also includes important information that allows the image to be &lt;strong&gt;reassembled correctly on the other end&lt;/strong&gt;, like a series of numbered envelopes. This process is similar to mailing a letter but splitting it into multiple parts.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Beginning of Traffic
&lt;/h2&gt;

&lt;p&gt;Let’s assume you are connected using an &lt;strong&gt;Ethernet cable&lt;/strong&gt;. This cable is usually plugged into your &lt;strong&gt;local router&lt;/strong&gt;, and data is sent to this router through the Ethernet connection. &lt;strong&gt;Routers&lt;/strong&gt; then forward this data to your &lt;strong&gt;ISP (Internet Service Provider)&lt;/strong&gt;. ISPs are the companies that connect users to the global internet, usually charging a fee for the service.  &lt;/p&gt;

&lt;p&gt;These &lt;strong&gt;ISPs&lt;/strong&gt; have a &lt;strong&gt;network of switches and links&lt;/strong&gt;. They are usually &lt;strong&gt;cable TV or telephone companies&lt;/strong&gt;. In this example, let's consider a &lt;strong&gt;cable TV company&lt;/strong&gt; as the ISP. When your image packets leave your router, they start traveling through the ISP’s &lt;strong&gt;long coaxial cable&lt;/strong&gt; to a &lt;strong&gt;distribution terminal&lt;/strong&gt;. There, as mentioned earlier, there is a &lt;strong&gt;network of switches and links&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Switches
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Switches&lt;/strong&gt; are network devices that receive, process, and forward data packets to the correct destination within a network. They function like &lt;strong&gt;traffic intersections&lt;/strong&gt;, efficiently directing the flow of information.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Entering the Internet
&lt;/h2&gt;

&lt;p&gt;When the packets reach the &lt;strong&gt;ISP's router&lt;/strong&gt;, it analyzes the &lt;strong&gt;IP address&lt;/strong&gt;. Every router has something called a &lt;strong&gt;forwarding table&lt;/strong&gt;, which determines the best route the packet should take, meaning which link it should follow. Once this is determined, the packets are forwarded through that link.  &lt;/p&gt;

&lt;p&gt;At this stage, some issues you might have heard of can occur, such as &lt;strong&gt;queue delay or packet loss&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Routers have a component called a &lt;strong&gt;buffer&lt;/strong&gt;, which acts like a &lt;strong&gt;waiting queue for packets&lt;/strong&gt;. The buffer temporarily stores packets when the network is congested, helping to prevent immediate data loss. It regulates the flow of packets, gradually releasing them as the network clears up. This is essential to maintaining data integrity during high traffic. However, if the buffer becomes completely full, some packets may be discarded to free up space, leading to &lt;strong&gt;packet loss&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Wow, All This Just for a Single Photo?
&lt;/h2&gt;

&lt;p&gt;Afterward, the &lt;strong&gt;link forwards these packets to another router&lt;/strong&gt;, which has its own &lt;strong&gt;forwarding table&lt;/strong&gt;, repeating the process until they reach your friend's &lt;strong&gt;ISP&lt;/strong&gt;. Once there, the &lt;strong&gt;ISP forwards the packets according to its own forwarding table&lt;/strong&gt; until they finally reach your friend’s home.  &lt;/p&gt;

&lt;p&gt;Your friend's device, using the same protocol that &lt;strong&gt;assembled the packets (TCP)&lt;/strong&gt;, &lt;strong&gt;reconstructs them&lt;/strong&gt;, and voilà, the image appears on their screen. The &lt;strong&gt;TCP protocol&lt;/strong&gt; ensures that all packets &lt;strong&gt;arrive in the correct order and without errors&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Therefore, the &lt;strong&gt;internet&lt;/strong&gt; can be defined as the &lt;strong&gt;interconnection of end systems (or devices), switches, and links&lt;/strong&gt;. Additionally, &lt;strong&gt;protocols&lt;/strong&gt; play a crucial role in this interconnection by defining the &lt;strong&gt;rules and standards&lt;/strong&gt; that allow efficient communication between different devices and networks.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Extra: Layered Protocols
&lt;/h2&gt;

&lt;p&gt;This explanation shows that the &lt;strong&gt;internet is simpler than it seems&lt;/strong&gt;. However, it consists of multiple &lt;strong&gt;technologies and layers&lt;/strong&gt;. Each layer has a specific &lt;strong&gt;protocol&lt;/strong&gt;. A &lt;strong&gt;protocol&lt;/strong&gt; is simply the way we communicate, meaning a &lt;strong&gt;set of rules&lt;/strong&gt; defined for sending and receiving data.  &lt;/p&gt;

&lt;p&gt;On the internet, each &lt;strong&gt;layer has a specific protocol&lt;/strong&gt; that must be followed. Below are some examples of these layers and their respective protocols. You can research them further for a deeper understanding. In future content, I will provide detailed explanations of each internet layer.  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Layers and Their Protocols&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Application Layer&lt;/strong&gt;: HTTP, SMTP, FTP
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport Layer&lt;/strong&gt;: TCP, UDP
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Layer&lt;/strong&gt;: IP
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Link Layer&lt;/strong&gt;: Ethernet, Wi-Fi
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physical Layer&lt;/strong&gt;: Copper wires, Fiber optics, Radio waves
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these layers works together to &lt;strong&gt;ensure that your photo is transmitted correctly and securely&lt;/strong&gt;. For example:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;Application Layer&lt;/strong&gt; prepares the image for sending.
&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Transport Layer&lt;/strong&gt; divides the image into smaller packets and ensures they reach the destination correctly.
&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Network Layer&lt;/strong&gt; determines the best route for these packets to travel across the internet.
&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Link Layer&lt;/strong&gt; manages the transmission of packets between devices within the local network.
&lt;/li&gt;
&lt;li&gt;Finally, the &lt;strong&gt;Physical Layer&lt;/strong&gt; is responsible for the &lt;strong&gt;physical medium that carries the data&lt;/strong&gt;, such as &lt;strong&gt;cables or radio signals&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This layered system is what makes the &lt;strong&gt;internet reliable, scalable, and efficient&lt;/strong&gt; in delivering data, whether it's a simple text message or a large image file.  &lt;/p&gt;




&lt;p&gt;This explanation provides a &lt;strong&gt;simple and didactic&lt;/strong&gt; overview of how the &lt;strong&gt;internet works when sending a photo&lt;/strong&gt;. I hope it helps clarify the different &lt;strong&gt;components and processes&lt;/strong&gt; involved! 🚀  &lt;/p&gt;

</description>
      <category>network</category>
      <category>development</category>
      <category>programming</category>
    </item>
    <item>
      <title>Demystifying Relational Databases</title>
      <dc:creator>Augusto Castilho Borges</dc:creator>
      <pubDate>Fri, 13 Dec 2024 13:57:36 +0000</pubDate>
      <link>https://dev.to/castilhoborges/demystifying-relational-databases-2961</link>
      <guid>https://dev.to/castilhoborges/demystifying-relational-databases-2961</guid>
      <description>&lt;p&gt;Hello, dev!&lt;/p&gt;

&lt;p&gt;Today, we’ll talk simply about what relational databases are, how they work, and why they’re so useful. We’ll also explore key concepts like DBMS and ACID, and at the end, we’ll share some valuable tips for those who want to dive deeper into the topic.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;relational database&lt;/strong&gt; is a way to store data in tables with &lt;strong&gt;rows&lt;/strong&gt; and &lt;strong&gt;columns&lt;/strong&gt;. Each row represents a complete record, while each column holds specific details, like a customer’s name or a product’s price.&lt;/p&gt;

&lt;p&gt;The unique advantage of relational databases is their ability to connect this information. This helps answer questions like: "Which customer bought a specific product?" Let’s imagine a small store that uses a database to manage its sales. It has three tables: one for customers, another for products, and a third for purchases. Here’s an example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Customer ID&lt;/th&gt;
&lt;th&gt;Customer Name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Jorge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Pedro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Eduardo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product ID&lt;/th&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Milk&lt;/td&gt;
&lt;td&gt;5.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bread&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Rice&lt;/td&gt;
&lt;td&gt;20.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Purchase ID&lt;/th&gt;
&lt;th&gt;Product ID&lt;/th&gt;
&lt;th&gt;Customer ID&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;With these tables, we can see that Pedro (customer 2) bought rice (product 3) and Jorge (customer 1) bought milk (product 1). This kind of connection is essential for understanding purchase history and making informed business decisions. Without it, organizing such information would be much more complicated.&lt;/p&gt;




&lt;h2&gt;
  
  
  What are DBMSs?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DBMSs&lt;/strong&gt; (Database Management Systems) are programs designed to manage databases. They help organize, access, and protect data. Additionally, they ensure information remains consistent and secure, even when multiple people use the system simultaneously. Popular examples of DBMSs include &lt;strong&gt;PostgreSQL&lt;/strong&gt;, &lt;strong&gt;MySQL&lt;/strong&gt;, and &lt;strong&gt;SQL Server&lt;/strong&gt;. These systems also allow you to insert, update, delete, or retrieve information using &lt;strong&gt;SQL&lt;/strong&gt; commands.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Makes Relational Databases So Useful?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rules for Consistent Data
&lt;/h3&gt;

&lt;p&gt;Relational databases follow rules to ensure information is accurate and organized. These rules include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Key (PK)&lt;/strong&gt;: Uniquely identifies each record in a table, like a person’s ID number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foreign Key (FK)&lt;/strong&gt;: Links one table to another, enabling relationships between information. For example, the "foreign key" in the purchases table points to the corresponding customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UNIQUE&lt;/strong&gt;: Ensures certain values, like an email, don’t repeat in the table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NOT NULL&lt;/strong&gt;: Requires a column to have a value. For instance, a customer must have a name.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These rules help keep data organized and reliable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security and Control
&lt;/h3&gt;

&lt;p&gt;DBMSs allow administrators to control who can access or modify data. This protects sensitive information, like financial details or customer data, from unauthorized access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Recovery
&lt;/h3&gt;

&lt;p&gt;If something goes wrong, such as a system failure, DBMSs provide backup and recovery features. This ensures data can be safely restored, minimizing issues.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is ACID?
&lt;/h2&gt;

&lt;p&gt;Transactions in databases are operations that include multiple actions, such as recording a sale. For example, when buying something online, the system must log the customer, the order, and the payment. All this must happen in a coordinated way. These transactions follow &lt;strong&gt;ACID&lt;/strong&gt; rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Atomicity (Atomic)&lt;/strong&gt;: Either everything works, or nothing happens. If one step fails, the system cancels the entire operation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency (Consistent)&lt;/strong&gt;: Ensures the database rules are followed. For instance, you can’t log a purchase for a non-existent customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation (Isolated)&lt;/strong&gt;: Transactions occur independently, avoiding interference between them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Durability (Durable)&lt;/strong&gt;: Once completed, the transaction is permanent, even in the event of system failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These features make transactions secure and reliable, essential for complex systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Relational databases are essential tools for organizing and managing information securely and efficiently. They are widely used across various industries, such as banking systems, which require reliable financial transactions, or e-commerce platforms that manage inventories, customers, and orders simultaneously.&lt;/p&gt;

&lt;p&gt;With these technologies, you can trust that data will always be well-structured and accessible. This allows businesses to make decisions based on accurate information, improving efficiency and performance. In this text, we covered the fundamental concepts of relational databases in a basic way. To learn more, we recommend exploring the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The book "Database Systems" by Elmasri and Navathe (&lt;a href="https://encurtador.com.br/LQFM3" rel="noopener noreferrer"&gt;https://encurtador.com.br/LQFM3&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;The official PostgreSQL tutorial (&lt;a href="https://www.postgresql.org/docs/" rel="noopener noreferrer"&gt;https://www.postgresql.org/docs/&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;The W3Schools SQL guide (&lt;a href="https://www.w3schools.com/SQL/deFault.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/sql/&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Practice platforms, like HackerRank (&lt;a href="https://www.hackerrank.com/" rel="noopener noreferrer"&gt;https://www.hackerrank.com/&lt;/a&gt;) and LeetCode (&lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;https://leetcode.com/&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;"Roadmap.sh," an excellent guide for developers (&lt;a href="https://roadmap.sh/" rel="noopener noreferrer"&gt;https://roadmap.sh/&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, there are other types of databases, like non-relational ones, designed for specific needs—but that’s a topic for another day.&lt;/p&gt;

</description>
      <category>database</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is a WEB Server?</title>
      <dc:creator>Augusto Castilho Borges</dc:creator>
      <pubDate>Fri, 27 Sep 2024 18:08:49 +0000</pubDate>
      <link>https://dev.to/castilhoborges/what-is-a-web-server-1kn</link>
      <guid>https://dev.to/castilhoborges/what-is-a-web-server-1kn</guid>
      <description>&lt;p&gt;Today, I’m going to answer a question that caught me off guard in the beginning: what is a WEB server? I used to want to jump straight into a programming language without first understanding the context of everything.&lt;/p&gt;

&lt;p&gt;It may seem like a "stupid" question, but I assure you from personal experience that when I started, I skimmed through it quickly and jumped right into the language.&lt;/p&gt;

&lt;p&gt;Before I continue, I’d like to emphasize something about this idea of asking "stupid" questions. There’s a quote I really like from the book Ultralearning: "Explaining clearly and asking stupid questions can prevent you from convincing yourself that you know something you actually don’t" (Young, Scott, Ultralearning, page 216, HarperCollins).&lt;/p&gt;

&lt;h2&gt;
  
  
  First, I will define what hardware and software are:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hardware&lt;/strong&gt; is a set of physical components of a computing system. Examples include: CPU (processor), RAM (memory), mouse, GPU (graphics card).&lt;br&gt;
&lt;strong&gt;Software&lt;/strong&gt; is a set of instructions (algorithms) that are executed by the hardware. Examples include: Operating System, browser, WEB applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is a WEB Server?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A WEB server, in the context of hardware, is a computer that stores WEB server software as well as the files of a website. It is connected to the Internet and allows the physical exchange of data over the WEB network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The WEB server software contains various instructions that control how the browser or client can access these files or information. The main instruction, which we call a protocol, is the HTTP protocol, which is a text transfer protocol. HTTP servers receive a structured request that contains all the information the client needs (the client sends this request, for example, by clicking on a link that references a specific WEB page). The server then queries where this information is stored or, if necessary, resorts to an Application Server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Static WEB Server e Dynamic WEB Server
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A static WEB server simply returns the files exactly as they are, without making any changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A dynamic WEB server can modify the information before returning it, such as adding an item to a customer's cart in an e-commerce site. To do this, it may request help from an Application Server, which performs the business logic and sends the data back to the client.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Processes
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;The client (or browser) makes a request by typing the domain name of a website.&lt;/li&gt;
&lt;li&gt;The browser sends the domain name to a DNS server, which returns the corresponding IP of the site.&lt;/li&gt;
&lt;li&gt;With this IP, the client makes an HTTP request to the WEB server.&lt;/li&gt;
&lt;li&gt;The WEB server analyzes this request and sends the content accordingly.

&lt;ul&gt;
&lt;li&gt;For example, if we send a request to add an item to the cart in an 
e-commerce site, before responding, the WEB server asks the 
Application Server to look for the product in the database. The 
Application Server then returns the information to the server, which 
sends back to the client the modified file with updated CSS, HTML, 
or JavaScript.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The browser displays everything on the screen, and the site is ready. &lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;This happens extremely quickly. Notice that when you search for a keyword in a search engine, it provides you with a page of various links. When you click on one of those links, depending on your connection, the entire process can be completed in milliseconds. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It was a basic approach to what a WEB server is, but I'm sure that now you have more questions than when you started reading this article. And that’s the fun part of learning! Until next time!! &lt;/p&gt;

&lt;h1&gt;
  
  
  Now in Portuguese
&lt;/h1&gt;

&lt;p&gt;Antes de tudo, vou definir o que é hardware e software:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardware é um conjunto de componentes físicos de um sistema de computação. Exemplos: CPU (processador), memória RAM, mouse, GPU (placa de vídeo).&lt;/li&gt;
&lt;li&gt;Software é um conjunto de instruções (algoritmos) que são executados pelo hardware. Exemplos: Sistema Operacional, navegador (browser), aplicações WEB.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  O que é um servidor WEB?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Um servidor WEB, no contexto de hardware, é um computador que armazena um software de servidor WEB e também os arquivos de um site. Ele é conectado à Internet e permite a troca física de dados na rede WEB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;O software do servidor WEB contém várias instruções que controlam como o navegador ou o cliente pode acessar esses arquivos ou informações. A principal instrução, que chamamos de protocolo, é o protocolo HTTP, que é um protocolo de transferência de texto. Os servidores HTTP recebem uma solicitação estruturada que contém todas as informações de que o cliente precisa (o cliente envia essa solicitação, por exemplo, ao clicar em um link que faz referência a uma determinada página WEB). O servidor, então, consulta onde essas informações estão armazenadas ou, se necessário, recorre a um Application Server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Servidor WEB estático
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Um servidor WEB estático simplesmente retorna os arquivos exatamente como estão, sem realizar alterações.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Servidor WEB dinâmico
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Um servidor WEB dinâmico pode alterar as informações antes de devolvê-las, como, por exemplo, adicionar um item ao carrinho de um cliente em um e-commerce. Para isso, ele pode solicitar a ajuda de um Application Server, que realiza as lógicas de negócio e envia os dados de volta para o cliente. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Processos
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;O cliente (ou navegador ou browser) realiza uma consulta ao digitar o nome de domínio de um website.&lt;/li&gt;
&lt;li&gt;O navegador envia o nome de domínio para um servidor DNS, que devolve o IP correspondente ao site.&lt;/li&gt;
&lt;li&gt;Com esse IP, o cliente faz uma requisição HTTP para o servidor WEB.&lt;/li&gt;
&lt;li&gt;O servidor WEB analisa essa requisição e envia o conteúdo de acordo.
Por exemplo, se enviarmos uma requisição para adicionar um item ao carrinho de um e-commerce, antes de responder, o servidor WEB solicita ao Application Server que busque o produto no banco de dados. O Application Server então devolve as informações ao servidor, que retorna ao cliente o arquivo modificado com CSS, HTML ou JavaScript atualizado.&lt;/li&gt;
&lt;li&gt;O browser exibe tudo na tela, e o site está pronto.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Isso acontece de forma extremamente rápida. Perceba que, ao buscar uma palavra-chave em um mecanismo de busca, ele te dá uma página com vários links. Quando você clica em um desses links, dependendo da sua conexão, todo esse processo pode ser concluído em milissegundos.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Foi uma abordagem bem básica sobre o que é um servidor WEB, mas tenho certeza de que agora você tem mais perguntas do que quando começou a ler este artigo. E isso é o legal de aprender! Até a próxima! &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
