Why Networks Matter in Software Engineering.

Basith
5 min readJul 4, 2024

--

Let’s talk about computer networks. Nowadays, if you say you’re a web developer and I ask about the basics of networking, and you seem unbothered, well, that kind of says a lot. Without a grasp of networking fundamentals, it’s hard to excel in the field. It is a crucial aspect of software engineering that often goes unnoticed until you dive deep into the field. I used to be that person, completely uninterested in concepts like HTTP, TCP, and IP — they seemed like a foreign language. However, looking back, I realize how essential networking is to being a better engineer. So, let me take you through these concepts in simple terms and explain why they matter so much.

What is Networking?

Networking in the context of software engineering refers to how different devices (like computers, smartphones, and servers) communicate with each other. This communication is crucial for various applications we use daily, like browsing the internet, sending emails, and streaming videos. So, let’s start with some key concepts.

HTTP (HyperText Transfer Protocol)

HTTP is the foundation of data communication on the web. It’s the protocol used by web browsers and servers to communicate. When you type a website address in your browser, it sends an HTTP request to the server, which then responds with the requested web page.

One drawback is that HTTP operates over plain text, which means the data sent between your browser and the server is not encrypted. This lack of encryption can potentially expose sensitive information to malicious interception, making it less secure for activities like entering passwords or sharing personal details.

On the other hand, HTTPS (HyperText Transfer Protocol Secure) addresses this security concern by adding an extra layer of protection through encryption. When you visit a website using HTTPS, your browser and the server encrypt the data being transmitted. This encryption ensures that even if someone intercepts the data, they cannot easily read or misuse it.

Imagine you’re shopping online and entering your credit card information to make a purchase. With HTTP, this information travels as plain text, vulnerable to interception. However, with HTTPS, the same information is encrypted, safeguarding it from potential hackers or eavesdroppers.

Difference betwen HTTP and HTTPS.

TCP (Transmission Control Protocol)

TCP is a core protocol of the Internet Protocol Suite. It ensures that data sent over the internet arrives at its destination accurately and in the correct order. Imagine TCP as a reliable mail service that makes sure all the letters (data packets) you send reach their destination intact.

So, how does TCP Work? The Three-Way Handshake;

TCP establishes a reliable connection between two devices using a process called the three-way handshake. This process ensures that both devices are ready to communicate and that the connection is established properly. Here’s a simple explanation of the three-way handshake:

  1. SYN (Synchronize):
  • The device that wants to establish a connection (let’s call it Device A) sends a TCP packet with a SYN (synchronize) flag to the other device (Device B).
  • This packet essentially says, “Hey, I want to start a conversation. Are you ready?”

2. SYN-ACK (Synchronize-Acknowledge):

  • Device B receives the SYN packet from Device A and responds with a SYN-ACK packet.
  • The SYN-ACK packet says, “Yes, I’m ready to start a conversation. Are you ready too?”

3. ACK (Acknowledge):

  • Device A receives the SYN-ACK packet and responds with an ACK packet.
  • This ACK packet says, “Great! I’m ready too. Let’s start communicating.”

After these three steps, the connection is established, and data can be sent between the two devices.

Example:
Let’s say you want to load a webpage on your browser. Here’s how TCP and the three-way handshake work in this scenario:

  1. SYN: Your computer (Device A) sends a SYN packet to the web server (Device B) saying, “I want to load a webpage. Are you ready?”
  2. SYN-ACK: The web server responds with a SYN-ACK packet saying, “I’m ready to send you the webpage. Are you ready to receive it?”
  3. ACK: Your computer sends an ACK packet saying, “Yes, I’m ready. Send me the webpage.”

Once this handshake is complete, the web server starts sending the webpage data to your computer using the HTTP protocol. The HTTP request is sent over the established TCP connection, and the server responds with the webpage data using HTTP. This process ensures that the packets arrive in the correct order and without errors.

So, here’s how it fits together:

  1. TCP Handshake: Ensures a reliable connection between your computer and the web server.
  2. HTTP Request: Your browser sends an HTTP request over the established TCP connection to the web server, asking for the webpage.
  3. HTTP Response: The web server sends back the requested webpage data using HTTP over the same TCP connection.

Why Networking is Important in Software Engineering?

  1. Communication: Most applications today rely on network communication. Whether it’s a mobile app fetching data from a server or a multiplayer game synchronizing actions between players, networking is at the heart of it.
  2. Performance: Efficient networking can greatly enhance the performance of your applications. By optimizing how data is transmitted and received, you can ensure a smoother and faster user experience.
  3. Security: Networking knowledge is vital for securing applications. Understanding how data travels over the internet helps you implement security measures to protect sensitive information from threats like hacking and data breaches.
  4. Scalability: As your application grows, understanding networking helps you design systems that can scale effectively. This means your application can handle more users and more data without slowing down.

Networking might seem complex at first, but it’s a fundamental part of software engineering. By understanding basic concepts like HTTP, TCP, and IP, you gain valuable insights into how applications communicate, perform, and scale. Adopt these concepts, and you’ll be better equipped to build robust, efficient, and secure software.

Thanks for reading! Stay curious and keep learning.

--

--

Basith
Basith

Written by Basith

Software Engineer | Python Developer | Web Developer | ML & AI Enthusiast.

No responses yet