API stands for Application Programming Interface.
APIs are mechanisms that enable two software components to communicate with each other using a set of definitions and protocols.
API architecture is usually explained in terms of client and server. The application sending the request is called the client, and the application sending the response is called the server
There are four different ways that APIs can work depending on when and why they were created
1. SOAP APIs
SOAP is the Simple Object Access Protocol, a messaging standard defined by the World Wide Web Consortium and its member editors.
SOAP uses an XML data format to declare its request and response messages, relying on XML Schema and other technologies to enforce the structure of its payloads.This is a less flexible API that was more popular in the past.
RPC APIs
These APIs are called Remote Procedure Calls. The client completes a function (or procedure) on the server, and the server sends the output back to the client.
When used for CRUD, RPC is just a case of sending up and down data fields, which is fine, but one downside is that the client is entirely in charge of pretty much everything.
The client must know which methods (endpoints) to hit at what time, in order to construct its own workflow out of otherwise naive and non-descriptive endpoints.
REST APIs
REST stands for Representational State Transfer. REST defines a set of functions like GET, PUT, DELETE, etc. that clients can use to access server data. Clients and servers exchange data using HTTP.
These are the most popular and flexible APIs found on the web today. The client sends requests to the server as data. The server uses this client input to start internal functions and returns output data back to the client.
The main feature of REST API is statelessness meaning that servers do not save client data between requests. Client requests to the server are similar to URLs you type in your browser to visit a website. The response from the server is plain data
4. Websocket APIs
The WebSocket API invokes your backend based on the content of the messages it receives from client apps. Unlike a REST API, which receives and responds to requests, a WebSocket API supports two-way communication between client apps and your backend
Vercel is Introducing Turbopack: Rust-based successor to Webpack
Turbopack will be the Web’s next-generation bundler.
(Thread)
Webpack has become an integral part of building the Web, it has been downloaded more than 3 billion times.
Vercel, the company behind NextJS, mission is to provide the speed and reliability innovators need to create at the moment of inspiration and thus introducing Turbopack.
Led by the creator of Webpack, Tobias Koppers, Turbopack will be the Web’s next-generation bundler, it is built on a new incremental architecture for the fastest possible development experience