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  The Linux Foundation And IBM Announce New Open Source Projects to Promote Racial Justice

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 Go Mitigates Supply Chain Attacks
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
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • oracle-ibm 3
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 4
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 5
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 6
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 7
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 8
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 9
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 10
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 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
  • 1
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
  • 2
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 3
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 4
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 5
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.