1/5
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is a middleware in Nestjs
Middleware is a function which is called before the route handler. Middleware functions have access to the request and response objects, and the next() middleware function in the application’s request-response cycle. The next middleware function is commonly denoted by a variable named next.
You implement custom Nest middleware in either a function, or in a class with an @Injectable() decorator. The class should implement the NestMiddleware interface, while the function does not have any special requirements.

How Nestjs uses microservices?
Nest supports several built-in transport layer implementations, called transporters, which are responsible for transmitting messages between different microservice instances.
Most transporters natively support both request-response and event-based message styles.
Nest abstracts the implementation details of each transporter behind a canonical interface for both request-response and event-based messaging.
This makes it easy to switch from one transport layer to another. For example to leverage the specific reliability or performance features of a particular transport layer without impacting your application code.
What are Message and Event Patterns?
Microservices recognize both messages and events by patterns. A pattern is a plain value, for example, a literal object or a string. Patterns are automatically serialized and sent over the network along with the data portion of a message. In this way, message senders and consumers can coordinate which requests are consumed by which handlers.
what is MQTT in Nesjts
MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth.
MQTT (Message Queuing Telemetry Transport) is an open source, lightweight messaging protocol, optimized for low latency.
This protocol provides a scalable and cost-efficient way to connect devices using a publish/subscribe model.
A communication system built on MQTT consists of the publishing server, a broker and one or more clients.
It is designed for constrained devices and low-bandwidth, high-latency or unreliable networks.
Let's assume that you want to deploy REST API on aws. What are the steps? If I don't want to use for example Kubernetes, I want to use something else. What are your suggestions?
I’d approach it by first understanding the API’s requirements—its traffic profile, latency expectations, and operational complexity. If Kubernetes is off the table, there are still several robust options on AWS for deploying REST APIs.

What is GraphQL in Nestjs
GraphQL is a powerful query language for APIs and a runtime for fulfilling those queries with your existing data. It's an elegant approach that solves many problems typically found with REST APIs.
You fetch exactly what you need in a single query.
There's no need for multiple endpoints.
You reduce bandwidth and simplify client-side logic