Protocol Buffers Crash Course

Sdílet
Vložit
  • čas přidán 26. 06. 2024
  • Protocol Buffers (Protobuf) is a method of serializing structured data useful for transmitting data over the wire or storing it. in this video I want to build a application with pure JSON and then rebuild the same application using protocol buffers and finally compare compare the results. I will also the pros and cons of Protocol buffers.
    0:00 Intro
    1:30 Write an App with JSON
    8:00 ReWrite the App with Protobuf
    8:20 Writing .proto file
    14:00 protoc
    19:00 Using protobuf structures
    28:20 Pros & Cons of Protocol Buffers
    Benefits of ProtoBuff
    * Schema
    * Binary compact size
    * Language neutral
    Cons
    * Have to have structured data (barrier to entry)
    * More involved processed for small applications.
    * Have to make sure to update compiled boilerplate code (bugs, security vulnerability, etc.)
    * hard to use with JSON based application (Javascript/browser)
    protoc compiler
    protoc --js_out=import_style=commonjs,binary:. employees.proto
    npm install google-protobuf
    Source Code
    github.com/hnasr/javascript_p...
    Resource
    protoc download
    github.com/protocolbuffers/pr...
    protocol buffer javascript doc
    github.com/protocolbuffers/pr...
    Guys! after I uploaded the video I learned about flatbuffers which are pretty awesome.. too bad I didn’t give them an honorable mention in the video.
    🏭 Software Architecture Videos
    • Software Architecture
    💾 Database Engineering Videos
    • Database Engineering
    🛰 Network Engineering Videos
    • Network Engineering
    🏰 Load Balancing and Proxies Videos
    • Proxies
    🐘 Postgres Videos
    • PostgresSQL
    🚢Docker
    • Docker
    🧮 Programming Pattern Videos
    • Programming Patterns
    🛡 Web Security Videos
    • Web Security
    🦠 HTTP Videos
    • HTTP
    🐍 Python Videos
    • Python by Example
    🔆 Javascript Videos
    • Javascript by Example
    👾Discord Server / discord
    Support me on PayPal
    bit.ly/33ENps4
    Become a Patreon
    / hnasr
    Stay Awesome,
    Hussein
  • Věda a technologie

