justforfunc #30: The Basics of Protocol Buffers

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

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

  • @joshuam6013
    @joshuam6013 3 года назад +2

    you are insanely talented. I haven't seen anyone code as intuitively and as confident as you do.

  • @Ther3IsN0Sp00n
    @Ther3IsN0Sp00n 6 лет назад +4

    I'm 2 minutes into the video, and I can tell you I'm interested in literally everything you said 👍👍👍

  • @RamsesAldama
    @RamsesAldama 6 лет назад +7

    gRPC and then cobra would be nice. Great video. Thanks.

  • @Dave0Grave
    @Dave0Grave 6 лет назад +10

    more about grpc in the context of microservices would be great👏👏👏👏👏

  • @DanielHeckrath
    @DanielHeckrath 6 лет назад +17

    Nice video, but would have loved to see more of protobuf, instead of the custom file encoding. Would have been able to encode the file content as a proto message with something like:
    message TaskList {
    repeating Task tasks = 1;
    }

  • @BarnabyKeene
    @BarnabyKeene 6 лет назад +1

    +1 for gRPC! It's been something on my list of things to learn for a while so a video to get me started would be great! After this video I'm thinking of implementing protocol buffers into another language...

  • @MarEkkertsen
    @MarEkkertsen 6 лет назад +24

    Sound/mic problem today?

  • @musale2277
    @musale2277 6 лет назад

    A nice episode. I would like more episodes like this and technical stuff. In that breath, I welcome the creating of CLI programs with cobra 😁 👌. You can improve on the sound too.

  • @ThisGuyRocksLikeCrazy
    @ThisGuyRocksLikeCrazy 6 лет назад

    Cool video. Please make a video on how to design an REST API that has generic methods to perform CRUD operations in multiple tables.

  • @axamon1
    @axamon1 6 лет назад

    Thank you I always learn something new and useful with your justforfunc videos :)

  • @arangogutierrez
    @arangogutierrez 6 лет назад

    perfect timing!! I was looking for documentation on this topic!

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

    Please start uploading more videos, grafana logrus would be great or anything related to Golang 😀. Thanks

  • @stevexuereb
    @stevexuereb 6 лет назад

    Thank you for video great as always! More information about Cobra and gRPC would be great!

  • @pskpetya
    @pskpetya 9 месяцев назад

    thanks a lot for all the tutorials! could you, please make a video on a bit more complex chans usage with a real life usage. Thanks :)

  • @Gonzihh
    @Gonzihh 6 лет назад +3

    more about technical stuff please!

    • @DigitalStaticNet
      @DigitalStaticNet 6 лет назад

      Are you asking for the technical details about protobufs themselves?

  • @Lepinkainen_
    @Lepinkainen_ 6 лет назад +5

    Either Viper+Cobra or instrumenting Go code with Prometheus

  • @norman.soetbeer
    @norman.soetbeer 6 лет назад +1

    Great video! :) I'm wondering, if it would make sense to encode the length using protobuf (e.g. `proto.EncodeVarint()`) instead of gob or binary. So you could stick to just one encoding format instead of mixing them.

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

    I have an issue with protobuf un marshalling. Can you tell me is there any best package wich gives us best performance in go for un marshalling proto buf

  • @shadowfaxenator
    @shadowfaxenator 6 лет назад +12

    Why int64 is []byte[:4] ? Isn’t it int32?

    • @MrSc1entist
      @MrSc1entist 6 лет назад

      Artem Alekseev I have the exact same question

    • @JustForFunc
      @JustForFunc  6 лет назад +7

      because in my head 64 / 8 = 4 ... good catch!
      github.com/campoy/justforfunc/pull/56

    • @AlexBeltran1
      @AlexBeltran1 6 лет назад +6

      gob isn't a straight binary conversion and therefore doesn't always takes 8 bytes. If it can fit in 4 bytes ( with some overhead) it will do it.
      Here is a script that demonstrates how an int64 in gob can have varying length
      play.golang.org/p/En8KbZIgcB7
      Francesc's script would have worked until it reaches 2^8 tasks where the length would have increased to 5.

  • @teeeejays
    @teeeejays 5 лет назад +1

    Where did the editor disappear after 26:08? :/

  • @shailjakantupadhyay5183
    @shailjakantupadhyay5183 5 лет назад

    Can someone explain me more about the numbers 1, 2, 3 why we are adding it at the last of each line, I don't understand it properly??

  • @Blixzful
    @Blixzful 5 лет назад

    Great stuff! I would like more videos soon :-)

  • @anujchoubey2453
    @anujchoubey2453 5 лет назад

    How to implement protocol buffer in objective c. can we create a library out of it so that we can use generated objective c files independently.

  • @BrandonClapp
    @BrandonClapp 5 лет назад

    Great video. To clarify, is the 4 bytes that you're using to store the length of the message indicitive of how protobufs are intended to be formatted, or is this just the format that you chose?... In regards to serialization for the example that you have here. I've been digging into gRPC, can't wait to watch your other videos on the topic. Keep up the great work, I learn a lot from you.

  • @sotiriosmantziaris6097
    @sotiriosmantziaris6097 6 лет назад +1

    viper and cobra in depth would be nice.

  • @aperezqro
    @aperezqro 5 лет назад

    Hi, ¿how did you install your environment?, the compiler, ¿what are you using?

  • @Goodvvine
    @Goodvvine 6 лет назад

    Nice, I was actually wondering this too

  • @qnepthz
    @qnepthz 6 лет назад

    I'm highly interested in this topic but sadly the quality of the sound is not as good as you always did.
    Thank you very much by the way for the video!

  • @wilkins7407
    @wilkins7407 6 лет назад +14

    +1 for cobra :-)

  • @godfrieddaneels
    @godfrieddaneels 6 лет назад +1

    +1 gRPC. Cheers!

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

    what is the code editor being used here?

  • @edb75001
    @edb75001 6 лет назад

    Isn't the YETI a mic where you talk into it from the side... not the mic pointed at your mouth like that? I think that's the issue here. As it stands now, it's actually pointed at his lap.

  • @mhausenblas
    @mhausenblas 6 лет назад

    Great job as usual! Q: when I do a `cat mydb.pb | protoc --decode_raw` I get a `Failed to parse input.`. Which `protoc` version have you got?

  • @sandipbhattacharya9140
    @sandipbhattacharya9140 6 лет назад +1

    +1 for Cobra!

  • @paulja
    @paulja 6 лет назад +1

    👍🏻x 1000 for gRPC

  • @willstranathan1610
    @willstranathan1610 6 лет назад

    I don't care for using gob to encode the number of bytes because gob is specific to go. If I want to decode this in a different language, I'd have to deal with gob's conversion of int64 into that system's types. I prefer to use binary.Write() and binary.Read() and just write the length without the type information.

  • @zulhilmizainudin
    @zulhilmizainudin 6 лет назад

    I'm new to Go and I'm quite confuse here. When dealing with files, when we should close and when we can just simply ignore it?
    In your video here, you close it when you were adding a todo task. But, you didn't close it when you were accessing todo task.

    • @JustForFunc
      @JustForFunc  6 лет назад +1

      You should always close it once you're done with it, so that's probably a bug

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

      That's because he used ioutil.ReadFile to read file. This function has already handle closing the file you read. you can visit golang.org/src/io/ioutil/ioutil.go?s=1503:1549#L42 to read its source code.

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

      @@yangchen392 thanks!

  • @sebastienfriess
    @sebastienfriess 6 лет назад

    ✔ the emoji for the checkbox is "check" @justforfunc 😉

  • @himanshumathur948
    @himanshumathur948 6 лет назад +1

    (y) cobra !! huge fan of your videos :)

  • @tikiatua
    @tikiatua 6 лет назад +1

    Great explanation. While working with grpc on a daily basis, we realized that it is sometimes somewhat cumbersome to work with the golang types generated by protoc. Therefore we wrote a small protoc plugin that will generate additional custom structs that are easier to use in go and also allow one to use embedded structs and golang struct tags.
    The plugin is not yet fully feature complete but it would be awesome, if you could take a quick look at it and provide us with some feedback. github.com/dkfbasel/protobuf/tree/master/protoc-gen-gostructs

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

    Not gonna lie sort of expected a Minecraft tutorial after that intro :(

  • @Strider656
    @Strider656 6 лет назад

    I want that emoji plugin ! What plugin are you using and how did you set it up ? Cheers :)

    • @kblooddragon
      @kblooddragon 6 лет назад +1

      Maciej It's not a plugin. That keyboard is from macOS, it can be used anywhere not just vscode. Activate it with Ctrl + Cmd + Space, if I recall correctly.

    • @Strider656
      @Strider656 6 лет назад

      Well I didn't know that, Thank you mate ! :)

  • @JochenBreuer
    @JochenBreuer 6 лет назад

    gRPC and then Cobra please! :)

  • @stherox
    @stherox 6 лет назад

    Great vid 👍, but how do you insert emoji in vscode?

    • @kblooddragon
      @kblooddragon 6 лет назад +1

      That keyboard is from macOS, it can be used anywhere not just vscode. Activate it with Ctrl + Cmd + Space, if I recall correctly.

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

      On windows you can use windows key + .

  • @Mark-vr5vu
    @Mark-vr5vu 6 лет назад

    +1 for Cobra :)

  • @vanSadhu
    @vanSadhu 6 лет назад +1

    grpc 👍
    cobra 😱

  • @Prajwal290
    @Prajwal290 6 лет назад

    I can smell Feijoada! kkk

  • @Phil-W
    @Phil-W 6 лет назад

    Please fix the echo in the room.

  • @SK_-lv3qs
    @SK_-lv3qs 5 лет назад

    Nice video. I find your mac os installed Chinese input。Ha ha

    • @JustForFunc
      @JustForFunc  5 лет назад

      对!可是我的中文不很好 😅

  • @OhadBasan
    @OhadBasan 6 лет назад

    bad microphone? :(

  • @kapoorakul7556
    @kapoorakul7556 6 лет назад

    interested in Cobra :)

  • @muhamotto2084
    @muhamotto2084 6 лет назад

    Problem with voice :(, nice video by the way

  • @raulhespinosa
    @raulhespinosa 6 лет назад

    Btw What are your thoughts about github.com/twitchtv/twirp ?

  • @jntramosbonilla2800
    @jntramosbonilla2800 6 лет назад

    +1 cobra

  • @dreamtheater_92
    @dreamtheater_92 6 лет назад

    Get thyself some sound absorption panels.

  • @arangogutierrez
    @arangogutierrez 6 лет назад

    +1 on cobra, after grpc

  • @AlanLu
    @AlanLu 6 лет назад +2

    05:12 Learning pinyin?

    • @JustForFunc
      @JustForFunc  6 лет назад

      Yup, and I activated the Pinyin keyboard by mistake haha

  • @bking1007
    @bking1007 6 лет назад

    Do a cobra

  • @knotratulshorts
    @knotratulshorts 6 лет назад

    audio quality really bad :

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

    question!! you know mandarin?? 5:12

  • @mishasawangwan6652
    @mishasawangwan6652 6 лет назад

    +1

  • @MarEkkertsen
    @MarEkkertsen 6 лет назад

    Yes please for Cobra.

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

    mixing gob with protobuf - sooo ugly... BTW it's a shame that Unmarshall does not return size read...

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

    Talk about being funcy

  • @binhuang8050
    @binhuang8050 6 лет назад

    Wow, you just ruclips.net/video/_jQ3i_fyqGA/видео.html type chinese!!! Lol

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

    I wanted to watch, but the mic quality is absolute potato

  • @raulhespinosa
    @raulhespinosa 6 лет назад

    dude, fix your freaking audio

  • @tkiraly
    @tkiraly 6 лет назад

    +1 for Cobra!