Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Future of gRPC on replacing REST

 
Greenhorn
Posts: 12
IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Do you think that the role of the gRPC in the market will be more dominant over REST in the future?
Thank you
 
Author
Posts: 16
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Omer Faruk Kurular wrote:Hi,
Do you think that the role of the gRPC in the market will be more dominant over REST in the future?
Thank you



gRPC is already being used as the preferred choice for inter-service communication. gRPC is far superior in performance as compared to REST. Therefore, microservices-based systems mostly use gRPC.

On the web (UI->Backend), REST is still the preferred choice. Recently, gRPC started supporting the web. GraphQL is a more popular choice nowadays and has more probability to replace REST from the top position.
 
Saloon Keeper
Posts: 13384
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What data is there to support the statement that gRPC has superior performance compared to REST?

As far as I am aware, REST is just a set of design principles, and not a specific technology.
 
Omer Faruk Kurular
Greenhorn
Posts: 12
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:What data is there to support the statement that gRPC has superior performance compared to REST?

As far as I am aware, REST is just a set of design principles, and not a specific technology.



I believe the performance difference comes from that rest communications is based on JSON and gRPC is based on Protobuf which is more lightweight than json. It turns out that grpc is 7 to 10 times faster than REST.
 
Stephan van Hulst
Saloon Keeper
Posts: 13384
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
REST does not mandate the use of JSON.
 
Omer Faruk Kurular
Greenhorn
Posts: 12
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:REST does not mandate the use of JSON.


You are right but JSON counts one of the characteristics of REST protocol even if you can use different formats. It seems that researchs made on this topic (REST vs gRPC) are based on this assumption.
 
Sourabh Sharma
Author
Posts: 16
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
REST is built on top of HTTP. Therefore, it involves extra processing for parsing. You can pass data as a query string, headers, or body. Then, you can have data as plain text, JSON or XML. All data types need to serialize and deserialize.

There is no parsing overhead in gRPC and protobuf contains binary data.
 
Stephan van Hulst
Saloon Keeper
Posts: 13384
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
REST is also not built on top of HTTP. Its design was inspired by the HTTP protocol, but you can have a RESTful hypermedia system without using HTTP or JSON.

Even if a RESTful service is accessed through HTTP, I find it strange to state that it incurs a performance penalty because the HTTP must be parsed, while at the same time stating that gRPC incurs no such cost, even though it uses HTTP/2.

At the end of the day, REST is a set of design guidelines, while gRPC is a very specific technology. You can't compare the two.
 
reply
    Bookmark Topic Watch Topic
  • New Topic