aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Architecture
  • Cloud-Native
  • Programming

Integration Challenges In Microservices Architecture With gRPC & REST

  • aster.cloud
  • February 15, 2022
  • 3 minute read

Abstract: This blog is envisaged to explain the integration challenges that technologies like gRPC and REST bring into E2E microservices architecture. It summarizes the problems evident currently while implementing microservices which needs to primarily 

  1. communicate internally between services and
  2. externally to user or 3rd party systems

It also provides distinct insights on the absence of a standardized solution across the technology stack from any of the available open-source frameworks.  


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Introduction

Adoption of microservices architecture is on the rise and is being widely accepted for the flexibility including maintainability and scalability that it brings to the table. With containerization, microservices architecture becomes even more powerful allowing users to create applications focusing on their capabilities rather than solving the dependencies. Cloud native application development is powered by microservices architecture using containers.

Distributed systems are complex to design and becomes even more complicated with the varying nature of business requirements For achieving E2E business capability multiple microservices need to be interconnected or invoked. Choice of integration technologies become critical, the common approach being followed currently is for any inter-service communication leverage gRPC (Google Remote Procedure Call) and for any client facing services leverage REST (Representational State Transfer) API.

gRPC – follows RPC API implementation leveraging HTTP 2.0 protocol and protocol buffers for message exchange.

REST – architecture follows HTTP protocol and data format used for messaging is JSON or XML

Problem statement

The challenge in designing and developing a capability which need to be consumed internally by other services and exposed to 3rd party systems or users

Read More  What Was Your First Programming Language?

Let us consider a sample scenario, of an order management system consisting of an order manager and product inventory microservice.

  • The Product Inventory services holds all the product details & its relationships including the various categories. REST API is required to expose the product details & its relationships to external systems and user interfaces.
  • The Order Manager service interfaces with another digital channel which acts as the front-end system for customer ordering. This internally invokes the Product Inventory service to validate the product inventory details.

In the current scheme of things there are multiple approaches possible where we could address such a requirement, few such options are detailed below: –

Option 1:

Following an approach where any inter-service communication leverage gRPC and for any client-facing services leverage REST.

REST/gRPC graph
  • Expose the Product Inventory service via gRPC for inter-service communication
code to xpose the Product Inventory service via gRPC for inter-service communication 
code to expose the Product Inventory service via gRPC for inter-service communication 

We have used Protobuf definition for the contract and used java to generate server-side implementation.

  • Additional coding like creating a rest controller and translation of response is required to expose the same as REST API for 3rd party systems to consume.
code to create a rest controller and translation of response
code to create a rest controller and translation of response
code to create a rest controller and translation of response

Additional coding complexity and dependency management for handling both gRPC and REST.

Follow microservices aggregator pattern,

Option 2:

Microservices aggregator platform diagram with REST/GraphQL and gRPC
  • Create an aggregator service which would expose the REST API capabilities by aggregating the responses from different services or have the wrapper REST API service implemented. This would also have the gRPC client implementation that is required to communicate with other internal services for aggregating the response. Translation code to create API response from protocol buffers will be included here.
Read More  How To Test If We're Living In A Computer Simulation
code to create an aggregator service
code to create an aggregator service

gRPC and protocol buffer forces developers to strictly adhere to a contract ensuring that messages are secure and not lost between communications. While the contract first nature and co-developed approach of defining RPC is good between related services, the aggregator service brings an overhead.

Inference

Architects put a lot of thought into designing distributed systems. Having an efficient integration pattern defined is key to the success of the solution.

Below is a summarized view of the various integration options and the challenges: –

  • Expose data as REST (JSON based) internally and externally: -This approach which is most popular, unfortunately does not cater for all requirements. This is not ideal for data intensive inter service communications due to the limitations of JSON payloads and HTTP protocol.
  • Expose gRPC internally and externally: – Data exchange happens in binary format and is not humanly readable. gRPC relies on HTTP2.0 which has limited support from modern browsers.
  • Create REST and gRPC :-
    • As explained in the options earlier additional coding and integration overhead.
    • Lack of mature gRPC implementation across technologies like java python or node from any of the widely adopted open-source frameworks.

It is important to think through and consider these various integration patterns while we consider designing our next microservices based solutions.

 

 

Guest post by Rakesh Girija Ramesan Nair, Senior Technology Architect with Infosys Limited, and Gourishankar ValsalakumariNeelakantapillai, Technology Lead with Infosys Limited
Source CNCF


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • CNCF
  • Google Remote Procedure Call
  • gRPC
  • REST
  • REST API
You May Also Like
View Post
  • Cloud-Native
  • Multi-Cloud

Oracle Expands Multicloud Capabilities with AWS, Google Cloud, and Microsoft Azure

  • September 11, 2024
Cloud computing concept image double exposure Digitally Enhanced Smart City Concept with Cloud Computing
View Post
  • Cloud-Native
  • Computing
  • Hybrid Cloud
  • Multi-Cloud
  • Public Cloud

Make Your Business Resilient By Integrating These Best Practices Into Your Cloud Architecture

  • July 29, 2024
Image by:Opensource.com
View Post
  • Architecture
  • Computing
  • Engineering

5 reasons virtual machines still matter

  • June 28, 2024
Huawei Cloud Cairo Region Goes Live
View Post
  • Cloud-Native
  • Computing
  • Platforms

Huawei Cloud Goes Live in Egypt

  • May 24, 2024
View Post
  • Cloud-Native
  • Computing
  • Engineering

10 Cloud Development Gotchas To Watch Out For

  • March 29, 2024
Storage Ceph
View Post
  • Cloud-Native
  • Data

The Growth Of IBM Storage Ceph – The Ideal Foundation For A Modern Data Lakehouse

  • January 30, 2024
Clouds
View Post
  • Cloud-Native
  • Platforms
  • Software Engineering

Microsoft Releases Azure Migrate Assessment Tool For .NET Application

  • January 14, 2024
View Post
  • Cloud-Native
  • Engineering
  • Platforms

Top Highlights From AWS Worldwide Public Sector Partners At Re:Invent 2023

  • December 27, 2023

Stay Connected!
LATEST
  • 1
    Just make it scale: An Aurora DSQL story
    • May 29, 2025
  • 2
    Reliance on US tech providers is making IT leaders skittish
    • May 28, 2025
  • Examine the 4 types of edge computing, with examples
    • May 28, 2025
  • AI and private cloud: 2 lessons from Dell Tech World 2025
    • May 28, 2025
  • 5
    TD Synnex named as UK distributor for Cohesity
    • May 28, 2025
  • Weigh these 6 enterprise advantages of storage as a service
    • May 28, 2025
  • 7
    Broadcom’s ‘harsh’ VMware contracts are costing customers up to 1,500% more
    • May 28, 2025
  • 8
    Pulsant targets partner diversity with new IaaS solution
    • May 23, 2025
  • 9
    Growing AI workloads are causing hybrid cloud headaches
    • May 23, 2025
  • Gemma 3n 10
    Announcing Gemma 3n preview: powerful, efficient, mobile-first AI
    • May 22, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Understand how Windows Server 2025 PAYG licensing works
    • May 20, 2025
  • By the numbers: How upskilling fills the IT skills gap
    • May 21, 2025
  • 3
    Cloud adoption isn’t all it’s cut out to be as enterprises report growing dissatisfaction
    • May 15, 2025
  • 4
    Hybrid cloud is complicated – Red Hat’s new AI assistant wants to solve that
    • May 20, 2025
  • 5
    Google is getting serious on cloud sovereignty
    • May 22, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.