First of all, let’s compare the monolithic approach, SOA and microservices from the point of view of their main characteristics: granularity and coupling. I will help you to understand the evolution of theses approaches and their advantages and weaknesses.
With the monolithic approach, there is only one software unit, including all the features. It’s the traditional approach. It’s exactly the opposite to microservices.
SOA (Service Oriented Architectures) follows a distributed systems approach whose main characteristics are:
Communication is done via an ESB (Enterprise Service Bus).
A service has four properties:
Microservices are the splitting of an application into small, loosely coupled services. They are the opposite of a monolithic architecture.
Microservices are :
They use lightweight protocols.
Microservices are independent:
The advantages of microservices are :
Microservices are especially very well adapted to Agile and DevOps mindsets:
The API Gateway is the perfect service to set up microservices on Alibaba Cloud.
Serverless is an available service on Clouds (Function Compute on Alibaba Cloud).
The advantages of Serverless are:
Now let’s focus on microservices and let’s introduce the best practices for API RESTs.
REST (REpresentational State Transfer) is a stateless communication between a client and a server based on their separation.
The workflow is as follows.
The first step - A client sends a request to the server, including the following items:
The main HTTP verbs, related to CRUD, are:
The second step - The server sends the response to the client, including the following items:
The main response codes are:
There is something special about the codes 2xx : the response code depends on the verb and embeds semantics:
Now, you should identify clearly when the approach is monolithic, SOA, microservices or serverless. And, more important, you have the basis to implement correctly API REST. These rules are very important.
By Bruno Delb
Alibaba Clouder - February 11, 2021
SeanLiu - April 17, 2020
Alibaba Clouder - April 16, 2019
Alibaba Developer - January 29, 2021
Alibaba Container Service - March 10, 2020
Alibaba Developer - February 4, 2021
Visualization, O&M-free orchestration, and Coordination of Stateful Application ScenariosLearn More
OpenAPI Explorer allows you to call an API through its web interface or WebCLI, and view the entire process.Learn More
API Gateway provides you with high-performance and high-availability API hosting services to deploy and release your APIs on Alibaba Cloud products.Learn More