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?
✗ Incorrect
gRPC services are defined using Protocol Buffers files with the .proto extension.
Which decorator marks a method as a gRPC handler in NestJS?
✗ Incorrect
The @GrpcMethod() decorator is used to mark methods that handle gRPC calls.
What transport option is used to enable gRPC in NestJS microservices?
✗ Incorrect
Transport.GRPC configures NestJS microservices to use the gRPC protocol.
Which protocol does gRPC use for communication?
✗ Incorrect
gRPC uses HTTP/2 for efficient, multiplexed communication.
What serialization format does gRPC use by default?
✗ Incorrect
gRPC uses Protocol Buffers for fast and compact data serialization.
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.