0
0
NestJSframework~5 mins

gRPC transport in NestJS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is gRPC transport in NestJS?
gRPC transport in NestJS is a way to communicate between microservices using the gRPC protocol, which is fast and efficient for remote procedure calls.
Click to reveal answer
intermediate
How do you define a gRPC service in NestJS?
You define a gRPC service by creating a .proto file with service and message definitions, then use NestJS decorators and options to connect your service to that proto file.
Click to reveal answer
beginner
What decorator is used to mark a method as a gRPC handler in NestJS?
The @GrpcMethod() decorator marks a method as a gRPC handler that responds to a specific RPC call.
Click to reveal answer
beginner
What is the role of the Transport.GRPC option in NestJS microservice setup?
Transport.GRPC tells NestJS to use the gRPC protocol for communication when creating a microservice client or server.
Click to reveal answer
intermediate
Why is gRPC transport preferred for microservices communication?
gRPC transport is preferred because it uses HTTP/2, supports streaming, is efficient with data serialization using Protocol Buffers, and offers strong typing.
Click to reveal answer
Which file format defines gRPC services in NestJS?
A.proto
B.json
C.yaml
D.xml
Which decorator marks a method as a gRPC handler in NestJS?
A@GrpcHandler()
B@GrpcMethod()
C@GrpcService()
D@GrpcCall()
What transport option is used to enable gRPC in NestJS microservices?
ATransport.HTTP
BTransport.TCP
CTransport.GRPC
DTransport.REDIS
Which protocol does gRPC use for communication?
AHTTP/2
BHTTP/1.1
CFTP
DWebSocket
What serialization format does gRPC use by default?
AYAML
BJSON
CXML
DProtocol Buffers
Explain how to set up a basic gRPC microservice in NestJS.
Think about defining the service, configuring transport, and handling calls.
You got /4 concepts.
    Describe the benefits of using gRPC transport for microservices communication.
    Consider speed, data format, and reliability.
    You got /4 concepts.