APIs & Integration Strategy
8
min of reading
May 2, 2019

APIs REST, GraphQL or gRPC – Who wins this game?

Rafael Rocha
Head of Solutions and Presales
A technologist degree in Information Technology from UNESP and a postgraduate degree in MBA Business Management from UNIMEP.
More about the author

*article is a summary of presentation carried out during APIDays Madrid 2019 REST standard APIs are the most common, but GraphQL and gRPC APIs are gaining popularity, as well as doubts about the best application of these standards:

What are the characteristics and advantages of each of these standards?

What standard should we choose for our project?

APIs GraphQL -REST - gRPC

To clarify these points, we will consider the requirements of 3 of the main use cases with APIs and understand how each standard can contribute in these cases.

Main cases of use with APIs:

  1. Experience APIs
  2. Open APIs
  3. Internal APIs

1) Experience APIs

They are APIs for consumption by Front-end Apps and Devices for digital experiences.

Below are some requirements:

  • Reduced data transfer time
  • Shorter response time
  • Use in conjunction with BFF standard
  • Fewer requests for screen rendering
  • Higher level of monitoring
APIs REST

2) Open APIs

They are APIs for integrations with partners and open innovation.

Some requirements are:

  • Simple user experience and following better known standards
  • Reuse of APIs
  • Detailed documentation
  • Higher level of security
  • Higher level of governance
Open APIs, APIs REST

3) Internal APIs

They are APIs for communication between microservices and internal integrations.

Below are some requirements:

  • Compatibility with the architecture of events or reactive architecture
  • Better performance
  • Greater scalability
  • Greater level of control and monitoring
Internal APIs

APIs REST, GraphQL and gRPC: Comparison

In the table below, we have compared the REST, GraphQL and gRPC standard features:

API Days Madrid 2019 - REST, GraphQL and gRPC
Main Diferences - REST, GraphQL and gRPC

What now? What is the best option: REST, GraphQL or gRPC?

To choose the best option for your project, we suggest making an eligibility matrix, where the requirements of the use case and a score for each standard will be.

E.g.: Experience APIs – REST, GraphQL and gRPC Eligibility Matrix

Experience APIs - REST, GraphQL and gRPC

E.g.: Open APIs – REST, GraphQL and gRPC Eligibility Matrix

APIs REST gRPC

E.g.: Internal APIs – REST, GraphQL and gRPC Eligibility Matrix

Internal APIs - REST, GraphQL and gRPC
subscribe to our newsletter with exclusive content.

Click and join the Sensedia News!

Click and join the Sensedia News!

Click and join the Sensedia News!

Thanks for reading!