A Brief Overview of API Types, Protocols, and Architectures

Aakashi JaiswalAakashi Jaiswal
4 min read

A short Glimpse of My Day

I woke up at 7:50 a.m.today. Made a tweet of “Rise and shine” and then made my To-Do list, I didn’t have classes today, I tried to utilize my day by planning about my project, made the layout of it. From I will start working on it.

Today I read about API types, protocol, architecture styles & language.

APIs are connected traditionally to an application created from low level programming languages, such as JavaScript.

Modern APIs vary in architecture and use of data formats. They are built for HTTP (Hypertext Transfer Protocol), which is developer friendly and easily accessible and widely understood by applications written in Java, Ruby, Python and many other languages.

As the use of web APIs has increased, which has led to the development and use of protocols, styles, standards and languages. These structure provides a set of defined rules that create accepted data types, commands and syntax. These protocols standardized information exchange.

Types of APIs on the basis of their use case:

-Data/database APIs, which is used to connect applications and database management system.

-Operating system (local) APIs, which are used to define how apps use operating system services and resources.

-Remote APIs, it is used to define how applications on different devices interact.

-Web APIs, which are used to enable data and functionality transfer over the internet using HTTP protocol.

SOAP (simple object access protocol)

Soap vs. Rest API: What's the Difference?

SOAP is a lightweight XML-based messaging protocol specification that enables endpoints to send and receive data through a range of communication protocols including SMTP (simple mail transfer protocol) and HTTP (hypertext transfer protocol.)

SOAP is independent, which allows SOAP APIs to share information between apps running in different environments.

Remote procedure call (RPC)

Rpc Images – Browse 923 Stock Photos, Vectors, and Video | Adobe Stock

Remote procedure call (RPC) is a protocol that provides the high-level communications paradigm used in the operating system.
RPC implements a logical client-to-server communications system designed specifically for the support of network applications. The RPC protocol enables users to work with remote procedures as if the procedures were local.

XML-RPC (XML- remote procedure call)

The XML-RPC protocol relies on a specific XML format to transfer data. XML-RPC is older than SOAP, but simpler, and lightweight in that it uses minimum bandwidth.

JSON-RPC

Like XML-RPC, JSON-RPC is a remote procedure call, that uses JSON (JavaScript Object Notation) instead of XML. JSON is a lightweight format for data exchange that is simple to parse and uses value pairs and ordered lists of values. JSON uses universal data structures, it can be used with any programming language.

gRPC

gRPC is a high-performance, open-source RPC framework initially developed by Google. gRPC uses the network protocol HTTP/2 and is commonly used to connect services in a microservices architecture.

WebSocket

WebSocket คืออะไร ทำงานยังไง (อธิบายแบบละเอียด)

WebSocket APIs enable bidirectional communication between client and server. This type of API does not require a new connection to be established for each communication—once the connection is established, it allows for continuous exchange. This makes Web Socket APIs ideal for real-time communication.

REST (representational state transfer)

Anything Related To Rest Apis | Rest Api Logo | institutodomovimento.com

REST is a set of web API architecture principles. It is called as RESTful APIs, these adhere to certain REST architectural constraints. REST APIs use HTTP requests such as GET, PUT, HEAD and DELETE to interact with resources. REST makes data available as resources, with each resource represented by a unique URI. Clients request a resource by providing its URI.

REST APIs are stateless, that’s the speciality, they do not save client data between requests. It is possible to build RESTful APIs with SOAP protocols.

GraphQL

5 Reasons to use GraphQL at Your Company

GraphQL is an open-source query language and server-side runtime that specifies how clients should interact with APIs.

It allows users to make API requests with just a few lines, rather than having complex endpoints with many parameters. This capability can make it easier to generate and respond to API queries, particularly more complex or specific requests that target multiple resources.

In my next, I will share the difference among them.

What I learnt from today is that, don’t compare yourself from others, if you will do so you won’t be able to accomplish anything, everyone has their own pace of growing.

1
Subscribe to my newsletter

Read articles from Aakashi Jaiswal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aakashi Jaiswal
Aakashi Jaiswal

Coder | Winter of Blockchain 2024❄️ | Web-Developer | App-Developer | UI/UX | DSA | GSSoc 2024| Freelancer | Building a Startup | Helping People learn Technology | Dancer | MERN stack developer