Network Protocols

The guidelines needed to manage anything within a perimeter are known as protocols. The networks' communications must be structured in some way. When communication is bound by rules and organized into a structure, it is called a network protocol. Here, TCP/IP, HTTP, and other protocols are used most frequently on the WWW (World Wide Web).

Let’s get familiar with some of these protocols.

1. Internet Protocol (IP)

Internet Protocol (IP), the most basic layer of protocols, will be the first one we discuss. We can implement communication across internet networks using this information.

Under this protocol, the data are transmitted in packets — small bundles of information (2¹⁶ bytes). There are two components in each packet: -

a) The Header

b) The Data

The header holds the metadata about the packet where it states the IP address of the source and the destination.

NOTE: An IP address is a numeric label each device gets when connected to a computer network. It consists of two addresses — Private and Public with two versions — IPv6 which is getting widely used since IPv4 is running out of numerical addresses.

2. Transmission Control Protocol (TCP)

Data transmits via packets in the IP (Internet Protocol) which is small which means there would be multiple packets that can lead to lost or even disordered packets which corrupts the data leading to so many problems. TCP or Transmission Control Protocol was created on top of IP to solve this problem where the data packets are transmitted in order. Its header holds information about the ordering of the packets.

We refer to this protocol as TCP/IP since it’s built on top of the IP. Here, TCP establishes a connection between the two parties before transmitting the data.

3. Hyper Text Transfer Protocol (HTTP)

Moving on, we have HTTP or Hyper Text Transfer Protocol which is an abstraction built on top of TCP/IP protocol. It uses the request-response system which we see in the client-server architecture. This is what we have been seeing on the internet these days. Here, we have moved past the TCP/IP protocol since the requests and responses here have headers and bodies where the data is set by the developers.

HTTP methods also have some commands like “GET”, “POST”, “PUT”, “DELETE”, and “PATCH”.


These protocols govern the communication between machines and software lying in the given network. Knowing this always helps us understand the complex topics we will discuss in the upcoming articles.

So this is all about this post.

Happy to see you hereπŸ˜€πŸ˜‡.



visit for more posts.


What is REST API?

 Introduction to REST API!!!!πŸ‘‡πŸ‘‡πŸ‘‡

 REST stands for representational state transfer and was created by Roy Fielding, a computer scientist.

 A REST API is an application programming interface that adheres to the REST architectural style’s requirements and allows users to communicate with RESTful web services.

REST is a hybrid architectural style that combines multiple network-based architectural styles with extra limitations that establish a standardized connector interface.

When we talk about an API, we’re talking about a set of definitions and protocols for creating and integrating software applications.

Deriving REST πŸ‘‡

The following is a description of it. An architectural pattern, which includes a set of constraints applied to pieces within the architecture, can explain the design rationale for web architecture. It is possible to notice the properties generated by the web’s constraints by examining the impact of each constraint as it is added to the spinning style. Then, to establish a new architectural style that better reflects the necessary qualities of current web architecture, more limitations might be applied.

The 6 very important constraints of REST

Six limitations are described in the REST architectural style.

The 6 constraints are as follows.

1. Uniform interface.

2. Stateless.

3. Cacheable.

4. Client-server

5. Layered system.

6. Code on demand.

Uniform Interface πŸ‘

The overall system architecture is reduced and the visibility of interactions is sharpened by applying the software engineering principle of generality to the component interface.

To achieve a unified interface, multiple architectural constraints are required to guide component behavior.

REST is described by four interface constraints.

They are;

· Resources must be identified.

· Using representations to manipulate resources.

· Messages that describe themselves.

· Hypermedia as the application state engine

Stateless πŸ‘

Each request from the client to the server must include all necessary information to comprehend the request and should not rely on any server-stored context. As a result, the client retains total control over the session state.

Cacheable πŸ‘

Due to budget limits, data in a response to a request must be explicitly identified as cacheable or noncacheable. If a response is cacheable, the client cache has the right to reuse the response data for similar requests in the future.

Client-Server πŸ‘

We develop the user interface’s mobility across many platforms and scalability by simplifying the server components and separating the user interface and data storage concerns.

Layered system πŸ‘

By restricting component behavior such that each component cannot oversee the immediate layer with which they are interacting, the layered system pattern allows an architecture to be made of hierarchical levels.

Code on demand (optional) πŸ‘

REST allows you to expand client functionality by downloading and running code in the form of applets or scripts. Clients benefit since the number of functionalities that must be pre-implemented is reduced.

This is all about Rest API Introduction.

Thanks for Being here.
 visit for more.

What is JSON?

 JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.

It is mainly used to store data in document databases and transport data between different applications, primarily servers and web applications.

JSON is also frequently used in RESTFul APIs to provide data in the request and response body. Below is an example JSON document summarizing a menu of a restaurant.

JSON supports the following two data structures;

  1. Collection of name/value pairs
  2. An ordered list of values − It includes arrays, lists, sequences, etc.
A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value. So in the below example, the name is “firstName”, and the value is “John”.

Example: “firstName”: “John”

You need to put text values between double quotes. You do not need double quotes for numbers, boolean values, or null values.

Example: “age”: 24

In JSON, values must be one of the following data types:

String — Strings in JSON must be written in double quotes
Number — Numbers in JSON must be an integer or a floating-point
Object (JSON object) — Values in JSON can be objects. However, objects as values in JSON must follow the same rules as JSON objects.
Array — Values in JSON can be arrays. Array values are provided between []
Boolean — Either true or false value
Null — Empty value or no value