justforfunc #30: The Basics of Protocol Buffers

  Рет қаралды 46,858

justforfunc: Programming in Go

justforfunc: Programming in Go

Күн бұрын

Пікірлер: 92
@joshuam6013
@joshuam6013 3 жыл бұрын
you are insanely talented. I haven't seen anyone code as intuitively and as confident as you do.
@Ther3IsN0Sp00n
@Ther3IsN0Sp00n 6 жыл бұрын
I'm 2 minutes into the video, and I can tell you I'm interested in literally everything you said 👍👍👍
@teeeejays
@teeeejays 5 жыл бұрын
Where did the editor disappear after 26:08? :/
@RamsesAldama
@RamsesAldama 6 жыл бұрын
gRPC and then cobra would be nice. Great video. Thanks.
@BarnabyKeene
@BarnabyKeene 6 жыл бұрын
+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 жыл бұрын
Sound/mic problem today?
@chewyfruitloop
@chewyfruitloop 6 жыл бұрын
Mark Ayers sounds like he’s on his laptop mic not the yeti
@devavaghela4138
@devavaghela4138 6 жыл бұрын
Mark Ayers pio
@tlaloclopez-watermann3499
@tlaloclopez-watermann3499 6 жыл бұрын
yeah sad day about the mic. But thank you for your patient vids
@ajinkyax
@ajinkyax 6 жыл бұрын
He forgot to connect the yeti :p
@axamon1
@axamon1 6 жыл бұрын
Thank you I always learn something new and useful with your justforfunc videos :)
@Dave0Grave
@Dave0Grave 6 жыл бұрын
more about grpc in the context of microservices would be great👏👏👏👏👏
@arangogutierrez
@arangogutierrez 6 жыл бұрын
perfect timing!! I was looking for documentation on this topic!
@shadowfaxenator
@shadowfaxenator 6 жыл бұрын
Why int64 is []byte[:4] ? Isn’t it int32?
@MrSc1entist
@MrSc1entist 6 жыл бұрын
Artem Alekseev I have the exact same question
@JustForFunc
@JustForFunc 6 жыл бұрын
because in my head 64 / 8 = 4 ... good catch! github.com/campoy/justforfunc/pull/56
@AlexBeltran1
@AlexBeltran1 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.
@norman.soetbeer
@norman.soetbeer 6 жыл бұрын
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.
@ramprasath3924
@ramprasath3924 4 жыл бұрын
what is the code editor being used here?
@Gonzihh
@Gonzihh 6 жыл бұрын
more about technical stuff please!
@DigitalStaticNet
@DigitalStaticNet 6 жыл бұрын
Are you asking for the technical details about protobufs themselves?
@stevexuereb
@stevexuereb 6 жыл бұрын
Thank you for video great as always! More information about Cobra and gRPC would be great!
@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
@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??
@BrandonClapp
@BrandonClapp 6 жыл бұрын
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.
@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.
@aperezqro
@aperezqro 5 жыл бұрын
Hi, ¿how did you install your environment?, the compiler, ¿what are you using?
@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 жыл бұрын
You should always close it once you're done with it, so that's probably a bug
@yangchen392
@yangchen392 4 жыл бұрын
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!
@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.
@DanielHeckrath
@DanielHeckrath 6 жыл бұрын
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; }
@sotiriosmantziaris6097
@sotiriosmantziaris6097 6 жыл бұрын
viper and cobra in depth would be nice.
@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.
@godfrieddaneels
@godfrieddaneels 6 жыл бұрын
+1 gRPC. Cheers!
@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.
@Strider656
@Strider656 6 жыл бұрын
I want that emoji plugin ! What plugin are you using and how did you set it up ? Cheers :)
@kblooddragon
@kblooddragon 6 жыл бұрын
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 ! :)
@stherox
@stherox 6 жыл бұрын
Great vid 👍, but how do you insert emoji in vscode?
@kblooddragon
@kblooddragon 6 жыл бұрын
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 жыл бұрын
On windows you can use windows key + .
@Lepinkainen_
@Lepinkainen_ 6 жыл бұрын
Either Viper+Cobra or instrumenting Go code with Prometheus
@MiguelAngelLastYear
@MiguelAngelLastYear 6 жыл бұрын
+1 for something involving Prometheus and Grafana
@Goodvvine
@Goodvvine 6 жыл бұрын
Nice, I was actually wondering this too
@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?
@pskpetya
@pskpetya Жыл бұрын
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 :)
@sandipbhattacharya9140
@sandipbhattacharya9140 6 жыл бұрын
+1 for Cobra!
@paulja
@paulja 6 жыл бұрын
👍🏻x 1000 for gRPC
@wah1dx
@wah1dx 2 жыл бұрын
Please start uploading more videos, grafana logrus would be great or anything related to Golang 😀. Thanks
@websterlcl
@websterlcl 4 жыл бұрын
question!! you know mandarin?? 5:12
@wilkins7407
@wilkins7407 6 жыл бұрын
+1 for cobra :-)
@jessicagrebenschikov3179
@jessicagrebenschikov3179 6 жыл бұрын
+1 that +1 for cobra
@AlanLu
@AlanLu 6 жыл бұрын
05:12 Learning pinyin?
@JustForFunc
@JustForFunc 6 жыл бұрын
Yup, and I activated the Pinyin keyboard by mistake haha
@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!
@OhadBasan
@OhadBasan 6 жыл бұрын
bad microphone? :(
@kapoorakul7556
@kapoorakul7556 6 жыл бұрын
interested in Cobra :)
@himanshumathur948
@himanshumathur948 6 жыл бұрын
(y) cobra !! huge fan of your videos :)
@kokavamsikrishna3933
@kokavamsikrishna3933 6 жыл бұрын
please we need one video pprof example
@Phil-W
@Phil-W 6 жыл бұрын
Please fix the echo in the room.
@sebastienfriess
@sebastienfriess 6 жыл бұрын
✔ the emoji for the checkbox is "check" @justforfunc 😉
@olivercordingley776
@olivercordingley776 3 жыл бұрын
Not gonna lie sort of expected a Minecraft tutorial after that intro :(
@vanSadhu
@vanSadhu 6 жыл бұрын
grpc 👍 cobra 😱
@raulhespinosa
@raulhespinosa 6 жыл бұрын
Btw What are your thoughts about github.com/twitchtv/twirp ?
@Mark-vr5vu
@Mark-vr5vu 6 жыл бұрын
+1 for Cobra :)
@knotratulshorts
@knotratulshorts 6 жыл бұрын
audio quality really bad :
@tikiatua
@tikiatua 6 жыл бұрын
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
@JochenBreuer
@JochenBreuer 6 жыл бұрын
gRPC and then Cobra please! :)
@Prajwal290
@Prajwal290 6 жыл бұрын
I can smell Feijoada! kkk
@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.
@SK_-lv3qs
@SK_-lv3qs 6 жыл бұрын
Nice video. I find your mac os installed Chinese input。Ha ha
@JustForFunc
@JustForFunc 6 жыл бұрын
对!可是我的中文不很好 😅
@arangogutierrez
@arangogutierrez 6 жыл бұрын
+1 on cobra, after grpc
@bking1007
@bking1007 6 жыл бұрын
Do a cobra
@muhamotto2084
@muhamotto2084 6 жыл бұрын
Problem with voice :(, nice video by the way
@jntramosbonilla2800
@jntramosbonilla2800 6 жыл бұрын
+1 cobra
@dreamtheater_92
@dreamtheater_92 6 жыл бұрын
Get thyself some sound absorption panels.
@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...
@braydon111111
@braydon111111 5 жыл бұрын
I wanted to watch, but the mic quality is absolute potato
@JustForFunc
@JustForFunc 4 жыл бұрын
Are potatoes good or bad?
@bothBlenders92
@bothBlenders92 4 жыл бұрын
Talk about being funcy
@binhuang8050
@binhuang8050 6 жыл бұрын
Wow, you just kzbin.info/www/bejne/lZu0ZJyVm96kfaM type chinese!!! Lol
@raulhespinosa
@raulhespinosa 6 жыл бұрын
dude, fix your freaking audio
@JustForFunc
@JustForFunc 6 жыл бұрын
Thanks for watching, I guess
@raulhespinosa
@raulhespinosa 6 жыл бұрын
hehehe no problem!
@tkiraly
@tkiraly 6 жыл бұрын
+1 for Cobra!
justforfunc #29: dependency injection in a code review
28:09
justforfunc: Programming in Go
Рет қаралды 33 М.
justforfunc #31: gRPC Basics
34:08
justforfunc: Programming in Go
Рет қаралды 42 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Getting Started with Protocol Buffers in Go - Tutorial
10:05
TutorialEdge
Рет қаралды 65 М.
justforfunc #37: sync.Pool from the pool
27:11
justforfunc: Programming in Go
Рет қаралды 17 М.
justforfunc #43: Migrating Go Modules to v2+
23:45
justforfunc: Programming in Go
Рет қаралды 34 М.
justforfunc #19: mastering io.Pipes
41:24
justforfunc: Programming in Go
Рет қаралды 34 М.
justforfunc #9: The Context Package
36:27
justforfunc: Programming in Go
Рет қаралды 144 М.
justforfunc #16: unit testing HTTP servers
48:31
justforfunc: Programming in Go
Рет қаралды 71 М.
justforfunc #22: using the Go execution tracer
35:55
justforfunc: Programming in Go
Рет қаралды 22 М.
justforfunc #12: a Text to Speech server with gRPC and Kubernetes
47:28
justforfunc: Programming in Go
Рет қаралды 34 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН