DevNet Associate (DEVASC) v1.0Infrastructure and AutomationHard
A development team is implementing a microservices architecture where services need to communicate efficiently with low latency, especially for streaming data and remote procedure calls. They are considering an open-source framework that supports multiple programming languages and uses Protocol Buffers for message serialization. Which technology best fits these requirements?
- ASOAP
- BgRPC
- CRESTful API
- DGraphQL
Show answer & explanationAnswer & explanation
Correct answer: B. gRPC
gRPC is a high-performance, open-source RPC framework that excels in microservices communication. It uses HTTP/2 for transport, Protocol Buffers for message serialization, and supports streaming, making it ideal for low-latency and efficient data exchange across different programming languages.
Why the other options are wrong
- A. SOAP is an older, XML-based protocol, known for its verbosity and complexity, making it unsuitable for low-latency, high-efficiency microservices communication.
- C. RESTful APIs typically use HTTP/1.1 and JSON/XML, which are less efficient for streaming and have higher latency than gRPC for inter-service communication.
- D. GraphQL is a query language for APIs, often used over HTTP/1.1, and while flexible for data fetching, it doesn't inherently provide the same low-latency, streaming, or efficient binary serialization benefits of gRPC for inter-service RPC.
gRPC
gRPC (gRPC Remote Procedure Call) is an open-source high-performance RPC framework developed by Google. It uses HTTP/2 for transport, Protocol Buffers as the interface definition language and message format, and supports various types of streaming.
- High performance and low latency
- Uses HTTP/2 for transport
- Uses Protocol Buffers for message serialization
- Supports streaming (unary, server, client, bidirectional)
- Language-agnostic with code generation
Memory trick: gRPC: Google's Rapid Protocol for Calls.