No video

NestJS gRPC Microservices Tutorial

In this video, we take a look at how we can build scaleable NestJS microservices using gRPC.
GitHub Repo: github.com/mgu...
gRPC Documentation: grpc.io/
Protocol Buffers Documentation:protobuf.dev/p...
Get my highly-rated Udemy courses at a discount here: michaelguay.de...
Timestamps:
00:00:00 Introduction
00:01:24 Setup
00:09:16 Protocol Buffers
00:19:04 Use Protocol Buffers
00:40:57 Implement API Gateway
00:52:10 Testing

Пікірлер: 73

  • @thisisrohan6444
    @thisisrohan64444 ай бұрын

    For Windows user : npx protoc --plugin=protoc-gen-ts_proto=".\ ode_modules\\.bin\\protoc-gen-ts_proto.cmd" --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto

  • @pabloemilioescobarossa3291

    @pabloemilioescobarossa3291

    4 ай бұрын

    Thx

  • @mister-med
    @mister-med Жыл бұрын

    You truly are the Messi of NestJS.. Thanks for sharing your knowledge with us! 🙏

  • @adR9990
    @adR9990 Жыл бұрын

    Can you please start providing an architecture diagram of what you are trying to code at the beginning of the video, using Excalidraw or something? It will help viewers visualize what is actually being built.

  • @mguay

    @mguay

    Жыл бұрын

    Sure. Thanks for the suggestion.

  • @dlsrios
    @dlsrios4 ай бұрын

    Thank you, bro! I was looking for some examples of using gRPC with streams, and your explanation was great! 💪

  • @joewhiteakeriii5568
    @joewhiteakeriii5568 Жыл бұрын

    I love the lane of content that you post man. I am a huge fan of using nest js and containerization, so your content has been a huge source of inspiration to learn more into things like this

  • @johnholanda7798
    @johnholanda77987 ай бұрын

    nice video, the only video that I learned well about gRPC and nest

  • @abolfazljalildoost766
    @abolfazljalildoost7665 ай бұрын

    can't find better than you in Nestjs. thanks for your useful contents ♡♡

  • @mguay
    @mguay Жыл бұрын

    Get my NestJS microservices course at a discount here to dive deeper with gRPC & NestJS in a real project: michaelguay.dev/udemy

  • @KuriArsene

    @KuriArsene

    Жыл бұрын

    does this course discuss nest cqrs in more detail that the two videos you made before?

  • @nbaua3454
    @nbaua3454 Жыл бұрын

    OMG, I guess I am in great luck today.. I was about to work on these feature on Monday and this video just popped up on 🔥🔥🔥

  • @whalewalker9176
    @whalewalker91765 ай бұрын

    If you're using macOS and encounter the error 'zsh: command not found: protoc' while attempting to execute the command 'protoc --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto', you can resolve it by installing the Protocol Buffers compiler. Simply run 'brew install protobuf' assuming you have HomeBrew installed on your Mac. This will install the necessary compiler and resolve the issue.

  • @AnlGUNDAL
    @AnlGUNDAL Жыл бұрын

    Thanks a lot. I learning microservises with you from udemy and youtube.

  • @blender_wiki
    @blender_wiki Жыл бұрын

    Very nice add to existing content in you full course. 🙏🙏🙏

  • @vsagarprasad6527
    @vsagarprasad65273 ай бұрын

    protoc --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/sample.proto this command is giving error: --ts_proto_out: protoc-gen-ts_proto: %1 is not a valid Win32 application. can anyone help

  • @sekhar-oh6iq
    @sekhar-oh6iq2 ай бұрын

    How to add port number for the auth microservice if we have multiple services are running?

  • @p.eriksonsaragi7129
    @p.eriksonsaragi71294 ай бұрын

    How to handle exception properly on the apigateway? like find one user which is already deleted, the response is 500 instead of 404. But the auth app correctly throw NotFoundException

  • @andersonalmeydat7715
    @andersonalmeydat77158 ай бұрын

    gracias bro, llegaré lejos con tu ayuda!

  • @obinnaezedei856
    @obinnaezedei8567 ай бұрын

    I couldn't follow again after running the protoc command because it errored out: protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto proto/auth.proto:28:1: Expected top-level statement (e.g. "message").

  • @xDiggie
    @xDiggie Жыл бұрын

    Very helpful! I actually managed to finish the tutorial. Now that I'm back messing around my own personal project, I just have a quick question. Is it possible to await response from a microservice? I basically have a loading UI when a task is ongoing ( saving objects to db) and while I want it to load while awaiting the task to finish and get a response from the microservice (to use that response on the page after the loading UI), I also need the event loop to not get blocked in the process. Does microservices solve this? or would there be a better solution for this. Any reply or a direction would be greatly appreciated. Thanks!

  • @jomelortega7902

    @jomelortega7902

    10 ай бұрын

    Sounds like an optimistic response from UI (manually altering the current data displayed while waiting the response from backend), Backend shouldn’t care about this

  • @aghileslounis
    @aghileslounis Жыл бұрын

    Lord of NestJS for sure right there! Good job, excellent video! +1 sub +1 like

  • @overrevvv
    @overrevvv7 ай бұрын

    Thank you for this amazing video.

  • @NathanielBabalola
    @NathanielBabalola Жыл бұрын

    Can you please split this into different repos and show how you'd handle the sharing of different proto files between different projects . I think that's where the issue is.

  • @sadhakbj

    @sadhakbj

    Жыл бұрын

    Totally agreed.

  • @theeaster2839

    @theeaster2839

    8 ай бұрын

    That’s the default multiservices problem. Use cloud storage, or private npm

  • @user-ek2jc1xf3y

    @user-ek2jc1xf3y

    Ай бұрын

    well in that case you'd use something else lol. the point of using nestjs and this setup is that you can have everything in one place. If you're going polyrepo, best of luck not losing your mind.

  • @NathanielBabalola

    @NathanielBabalola

    Ай бұрын

    @@user-ek2jc1xf3y loool

  • @sadhakbj
    @sadhakbj Жыл бұрын

    This was something that i wanted to request you for our microservices course, you created a video wow. Will you add a small section in our existing microservice course?

  • @mguay

    @mguay

    Жыл бұрын

    Yes that is next! Thanks for your support.

  • @Ballistic_Bytes
    @Ballistic_Bytes4 ай бұрын

    Brilliant video.

  • @michaelserikov9339
    @michaelserikov9339 Жыл бұрын

    Hey! Love your video, thanks! I came over one question during development, hope you will answer on it: by following conventions, where Data Transfer Objects can be used in application? Which layers? Or such kind of entities can be accessible through all application's layers? What is the best practice for DTOs?

  • @deepaihub
    @deepaihub6 ай бұрын

    which version number using protoc cli, latest version not find in auth.ts user service controllers

  • @nastyazelenenkaya9889
    @nastyazelenenkaya9889Ай бұрын

    Thanks ❤

  • @mak8naf0813
    @mak8naf0813 Жыл бұрын

    how can I catch errors thrown from the auth service on the API Gateway side? I know I should use exception filters, but I've tried several ways and it still doesn't catch the errors.

  • @erikstor
    @erikstor10 ай бұрын

    somebody have the error "terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid" when use the command protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto ?

  • @luisbrunoaguirrepena2368

    @luisbrunoaguirrepena2368

    10 ай бұрын

    protoc --plugin=protoc-gen-ts_proto=. ode_modules\.bin\protoc-gen-ts_proto.cmd --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto

  • @ugurcanbas3821

    @ugurcanbas3821

    10 ай бұрын

    Yes, i am also receiving this error. Can someone help us about that? Is there any compatibility issue with the version of protobuffs? I am using ProtoBuff 24.4

  • @javokhirrakhimov8241
    @javokhirrakhimov82419 ай бұрын

    HI, thank you for your great video, but why ts-proto generated socialMedia: SocialMedia | undefined even if there is no optional keyword?

  • @karanmanral2951
    @karanmanral29516 ай бұрын

    This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.

  • @randomforest_dev
    @randomforest_dev Жыл бұрын

    I am confused about the apigateway part in the microservices. Are we supposed to write users module there? Thanks for the video.

  • @mr_ehmed
    @mr_ehmed11 ай бұрын

    best love it

  • @cholasimmons
    @cholasimmons Жыл бұрын

    gosh that's alot of manual setting up, is gRPC that new on the market? Great explanations though, so clear👌

  • @user-lq2gv5ps1c
    @user-lq2gv5ps1c Жыл бұрын

    Thanks for sharing.

  • @nguyenchauthaoquan4836
    @nguyenchauthaoquan4836 Жыл бұрын

    Can we let API gateway communicate with the other microservices by gRPC way as well ?

  • @user-tq7vs1dp2u
    @user-tq7vs1dp2u5 ай бұрын

    what theme is you using?

  • @armandiskandarsyah5414
    @armandiskandarsyah541411 ай бұрын

    Is there a way to define a gRPC port? I want to test it with other client than the same nestjs

  • @rafalmo5258
    @rafalmo5258 Жыл бұрын

    Thank you Sir

  • @stancobridge
    @stancobridge Жыл бұрын

    What about situation u want to use multiple protofiles

  • @4ebok
    @4ebok4 ай бұрын

    Why ts-proto is not dev dependency?😀

  • @eyalbor1
    @eyalbor1 Жыл бұрын

    Hi, do you have twitter? how do you learn or follow about all the different tools/packages that you use, for example? keda, artillery etc.

  • @kamalkamals
    @kamalkamals11 ай бұрын

    i guess it s better to generate types atomically instead manually

  • @gustavcoetzee5018
    @gustavcoetzee50187 ай бұрын

    please pin the Proto node modules command, thanks for great tutorial

  • @mayori-engineering-hub
    @mayori-engineering-hub Жыл бұрын

    The use of grpc in not applied correctly

  • @gibsonsgibson1513
    @gibsonsgibson1513 Жыл бұрын

    How do I solve this issue: --ts_proto_out: protoc-gen-ts_proto: %1 is not a valid Win32 application.

  • @nguyenthaituan1836

    @nguyenthaituan1836

    10 ай бұрын

    Try this protoc --plugin=protoc-gen-ts_proto=. ode_modules\.bin\protoc-gen-ts_proto.cmd --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto

  • @gibsonsgibson1513

    @gibsonsgibson1513

    10 ай бұрын

    @@nguyenthaituan1836 thans, but I had to create my own custom generator for the typescript code

  • @jomelortega7902

    @jomelortega7902

    10 ай бұрын

    protoc is not available on windows, you might want to do the development on WSL

  • @jomelortega7902

    @jomelortega7902

    10 ай бұрын

    But yeah, dunno if there’s an existing alternative that does the same thing as protoc

  • @gibsonsgibson1513

    @gibsonsgibson1513

    10 ай бұрын

    @@jomelortega7902 better still develop your own

  • @afuyewale5648
    @afuyewale5648 Жыл бұрын

    .proto looks like writing a schema for graphql

  • @mayori-engineering-hub
    @mayori-engineering-hub Жыл бұрын

    Why pnpm

  • @PavleJovanovic-gn3jw

    @PavleJovanovic-gn3jw

    11 ай бұрын

    It's much faster than npm, especially on warm starts, and it manages the packages better.

  • @davidrocky
    @davidrocky5 ай бұрын

    There is no Angular here. Bait title? Incomplete upload? 🤷🏼

  • @josephanolue329
    @josephanolue3297 ай бұрын

    how do window users solve this issue for protoc compiler $ protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./--ts_proto_opt=nestjs=true ./proto/adminauth.proto --ts_proto_out: protoc-gen-ts_proto: %1 is not a valid Win32 application.

  • @johnadepoju5009

    @johnadepoju5009

    7 ай бұрын

    You will have to use the full path instead. For example: protoc --plugin=protoc-gen-ts_proto="C:\path\to\your\project\folder ode_modules\.bin\protoc-gen-ts_proto.cmd" --ts_proto_out=./ --ts_proto_opt=nestJs=true ./proto/auth.proto

  • @sekhar-oh6iq

    @sekhar-oh6iq

    2 ай бұрын

    It's working in windows machine but not generating the auth.ts file (proto to ts conversion), could you please help me out?