When to Use gRPC and When to Avoid It: A Comprehensive Analysis

TLDRgRPC is a great choice for view composition and interacting with infrastructure, but should be avoided for service-to-service communication involved in workflows. Originating requests from messages provides more resiliency.

Key insights

🔍gRPC is well-suited for view composition and natural request-response scenarios.

🔁For service-to-service communication in workflows, messaging and decoupling are preferable to direct gRPC communication.

⌛️Originating requests from messages provides more options for handling failures and improves fault tolerance.

🔧gRPC is a good choice for interacting with infrastructure like databases.

🚫Avoid using gRPC for service-to-service communication involved in workflows and business processes.

Q&A

What are some use cases where gRPC is a good choice?

gRPC is well-suited for view composition, infrastructure interaction, and interacting with databases.

Why should direct service-to-service communication using gRPC be avoided?

Direct service-to-service communication using gRPC in workflows can lead to coupling and difficulties in handling failures.

What is the advantage of originating requests from messages instead of direct client requests?

Originating requests from messages allows for more options in handling failures and improves fault tolerance.

Is gRPC a good choice for distributed systems with multiple services?

gRPC can be a good choice for interacting with infrastructure, but for service-to-service communication in workflows, messaging and decoupling are preferable.

Is there a specific situation where gRPC should be avoided?

gRPC should be avoided for service-to-service communication involved in workflows and business processes, as it can lead to coupling and difficulties in fault tolerance.

Timestamped Summary

00:00gRPC is often touted as the de facto standard for service communication, but it is important to consider its use cases.

01:40gRPC can be a good choice for scenarios like view composition and interacting with infrastructure.

05:35Direct service-to-service communication using gRPC in workflows should be avoided due to coupling and difficulties in handling failures.

07:19Originating requests from messages provides more options for handling failures and improves fault tolerance.

08:59gRPC is a good choice for interacting with infrastructure like databases.

09:59gRPC should be avoided for service-to-service communication involved in workflows and business processes.