13 Introduction to gRPC and Protocol Buffers

Поделиться
HTML-код
  • Опубликовано: 28 янв 2025

Комментарии • 68

  • @evansowamoyo2612
    @evansowamoyo2612 2 года назад +32

    13th June 2022, the gRPC has changed a bit. The generated code for services and messages are now in separate folders ending with _grpc.pb.go and .pb.go respectively.
    Also,
    1. At the top of the proto file you need:
    `option go_package="/currency";`
    2. The command for generation can now be something like this:
    `protoc -I protos/ --go_out=. --go-grpc_out=. protos/currency.proto`

    • @albert.h79
      @albert.h79 2 года назад +2

      Thank you for the help!

    • @Lampalot
      @Lampalot 2 года назад +1

      I was going to mention this as well, nice to see someone got there before me :D

    • @ozmosan
      @ozmosan Год назад

      Couple of additional things:
      Currency struct should be changed to this:
      type Currency struct {
      log hclog.Logger
      protos.UnimplementedCurrencyServer
      }
      and also implement this func as well:
      func (c *Currency) mustEmbedUnimplementedCurrencyServer() {}

    • @joshuaetim3279
      @joshuaetim3279 Год назад

      Thanks Evans. Also are you the mathematician evans owamoyo?

    • @evansowamoyo2612
      @evansowamoyo2612 Год назад

      @@joshuaetim3279 Yes

  • @jonathoncronin5555
    @jonathoncronin5555 4 года назад +6

    Great video, I was able to utilize this for my first GRPC concept build. Really I'm just a hobbyist but I appreciated the method of your approach. Too often people don't take the time to explain the fundamentals of things first (explanation on proto was perfect). If I had time to read the entire documentation I wouldn't be looking for a youtube video to jumpstart me.

  • @abhikbanerjee3719
    @abhikbanerjee3719 2 года назад +1

    The tutorials are great, the voice is even better... Kind of like one of those story narrator voices. Keep up the good work mate!

  • @mrmaker101
    @mrmaker101 3 года назад +1

    I’m really happy I found a comprehensive intro to grpc. Thank you!

  • @nixkim346
    @nixkim346 4 года назад +8

    This is wonderful! Thank you, I learned a lot :)

  • @tylerlofgren1775
    @tylerlofgren1775 3 года назад

    First video I've seen from you. Excellen and very helpful.

  • @miloskovacevic2245
    @miloskovacevic2245 3 года назад

    Protect this kind man at all cost!!

  • @ErickLopes1337
    @ErickLopes1337 4 года назад +1

    Dear Nic, Absolutely loved your channel the way you explain things is great \o/

  • @overstandnigeria
    @overstandnigeria 4 года назад +2

    Your voice and tone seems to make the lectures stick . I'm subscribing for that alone. Good work.

  • @thestacksdev
    @thestacksdev 3 года назад

    Simple and easy to learn Happy I stumbled on this one

  • @MarcelTndl
    @MarcelTndl 4 года назад

    Excellent work man ! . Regards from Argentina .

  • @Fomer777
    @Fomer777 2 года назад

    Amazing content! So easy to comprehend. Thank you so much!

  • @eleazaryewaharold6197
    @eleazaryewaharold6197 4 года назад

    beautiful introduction to grpc

  • @bulidiriba4598
    @bulidiriba4598 2 года назад

    Wonderful as usual!!

  • @77loutube
    @77loutube 3 года назад

    Sweet and brilliant teaching!

  • @quant.481
    @quant.481 4 года назад

    thanks for these serials, u just make me love more go language. its really amazing language

  • @mohsanabbas8787
    @mohsanabbas8787 4 года назад

    Thanks for the video. Great explanation on protobuffer and grpc. 🤙🤙🤙🤙👏

  • @sovrinfo
    @sovrinfo 2 года назад

    Great tutorial. Thanks!

  • @Terszel
    @Terszel 10 месяцев назад +1

    Another change is that proto grpc now requires generated servers to have forward compatibility. To fix the error, add protos.Unimplemented*Server to your struct (no field name needed) and also add in your constructor. Or, you can opt out of forward compatibility by adding protos.Unsafe*Server instead, or change your protoc to have this command:
    --go-grpc_out=require_unimplemented_servers=false:.

  • @seeebeeek1
    @seeebeeek1 Год назад

    Great video!

  • @UswatunHasanah-bp2fv
    @UswatunHasanah-bp2fv 4 года назад

    Great tutorial. Thank you, Nic!

    • @NicJackson
      @NicJackson  4 года назад +1

      Thank you, please let me know if there is a specific topic you would like me to cover.

    • @UswatunHasanah-bp2fv
      @UswatunHasanah-bp2fv 4 года назад

      @@NicJackson Hi Nic, sorry for my late response. I know you are busy with your new book, but when you have time, i hope you make another tutorial about Envoy Proxy for gRPC and ReactJs. Thank you Nic. Btw, when will your new book be released?

  • @scottbrown8274
    @scottbrown8274 3 года назад

    Great, man! Love your video

  • @Almog6k
    @Almog6k 3 года назад

    Thank you. Easy explanation.

  • @jfrankogramos6620
    @jfrankogramos6620 4 года назад

    Thanks a lot from Guatemala

  • @salahfarzin3554
    @salahfarzin3554 3 года назад

    Great, keep going

  • @lukcba
    @lukcba 4 года назад

    Muchas gracias por tu aporte muy bueno todo !! saludos

  • @nopestack
    @nopestack 4 года назад +3

    Hey Nick, if you put a full IP address and a port on Go's listeners, you avoid making the firewall jump everytime you run a server

  • @MediaEnraged
    @MediaEnraged 2 года назад

    this is an amazing video thank you so much

  • @oduber.vasquez
    @oduber.vasquez 4 года назад

    Great one, thank you!

  • @ethashamuddinmohammed1255
    @ethashamuddinmohammed1255 4 года назад +2

    Are you also planning to discuss about deployment of docker containers(go microservices)?

  • @Michael-ri8sg
    @Michael-ri8sg 4 года назад

    I love this series

  • @codersworld2598
    @codersworld2598 4 года назад

    Nic, you're amazing!

  • @obeydadjeffal4442
    @obeydadjeffal4442 4 года назад +2

    awesome video, one little detail: for me when i followed the steps i had `Base`, `Destination` and `Rate` in json (PascalCase instead of lowercase)
    also, i don't have the `[json_name = "xxxxx"]` part when i describe a message.
    tested it today

    • @knabbagluon
      @knabbagluon 4 года назад +1

      message RateRequest {
      // Base is the base currency code for the rate
      string Base = 1 [json_name = "base"];
      // Destination is the destination currency code for the rate
      string Destination = 2 [json_name = "destination"];
      }
      With this it works. I don't know why he doesn't have to write it. I will find out eventually.

  • @ajinkyadeshpande9048
    @ajinkyadeshpande9048 3 года назад

    Thanks for this, how can I use grpcurl in python? want to build some utility tool for testing

  • @JustMe20132
    @JustMe20132 4 года назад

    Great job. You always are a creative programmer
    Can you talk about Avro vs gRPC
    Can you show us how to use Istio with gRPC in building microservices

  • @yeezyyxy2259
    @yeezyyxy2259 4 года назад +3

    Has there been some large change in the golang grpc package since the time this video was made? I used the command "protoc --go-grpc_out=. path/to/file.proto" to generate my currency_grpc.pb.go file and it looks drastically different than yours.

    • @yeezyyxy2259
      @yeezyyxy2259 4 года назад

      Only difference I made in my code was adding in the line "option go_package = "./currency";
      " since it seems to be required now

    • @yeezyyxy2259
      @yeezyyxy2259 4 года назад +2

      This is the most I have ever struggled getting something to work. I'm about to just go back to c#. Go package/tooling management is unbearable.

    • @evansowamoyo2612
      @evansowamoyo2612 2 года назад

      @@yeezyyxy2259 Same, I'm going back to Spring Boot, it's the external methods for me. It makes all the functions of a struct or the interfaces it implements difficult to track and that's a 🚩

  • @seenu9429
    @seenu9429 3 года назад

    How to implement client in c++ and server in Go using grpc?
    Can you please tell me

  • @soaring_dove
    @soaring_dove 4 года назад +1

    okei, it breaks my heart when intellisense fails
    in your .proto file, when generating go modules, you can write `option go_package = "";`
    some where else in your project you can call stuff from that package. .MyStruct.

  • @wadimjarochowicz6675
    @wadimjarochowicz6675 3 года назад

    Will this series be continued ?

  • @ericb252
    @ericb252 3 года назад

    Such a great series!!! If we were to rewrite REST APIs with grpc would we theoretically be able to handle the same number of concurrent connections? More or less? How does this scale as a REST replacement?

    • @petereriksson6760
      @petereriksson6760 3 года назад

      Hi, not the expert here, but I am pretty sure you would be handle more requests… quite a bit more actually.

  • @aofadero
    @aofadero 4 года назад

    Hi Nic, great tutorial. Grpccurl looks like a useful tool to quickly test, however for production code one would still need to write structured unit tests. Do you have any tutorials on that?

  • @petereriksson6760
    @petereriksson6760 3 года назад

    Great tutorial. Any chance you can walk us through using flatbuffers with gRPC?

  • @revanth9502
    @revanth9502 3 года назад

    Getting error while passing the data through terminal grpcurl --plaintext -d ' { "base" : "INR" , "destination" : "Usd" }' localhost:9092 Currency.RateRequest and error like invalid character b looking for beginning of object key string

  • @jatinray6765
    @jatinray6765 4 года назад

    I really like it

  • @_asimaslam
    @_asimaslam 4 года назад +2

    You should demo Micro next ;)

    • @NicJackson
      @NicJackson  4 года назад

      That is a great idea, if I ran a stream next week would you like to come on as a guest?

  • @kudoamv
    @kudoamv 4 года назад +1

    hmmm....
    Make a tutorial in which two microservices talk to each other using grpc and protocol buffers. Use both client and server streaming at the same time. It should be fun.

    • @NicJackson
      @NicJackson  4 года назад +1

      That is coming :), I will be looking at gRPC clients this week and bi-directional streaming in the next episode

  • @lucasfernandes3855
    @lucasfernandes3855 4 года назад

    great

  • @rauannurbatyrov7584
    @rauannurbatyrov7584 4 года назад +1

    Great one, thank you. Will you show some client frameworks like React or Angular with grpc?

  • @abdorootuae
    @abdorootuae Год назад

    i am using bloomrpc to test the grpc it's gui

  • @XunZhong
    @XunZhong 4 года назад

    gs, cs are encrypted variable names, not ideal...

  • @donaldfrench3696
    @donaldfrench3696 4 года назад

    I love your training, however, I hat the dark color. It is very hard to read on an iPad. Please us lite style. Thank you.

  • @anassidrissi2650
    @anassidrissi2650 Год назад +3

    19th April 2023, you need to add "UnimplementedCurrencyServer" to the Currency struct for forward compatibility :
    type Currency struct {
    protos.UnimplementedCurrencyServer
    log hclog.Logger
    }
    func NewCurrency(l hclog.Logger) *Currency {
    return &Currency{log: l}
    }