![]() ![]() ![]() Such an approach makes a URI self descriptive and it consists all of the necessary information to execute an action. HTTP verbs (GET, PUT, POST, DELETE and PATCH) define the kind of operation to perform on resource which is defined in the URI. So an action itself is defined in the URL, which is different to GraphQL and gPRC where the action is in the payload. REST makes use of URI and HTTP verbs to make an API centered on resources. REST is more of an architectural style for building APIs, which contains only 6(!) points that you should stick to while designing or implementing REST-based API: It is still the most popular of those three. The history of REST starts in 2000 when it was whitepapered, but was first used ‘on production’ in 2004, according to Google Trends () Queues and Message brokers, which are also sometimes an option, are taken into account in the article. In this article, I’ll attempt to make an overview of the three most popular protocols working at the HTTP layer: REST over HTTP, GraphQL and gRPC (gRPC vs Rest vs graphQL comparison) and point out the advantages and disadvantages of each of them. Nowadays, with the common microservices approach, we also need to set the internal communication. In the past, in the monolith architecture era, we had an API only for Frontend apps or/and for mobile apps. Common designs consist of many services, so we need to choose the protocol for all of them. Among others, we need to decide which protocol to use to communicate between services. While designing an API we need to make a lot of choices.
0 Comments
Leave a Reply. |