Komentáře • 235

  • @hnasr
    @hnasr  Před 2 lety +7

    Learn the fundamentals of the backend, scaling and load balancing with my Introduction to NGINX udemy course nginx.husseinnasser.com

  • @Andrey-il8rh
    @Andrey-il8rh Před 2 lety +112

    This was one of the most energetic talks I've heard In a while. Keep it up man, the energy and a vibe you put inside your tutorials is addictive 👍

  • @apollosilith9026
    @apollosilith9026 Před 2 lety +30

    This was probably the best dev tutorial I've ever seen. Your energy and humor is infectious; You turned what could've been a frustrating tutorial into something easy, useful, and fun to watch. Well done!

  • @cristianoseixas2417
    @cristianoseixas2417 Před 2 lety +7

    Vídeo sensacional, não tem conteúdo melhor explorando protobuffer no youtube. Muito obrigado

  • @zebcode
    @zebcode Před 4 lety +11

    Wow this is the video I've been waiting for. I really wanted to know the differences between JSON and protobuff. Really looking forward to GRPC!!!

    • @hnasr
      @hnasr  Před 4 lety +3

      Kiran Randhawa thanks Kiran! That was my purpose as well. I don’t like to use a tech without knowing why it was invented

  • @BruceCantarim
    @BruceCantarim Před rokem

    The way you teach and explain things is just amazing. Well done!
    Thank you for this, had to learn protocol buffer quickly for an existing project and this video really got me there.

  • @MrLalithavasanth
    @MrLalithavasanth Před rokem +5

    I don't usually put up a comment but I have to appreciate your humorous approach to explaining these complex technical things. You just earned a subscriber :)

    • @hnasr
      @hnasr  Před rokem +1

      Thank you dear! Enjoy the content

  • @juvi925
    @juvi925 Před 3 lety +1

    Hussein, Thank you so much for your channel! as a junior backend dev, your content has been a god send!!!

  • @romeropereira4089
    @romeropereira4089 Před rokem

    Man that was such a simple still great and useful tutorial on protobuf. I wasn't expecting too much from it and now I'm taking away great information. Cheers man!

  • @RobbyLuisa
    @RobbyLuisa Před 4 lety +127

    Dude, I rarely (never) comment on YT videos. That being said, I watch a lot of tech / dev tutorials... I really enjoy your humorous way of going through the exercise and explaining the different concepts. As already suggested in the comments below: if you continue, I know you'll end up a very popular channel for these type of tutorials.
    Well done mate! Cheers from Germany.

    • @hnasr
      @hnasr  Před 4 lety +11

      Robert Rottschalk Robert! I really appreciate you taking the time to comment it means so much. Thank you for your kind words, glad you are enjoying the content and cheers to all my subs from Germany 🇩🇪

    • @jaimerios1378
      @jaimerios1378 Před 3 lety +2

      What Robert said. Good video :)

    • @jaxtynpierce5731
      @jaxtynpierce5731 Před 2 lety +1

      i guess im asking randomly but does any of you know of a trick to log back into an Instagram account?
      I was dumb forgot the login password. I would love any tips you can give me!

    • @alikhansharapat9933
      @alikhansharapat9933 Před rokem

      and now it became very popular channel :)

  • @datapro007
    @datapro007 Před rokem

    Truly a fine video Hussein. I like your sense of humor. It makes a dry topic almost tolerable. Thank you!

  • @naveenkumarch5991
    @naveenkumarch5991 Před 3 lety +2

    Loved it as always. Great work buddy! I always eagerly forward to your videos. They are quite informative and helpful in understanding the fundamentals of these concepts.

    • @hnasr
      @hnasr  Před 3 lety

      Glad you like them! thanks Naveen

  • @socialblade7751
    @socialblade7751 Před 4 lety +6

    The best yt channel, real life programming .. thx

    • @hnasr
      @hnasr  Před 4 lety +2

      SocialBlade appreciate it thanks 😊

  • @kostyayatsuk2004
    @kostyayatsuk2004 Před 2 lety +1

    First video of Husseins that I'm watching and gotta say the energy keeps me engaged during moments which in other videos would've been incredibly boring. Definitely gonna take a look at any other videos he produces cause it seems like they would be really good

  • @ammarinader9538
    @ammarinader9538 Před 2 lety +1

    What an incredible content and amazing pedagogical approach full of energy and simplicity!

  • @roarlisfang2860
    @roarlisfang2860 Před rokem

    You are great at keeping the audience's attention! I enjoyed this course.

  • @Mnrk90
    @Mnrk90 Před 2 lety

    Great effort! Your tone catches attention and emphasizes the right parts at the right time.

  • @priyeshagarwal2644
    @priyeshagarwal2644 Před rokem

    Subscribed! This was by far the best tutorial available on protocol buffers.

  • @giorgiogristina4119
    @giorgiogristina4119 Před rokem

    You are a Star!!! Very fun, clear and straight to the point. keep up!!!! 🙌

  • @Salehalanazi-7
    @Salehalanazi-7 Před 2 lety

    Man... That was a hell of a beautiful video. I don't watch long videos but damn.... You're fun and really understand what the hell you're doing

  • @AnothyAtWork
    @AnothyAtWork Před rokem

    Great video. I really enjoyed your energy while explaining what Proto Buffers are. I now have a good understanding of what Proto Buffers are. Thanks. I'll be checking out your videos.

  • @Kidpunk98
    @Kidpunk98 Před 2 lety

    Thank you so much for this. Such a clear and beautiful explanation, and your personality is so wholesome and funny lol. Really enjoyed the video, take my like!

  • @mickjohnston499
    @mickjohnston499 Před 3 lety +1

    This is a great tutorial I like that you have a bit of fun with these it really helps keep it engaging.

  • @voidemon490
    @voidemon490 Před rokem

    I laughed so many times I had to re-watch the video, 10/10. You're amazing

  • @abhinavsrivastava2824
    @abhinavsrivastava2824 Před 4 lety +2

    Thank you so much , I was really stuck with that . And your style is just awesome !

    • @hnasr
      @hnasr  Před 4 lety +1

      Thanks for your comment I am happy I could help.

  • @jindal0001
    @jindal0001 Před rokem +1

    I felt it was a long video before I started watching it, but it was fun and really informative. Thanks

  • @arturorodriguez6897
    @arturorodriguez6897 Před 2 lety

    I like the way you express your self . Enjoyed the video and learned at the same time. good one!

  • @MrBagginsDoes
    @MrBagginsDoes Před 11 měsíci

    Dude, best Protobuf tutorial I've seen. To be honest, I am using python while watching you and JS, but you explained it so well, that the language does not matter, just like protobuf :D

  • @39rama
    @39rama Před rokem

    Thanks for the excellent video. Your presentation style was just great. Energetic and fun with great content!

  • @leopet6815
    @leopet6815 Před 3 lety +1

    That was clear and concise. Thank you.

  • @suryakantjadhav3005
    @suryakantjadhav3005 Před 3 lety +1

    Loved the explanation! Thank You!

  • @bxrtemp2
    @bxrtemp2 Před 3 lety

    I am generally lazy on writing comment on YT videos/blogs. It was an awesome explanation. I really loved it and eager listen to many more videos from your channel. Thank you

    • @hnasr
      @hnasr  Před 3 lety

      Thanks for taking the time to write this comment .. I appreciate it ❤️

  • @ahmedhibet
    @ahmedhibet Před rokem +1

    One of the best explanation I have seen. Your vibe and energy is another level. Keep it up bro. here you got a new subscriber 👍

  • @restuwahyusaputra7764
    @restuwahyusaputra7764 Před 3 lety +1

    Best channel for software engineering, i like this channel, terimakasih husen

  • @jamieblaze6514
    @jamieblaze6514 Před 3 lety +1

    You are literally the voice in my head.. lol exactly how my internal monolog sounds haha great videos man!

    • @hnasr
      @hnasr  Před 3 lety

      Haha Glad to hear it! Thanks Jamie! all the best

  • @craigmunday3707
    @craigmunday3707 Před 3 lety +1

    Another great video. Protocol buffers seem like a much more accessible version of Asn.1 and the various TLV encoding

  • @antoniomasotti8060
    @antoniomasotti8060 Před rokem

    Great video as always.
    Regarding the cons, the two you named apply if you're working on small projects / working alone or with a small team.
    As soon as you have a more complex project or dozens of Devs (of all levels) working on a project or connected projectS sharing the same data, having a schema becomes a MUST an having to maintain an additional file or update a cli much better than not having a Schema.

  • @hackingguy
    @hackingguy Před 3 lety +2

    Well now the channel have 114k! Congrats to your past! 🎉🔥

  • @hangchen
    @hangchen Před 3 lety +1

    Man I like your style and I subbed your channel after watching your video (this one) for the very first time for 4 minutes

    • @hnasr
      @hnasr  Před 3 lety

      🙏🙏 thanks Hang

  • @amychen6932
    @amychen6932 Před 2 lety

    Like the way you teaching!! Thanks for sharing all your ideas!!

  • @luqmansen
    @luqmansen Před 4 lety +1

    Cool video, can't wait for the gRPC part

  • @kumaravelrajan
    @kumaravelrajan Před 3 lety

    Excellent video. Thank you for this tutorial.

  • @ryanleemartin7758
    @ryanleemartin7758 Před 2 lety +1

    love your breakdowns . really good. I actually prefer the proto schema to just blasting json for api calls because even though the json itself doesn't have a schema, I'm still serializing and deserializing to types on server and client which is conforming to a kind of implicit schema (my type system). Now, the code gen does that for me. That's very very nice. It doesn't solve every use case but it solves all of mine!

  • @vijeth2
    @vijeth2 Před 3 lety +1

    Brilliant tutorial, this is cool. Thanks.

  • @jjkelsey1180
    @jjkelsey1180 Před 2 lety

    Thank you so much. This crash course is really helpful!

  • @KeyserTheRedBeard
    @KeyserTheRedBeard Před 2 lety +1

    great content Hussein Nasser. I broke that thumbs up on your video. Continue to keep up the great work.

  • @rmanceraleal
    @rmanceraleal Před 9 měsíci

    Fantastic Video Hussein. thank you for the hard work.

  • @Cdswjp
    @Cdswjp Před 2 lety

    this is interesting. I wonder why I haven't seen this used yet in any of the react tutorials I've been watching throughout the past months

  • @user-cc8kb
    @user-cc8kb Před 3 lety

    I really enjoyed your tutorial! Thank you :)

  • @diaahs
    @diaahs Před 3 lety

    Ok, I never comment here at YT. First time commenting here just to thank you for that humor. Very good!! Had a very great time watching this. And the video was very technically helpful. So thanks again!

    • @hnasr
      @hnasr  Před 3 lety

      Thanks Felipe for taking the time to write comment ❤️ glad you enjoyed the video

  • @serjnefiodov6302
    @serjnefiodov6302 Před 3 lety

    Thanks for video, man! Cool explanation

  • @VATSAL372
    @VATSAL372 Před 2 lety +1

    You are fun to watch! Well explained 👍

  • @alexeyshevelyov1163
    @alexeyshevelyov1163 Před 2 lety

    Dear Hussein, keep that same spirit up!

  • @EddyCaffrey
    @EddyCaffrey Před 4 lety

    Great video. I was looking for this topic. Thanks

    • @hnasr
      @hnasr  Před 4 lety

      Eddy thanks Eddy! Hope its useful 🙏

  • @douglasokubo7666
    @douglasokubo7666 Před 3 lety

    I really enjoy your explanation! Tks

  • @tambolaking5383
    @tambolaking5383 Před 4 lety +19

    You went to 16k pretty quickly. Continue doing this and several 💯 k very soon.

    • @hnasr
      @hnasr  Před 4 lety +1

      Vrunda ONE thanks for being long time sub! Will do!

    • @jonarmani8654
      @jonarmani8654 Před 3 lety

      @@hnasr Started from the bottom, now you're ... omg you put out 1 vid / day of actually good software engineering content, how have I not seen you before? So close to 100k my dude, let my subscribe help you inch closer. ☮

  • @rishiprotimbose6167
    @rishiprotimbose6167 Před 3 lety +1

    This was something new for me... 😋
    Thanks for making my day @Hussein 😁😁

  • @TurkishZombie
    @TurkishZombie Před rokem

    Life saver. Thank you man.

  • @siddharathadhumale3683

    Clean and clear explanation, :) thanks for sharing this video

  • @dragos-ariton-uifalean
    @dragos-ariton-uifalean Před 3 lety +1

    Thanks for the demo!

  • @ajaymenon0
    @ajaymenon0 Před 2 lety

    This was an amazing explanation. Here's my sub! 😎

  • @dantedt3931
    @dantedt3931 Před rokem

    This is awesome dude. Great channel. Subbed.

  • @parthas5512
    @parthas5512 Před 2 měsíci

    Not boring, very cool attitude

  • @EwenMackenzie
    @EwenMackenzie Před rokem +1

    good video. Bear in mind to be more concise with what you explain and the target audience. thanks it helped me a lot

  • @ahmedmedani9147
    @ahmedmedani9147 Před 2 měsíci

    والله شرح جميل جميل جميل جميل ربنا يجعله في ميزان حسناتك ❤❤

  • @sridhar4211
    @sridhar4211 Před 7 měsíci +1

    00:05 Protocol Buffers is a method of serializing structured data.
    04:55 Write an application with JSON and JavaScript
    09:28 Version 3 of the protocol is the latest and greatest with some changes
    14:05 Google built a language-neutral protocol buffer compiler called Proto C.
    18:47 Start building the employee class and use it
    22:57 Protocol buffer is a powerful tool for serializing and deserializing data.
    27:49 Protocol buffer is a language neutral protocol format with schema and compact size benefits.
    32:09 Using protocol buffer may not be necessary for small applications without the need for a schema.
    Crafted by Merlin AI.

  • @jaunathang
    @jaunathang Před rokem

    It's been a while since I had literate fun while learning. Good job! I'm surprised to find you here since I was looking for your backend course on Udemy two weeks ago.

  • @natureloverJ
    @natureloverJ Před rokem +1

    Good stuff!
    Big companies like Google, MS, Amazon, and other big wigs. They create lightning speed APIs by optimizing a lot of things. Protobuf is one of that. It helps to achieve the smallest possible data footprint that helps transferring that binary data over the net very fast. Certainly it is much faster than REST or SOAP. Response time gRPC < REST < SOAP.

  • @prasadsanga4830
    @prasadsanga4830 Před 4 lety

    Good info for the beginners who wants to know the stuff

  • @airnitro9949
    @airnitro9949 Před 2 lety

    I am greatful to GOD that i found this channel.

  • @barrettkepler7618
    @barrettkepler7618 Před 2 lety

    Awesome!
    Thank you very much

  • @JustinMasayda
    @JustinMasayda Před rokem

    Thank you for this excellent video, Hussein! One more con of protobuf vs JSON is it's not human readable since it's binary. For certain applications you might want your serialized data to be human readable.

  • @mkmishra.1997
    @mkmishra.1997 Před 21 hodinou

    Great video!

  • @saadowain3511
    @saadowain3511 Před 3 lety +1

    شكرا ابو ناصر

  • @mliyanage
    @mliyanage Před 3 lety

    Nice video Hussein. Protobuf is very similar to the .Net remoting concept except this is language-neutral.

  • @ChristopherHayles
    @ChristopherHayles Před rokem

    Good introduction. Thanks.

  • @rutakirsteine5190
    @rutakirsteine5190 Před rokem

    Very interesting video. Made me watch it till the end and it is not usual for me :)

  • @NishaJakhar26
    @NishaJakhar26 Před 4 lety +2

    Very cool way of explanation. IIIIIIIIIIIIIIIIIIII loved it

    • @hnasr
      @hnasr  Před 4 lety +1

      Glad it was helpful Naysha!

  • @bendunaway8296
    @bendunaway8296 Před 3 lety +1

    Great video, thank you. Gonna go check out your channel.

    • @hnasr
      @hnasr  Před 3 lety

      Welcome! And enjoy the content

  • @edgararrizon5736
    @edgararrizon5736 Před 8 měsíci

    great video, thank you

  • @nabeeltahir6013
    @nabeeltahir6013 Před 2 lety

    Awesome Tutorial

  • @SharpOar
    @SharpOar Před 4 lety

    Thanks dude, I love it too now

    • @hnasr
      @hnasr  Před 4 lety

      Raul Fossemale ❤️💗

  • @vinodjoshi435
    @vinodjoshi435 Před 8 měsíci

    nicely explain , you're my brother.

  • @eyecanddy
    @eyecanddy Před rokem

    Im a simple man. I hear "ooo abracadabra poof!" And i hit the like button.

  • @Celsian
    @Celsian Před 2 lety

    Thanks for the knowledge, you have a lot to offer. I would have preferred if the text were a little smaller and/or if you got rid of the terminal when it's not in use, or make it smaller.

  • @BboyKeny
    @BboyKeny Před 6 měsíci

    Awesome video. Another point that can be made is that protobufs shouldn't be used for really large files (like images) that you don't want to have live in memory.
    I'm investigating protobufs and I think is a really cool advantage of it having a schema, is that if you have multiple programs, in different languages, talking to eachother. Αnd more programs might be added for which you don't know the language. Then having a shared schema like this is awesome. Compilation can be done with CI and it seems you can change protobufs without having to go through every old project that's using it (by following certain best practices).

  • @ethansherr3281
    @ethansherr3281 Před rokem

    If you don't like callbacks... you can
    import { promisify } from 'util'
    import fs from fs
    const writeFile = promisify( fs.writeFile )
    ...
    await writeFile('file/path', JSON.stringify({...})

  • @AMIT103254
    @AMIT103254 Před 9 měsíci

    hey man ur videos are addictive..😃

  • @MegaCODDERS
    @MegaCODDERS Před 2 lety

    amazing video sir, thanks

  • @cheebadigga4092
    @cheebadigga4092 Před rokem

    loved the Abrakadabra Poof :D

  • @VinayVerma982
    @VinayVerma982 Před rokem +1

    "your clients will yell at you regardless what do you do, it's the circle of life, there is no escape from that" 35:29 I really felt that feeling.
    Thanks Hussein, it was amazing, watched your video before sleeping, and now 🫡 "what is sleep?" will watch your gRPC video then will think of sleeping. haha

  • @justine_chang39
    @justine_chang39 Před 11 měsíci

    this was an awesome video

  • @yahwehagape
    @yahwehagape Před 2 lety

    I love how you say “array”. 11:18

  • @tobiasbergkvist4520
    @tobiasbergkvist4520 Před 3 lety +3

    Extracting protobuf uses a lot more cpu than just parsing JSON. This is very noticable when working with map data. Mapbox Vector Tiles (MVT) uses protobuf under the hood - and compared to sending GeoJSON, a lot more cpu power is required at the client side.
    At least this is my understanding after doing direct comparisons between MVT and GeoJSON.

    • @hnasr
      @hnasr  Před 3 lety +1

      Interesting point, I thought protobuf benefit is faster deserialization ... maybe this is specific use case with mapping data

  • @NikhilTripathy
    @NikhilTripathy Před 4 lety +1

    Awesome content!!

  • @alexeyshevelyov1163
    @alexeyshevelyov1163 Před 2 lety +1

    Personally, rather than script reading videos (with the eyes of the presenter running from left to right) - with this you feel like you drinking a beer with a friend that is telling you all this cool stuff, paying attention to each and every detail, trying to make sure you understand. This is not to say that other videos are not pursuing the same goal. This is to emphasize how much more personal touch this style has and from reading the comments, you can tell it resonates with folks a lot. Again, huge thanks and keep it up!

  • @DurgaShiva7574
    @DurgaShiva7574 Před 3 lety

    GOD.. u r awesome man 🔥🔥

  • @namename8986
    @namename8986 Před rokem

    great video very educational

  • @theminm333
    @theminm333 Před 2 lety

    excellent explanation.

  • @naruto5437
    @naruto5437 Před rokem

    pretty awesome