Building an Basic API with gRPC and Protobuf

  Переглядів 95,132

Tensor Programming

Tensor Programming

5 років тому

In this tutorial, we take a look at how we can use gRPC to build a simple API.
Github Repository: github.com/tensor-programming...
gRPC: grpc.io/
Protobuf: developers.google.com/protoco...
Request Form: goo.gl/forms/rFjHcZMRJ3bYPEC03
Cloudways Web App Hosting: www.cloudways.com/en/?id=507366
Support the Channel and Join Patreon:
Patreon: / tensor_programming
Dontate:
ETH: 0x03247265dd5242605bD2FA3c40fb3b70d9e3D685
Cardano: addr1q9auccwrr9ws8qdyv45f4qwsx76pfmld4zapks89sakq94ay0xmle73y0r8ruwd0zslls4eglf98lghru7ywv56cedysk7ftjt
Check out our Twitter: / tensorprogram
Check out our Facebook: / tensor-programming-119...
Check out our Steemit: steemit.com/@tensor

КОМЕНТАРІ: 150
@upnrunning7094
@upnrunning7094 2 роки тому
Really nice job! I appreciate you not getting tangled up in complex examples, but instead focus on the material at hand that you're teaching. SUBSCRIBED
@JohnDoe-ji1zv
@JohnDoe-ji1zv 4 роки тому
More content on microservices with gRPC please, thanks for the video 🙏🏻
@seanfang398
@seanfang398 11 місяців тому
after finishing watching this video, I just realized this is a video made 4 yrs ago, WOW, it is still amazing!! Thank you ❤
@TensorProgramming
@TensorProgramming 11 місяців тому
haha, glad its still relevant. Luckily, Go doesn't change all that much over the years.
@yzhang2008
@yzhang2008 Рік тому
5:07 those numbers after the eqaul sign are to denote the sequence of the fields in the message. In general your vid is great! Thanks!
@TensorProgramming
@TensorProgramming Рік тому
Was an issue due to the video being fully live coded. In the follow up video I went back and corrected the explanation.
@k1ngjulien_
@k1ngjulien_ 4 роки тому
very nice! that's exactly the introduction to grpc I was looking for
@codealong493
@codealong493 5 років тому
Got it working after a bit, thanks for all the pointers.
@TensorProgramming
@TensorProgramming 5 років тому
Glad you found it useful.
@sulafpv
@sulafpv 4 роки тому
The best tutorial on gRPC
@techmadehere
@techmadehere 4 роки тому
Awesome Content ! Precise
@JalerSekarMaji
@JalerSekarMaji 4 роки тому
It gives me more insight about the implementation of gRPC. thankyou very much!
@feziletati2958
@feziletati2958 4 роки тому
Great tutorial, well done.
@RajeshSamson
@RajeshSamson 4 роки тому
Great explanation ... very beautiful video
@ngocthanhao1678
@ngocthanhao1678 4 роки тому
This video is awesome! Thanks you
@tony-go-code
@tony-go-code 2 роки тому
thank you for sharing, i love this.
@AtticusFinch65
@AtticusFinch65 4 роки тому
Thank you!
@farishuskovic8486
@farishuskovic8486 5 років тому
Thanks Tensor. I started learning Go in the middle of 2018. The Golang videos you've put out have definitely been a contributing factor to me further exploring this technology. Really appreciate the time and effort and look forward to future Go videos. I recently started learning React. I noticed you're profile pic is of the react symbol but you don't have any react videos. I definitely have an interest in combining Go and React into a stack along with an advanced API technology like using protobufs and GRPC or GraphQL. Wondering what your thoughts are on those technologies or if we might see something like react and or Graphql on the channel in the future ?
@TensorProgramming
@TensorProgramming 5 років тому
Firstly, thank you. Its always great to hear when people find my content useful. I make this content to help people learn and if I've helped at least one person then I've done my job. Its not actually a react symbol; its an Atom. I mean of course its also the react symbol but that wasn't what I had in mind. I've done some react reasonML stuff on this channel and I do have plans to do some clojurescript stuff with OM/OM next, but there will be no JavaScript based tutorials on this channel for the foreseeable future. The main reason for this is due to the fact that there are a ton of JavaScript/React tutorials already out there. Also, I don't personally like using JS when I can avoid it. GraphQL on the other hand is a thing that I certainly love to play with. I have some stuff on it with Elixir and also intend to add some Go based GraphQL stuff in the near future. Likely, If I do a large project with gRPC/GraphQL and Go, the frontend will be built with a language like Reason, Elm or ClojureScript for the sake of those users.
@seanvogel8067
@seanvogel8067 4 роки тому
Good tutorial. going to watch your golang videos now! btw: / is slash \ is backslash
@TensorProgramming
@TensorProgramming 4 роки тому
Yes I am aware, I confuse them because of my dyslexia.
@khurramrizvi153
@khurramrizvi153 3 роки тому
@@TensorProgramming I too sometimes have this problem, but just a quick help for you to simply identify it. Just try looking at the TOP point of the character '/', if its pointing forward than its a 'forward slash' or just 'slash' Similarly for '\' , the point on the top is pointing backwards, hence its a 'backward slash' or just 'backslash' Hope, this makes sense for you :D BTW, great content on gRPC.
@TensorProgramming
@TensorProgramming 3 роки тому
@@khurramrizvi153 yeah I am aware of how to identify a backslash or forward slash. Since this video, I've made an effort to be more deliberate with how I articulate these two. Still can be hard when I am not thinking about it though.
@ajk7151
@ajk7151 3 роки тому
excellent video!
@samighasemi3333
@samighasemi3333 3 роки тому
Great tut
@subee128
@subee128 Рік тому
Thank you very much
@SAlmanKhanDev
@SAlmanKhanDev 2 роки тому
The additional step to mix it with gin really made it special. Thanks a ton man!
@cryptopatrick
@cryptopatrick 5 років тому
Absolutely amazing videos! I went through the RPC video, took study notes, and then wrote the code as you instructed in the video - made my first RPC calls! YAY!! :D Mr. Tensor, may I ask: what is your goto language? If you just want to explore an idea, what language do you usually reach for? Cheers!
@TensorProgramming
@TensorProgramming 5 років тому
It really depends on the use-case that I am working on. I've never really been the type of person to stick to one language for everything because I often find that there are better solutions. I like Go for microservices and for small-medium backend web apps. I also like Rust for small-medium backend web apps and for WASM compilation (and some games). I like Elixir for Microservices and Larger Web apps along with Clojure for Large web apps and ML etc.
@josebravo7998
@josebravo7998 5 років тому
@@TensorProgramming you should make a microservices with golang tutorial sir. Love this one btw
@TensorProgramming
@TensorProgramming 5 років тому
@@josebravo7998 Well technically this little series is a start, but yes, I do intend to add a full microservice project at some point.
@adilrasiyani4240
@adilrasiyani4240 2 роки тому
For Mac, if you use brew you can install everything with brew install grpc. It will install the proto stuff for you automatically.
@TensorProgramming
@TensorProgramming 2 роки тому
Sure. For linux (debian) you can use aptitude, for linux (arch) pacman etc. On windows there is scoop and the new windows package manager too
@gamezine8374
@gamezine8374 2 роки тому
PoE got ready to play during the record :D
@TensorProgramming
@TensorProgramming 2 роки тому
Yeah, love me some PoE.
@devnetindonesia9716
@devnetindonesia9716 2 роки тому
thx a lot
@pc2753
@pc2753 3 роки тому
I'm caught between this go grpc stuff and phoenix liveview. I appreciate it's a bit like comparing apples and oranges but I want to start a new project for my github resume and want to know which you suggest I start with. I can't bear json restful, I come from a c++ desktop background so both grpc and websockets seem a much better way forward. Just your thoughts on this really please.
@TensorProgramming
@TensorProgramming 3 роки тому
With both you can setup websockets and serve your data (GRPC can be restful and LiveView is all about phoenix channels). If you really want something that is graphically focused then liveview is really the way to go. And if you don't want to have to mess with JavaScript frameworks; then I also recommend LiveView. On the other hand, you could do a stack with go GRPC as the main backend and some JS frontend framework if that's the style you prefer.
@bminerrolltide
@bminerrolltide 5 років тому
Forward slash is /. Back slash is \. Ok I feel better. Sorry pet peeve. Nice video!
@TensorProgramming
@TensorProgramming 5 років тому
Its alright, I am dyslexic so its a common mistake.
@bminerrolltide
@bminerrolltide 5 років тому
@@TensorProgramming Are you really dyslexic? After playing around a bit gRPC is a neat way to build APIs
@TensorProgramming
@TensorProgramming 5 років тому
@@bminerrolltide Yeah, certainly am. gRPC is quite good and extremely useful.
@siasalar
@siasalar 4 роки тому
Thanks a lot for this amazing video, could you please explain more about the "third_party" folder, why created? usage? and how we can use Go Module instead of this folder. thanks in advance.
@TensorProgramming
@TensorProgramming 4 роки тому
That third party folder was just created for convenience sake. It contains all of the include files that are needed to compile the protobuf stub file into a Go module. There is no alternative; you need those files when using the compiler.
@tomsutton1526
@tomsutton1526 10 місяців тому
@@TensorProgramming Hey, thanks for the great video. Gave you a like and subscribe. It's nothing personal, but the one thing that drove my classmates and I crazy the most is when you're following a tutorial and the author makes some sudden jump or does something all of a sudden that makes no sense and they don't explain why they did it. That's exactly what you did with third_party. If you're assuming that the audience doesn't know the most basic of things, like how to download gRPC, why would you assume that they would just know why to create the third_party folder and what to put in it?
@TensorProgramming
@TensorProgramming 10 місяців тому
@@tomsutton1526 I understand what you are saying. The jump there isn't really me going through a ton of steps, its me unzipping the folder and putting it on my path as I said in the video. I do explain where the third_party folder came from and all that. The main issue I think you and your classmates are seeing is that it pops in and out of the video because that little part at 2:30 was recorded after I had gone through the stuff at 3:10. Basically, I went back and recorded more explanation while I was editing the video because I felt that it was missing. At the time, I should have just overdubbed it on a few looped frames but I didn't think to do that. Glad you enjoy the content regardless. Feel free to ask any questions you have and of course, leave and constructive criticisms.
@luisr1421
@luisr1421 4 роки тому
Hey man. I am (probably) confused. What you’re doing here is creating a GRPC server and then a GRPC client that is able to talk to that server and expose data via REST?
@hubstrangers3450
@hubstrangers3450 5 років тому
Thank you for the content on the site, would like to know what happen to GO clips (2016) some of them are deleted...why? not the blockchain clips, the other title
@TensorProgramming
@TensorProgramming 5 років тому
A guy had stolen the content and re-uploaded it to his channel. I submitted a copyright strike to UKposts and they apparently applied it to his channel and also my videos. I am fighting to try and get them back up but who knows at this point.
@hubstrangers3450
@hubstrangers3450 5 років тому
lol... wonder why he did what he did, by way, thanks for explanation behind the code lines, few folks tend offer that for their respective tutorials.@@TensorProgramming
@TensorProgramming
@TensorProgramming 5 років тому
@@hubstrangers3450 He did it because he wanted to make money off of my content. I didn't really care that he reuploaded my content; the problem was that there were people who were looking for the source code and they couldn't find it.
@user-cq7db9ij1o
@user-cq7db9ij1o 4 роки тому
Excellent. But can i develop the client without gin-gonic? Looks like Go needs lot of library support.
@TensorProgramming
@TensorProgramming 4 роки тому
No you really don't need gin-gonic nor does the language need a lot of library support. Go's standard library has tons of http stuff in it (along with many other useful things). I used gin-gonic because I haven't touched on any of the Go frameworks in any of my videos. You can look at the stdlib packages here: golang.org/pkg/
@joycalcutta
@joycalcutta 5 років тому
The numbers 1 & 2, probably sets the serialization order of the member elements.
@TensorProgramming
@TensorProgramming 5 років тому
See the pinned comment.
@ThePandaGuitar
@ThePandaGuitar 5 років тому
Thanks for the video. My question to you, what's the point of using Protobuf and gRPC if you're going to be using endpoints and JSON?
@TensorProgramming
@TensorProgramming 5 років тому
Well this particular example is a case where you might want to have two individual microservices on the same machine or on multiple machines and then you want to serve the data through a RESTful API. You could always not use the JSON endpoints and make a client that just uses the data. While this example is fairly contrived, I have built systems that have similar architecture in the past. A service that deals with a database, a service that deals with the business logic on a server, a service that serves content through nodes and a client. Its a pretty common architecture pattern with microservices that are service some data or service to other devs/users.
@ThePandaGuitar
@ThePandaGuitar 5 років тому
@@TensorProgramming Very helpful! Thank you very much, subscribed!
@erstaples1
@erstaples1 4 роки тому
@@ThePandaGuitar I believe it's just for demo purposes. You might also ask why go through all the trouble to set up a basic math API when any computer can do those ops - because demo. Also, you might want to check out gRPC Gateway if you want to set up a json proxy.
@romsthe
@romsthe 3 роки тому
So your client is actually a REST server itself, could be confusing. Well good tuto anyway, I never used golang but it was easy to follow and understand. Thanks a lot
@TensorProgramming
@TensorProgramming 3 роки тому
This client is a rest server sure, but it can be any type of client you want, a CLI, a GUI etc.
@PandemicGameplay
@PandemicGameplay 4 роки тому
Question: is GRPC async? I guess my question is how are multiple clients handled since you are using only 1 connection throughout the lifetime of the main client server?
@TensorProgramming
@TensorProgramming 4 роки тому
The protocol gRPC has nothing to do with the synchronicity of the client/servers; its just a protocol after all. That being said, you can make asynchronous calls with gRPC data just as you could with JSON data or XML data. Our server here can handle multiple clients as it currently is since we are serving over TCP. Thing is, you don't have to manually create a bunch of concurrent logic with servers in Go. The "net/http" library naturally uses Concurrency/Goroutines and so when you call http.ListenAndServe you spawn as many goroutines as are needed to handle the incoming connections. If you want to try it for yourself, just make a simple http server with go and open a bunch of browser windows at the same time or create a client which pings it multiple times with many different go routines.
@vincentyoumans
@vincentyoumans 4 роки тому
what about returning slices of structs and structs in structs// . for GoLang. What would the Protofile look like and how would they be addressed?
@TensorProgramming
@TensorProgramming 4 роки тому
You should checkout the syntax rules for protobuf: developers.google.com/protocol-buffers/docs/proto3 You can use the repeated keyword to specify that you want to return multiple items of the same type with the same name. If you wanted to return a slice of a struct, you would define the struct in the protobuf and then wrap it in another message marking it as repeated.
@ganeshkamble9078
@ganeshkamble9078 3 роки тому
How can we do the performance test for such implements with one of load test tools like jmeter/loadrunner?
@TensorProgramming
@TensorProgramming 3 роки тому
You'd just make an interface and use them. I recommend checking out their documentation for more info.
@ganeshkamble9078
@ganeshkamble9078 3 роки тому
@@TensorProgramming Thank you, I will go through its documentation. Hope i will get my solution.
@Mo-gp4df
@Mo-gp4df 2 роки тому
thank you very much for the tutorial I want just to code server-side in java and client-side in go . Can you help me ?
@TensorProgramming
@TensorProgramming 2 роки тому
Thats a little bit of a strange stack, but yes Go can be used for client side work given that it can compile to JavaScript and WASM. Many of those features are in the standard library too. One of these days I had planned to talk about gopherjs and wasmer-go.
@MukulMalviya
@MukulMalviya 3 роки тому
Best
@hajidalakhtar
@hajidalakhtar 3 роки тому
I LOVE YOU
@venil82
@venil82 3 роки тому
if each field only takes 1 byte, how can you pack a whole in64 in it? isnt the number in proto file just a sequence number denoting position of field in a messsage?
@hieudoan7711
@hieudoan7711 2 роки тому
i think he made a mistake by saying that. but the tag value (=1, ...) is used under the hook for serializing data by protoc
@Noctalo05
@Noctalo05 3 роки тому
Hello, I'm kinda new with gRPC. I just created a server and client (java) but I can only connect them with 'localhost' + port. My goal is to connect a client from a PC other than mine to my server running on my computer). Do you know how to change 'localhost' to find my pc adress (connected by wifi) ? Or where can I find more information if it's more complicated ? thanks,
@TensorProgramming
@TensorProgramming 3 роки тому
You can find all of this information in the gRPC documentation: grpc.io/docs/languages/web/basics/ Basically you are going to be serving over localhost on the server and then you forward the ports and assign the domain that you want to use.
@empaguia
@empaguia 3 роки тому
in 1:40, I extracted it on C:/Program Files/protocolbuffers, then I ran the protoc --version command but the protoc command is not recognized, how was that? where is the right path? well my Go directory is in C:/Program Files/Go and go run is working anywhere...
@TensorProgramming
@TensorProgramming 3 роки тому
Its because you don't have the binary for protoc on your path variable where as Go must be if its working anywhere. Look in the protocol buffer folder and you should see a bin folder which has the proper executable in it. If you add that to your path variable then it will be globally available in any terminal/command line; otherwise you need to use the full path to it for the terminal to know what you are referring to.
@empaguia
@empaguia 3 роки тому
@@TensorProgramming , ok thanks for the time answering, I will resolve that one issue'
@SouvikHaldarmustang
@SouvikHaldarmustang 5 років тому
One point seems to be wrong:- The numbers beside the fields are not their size but their position in the structure. Correct me if I'm wrong.
@ugokoli
@ugokoli 5 років тому
You are right
@TensorProgramming
@TensorProgramming 5 років тому
You are not wrong, I corrected this problem in the next video. Also you aren't the first person to mention this in the comment for this video. I knew I had misspoken at the time, but it was a result of this being a live coded session.
@AbhaySingh-vx5yo
@AbhaySingh-vx5yo Рік тому
When I tried to run client, I am facing this issue of "Fatal to run server: bind address already in use" , even though nothing was running on port
@TensorProgramming
@TensorProgramming Рік тому
Which port are you using? I would try changing it to something absurdly high.
@pheadrim
@pheadrim 4 роки тому
Hope you can help me, I'm stuck on generating the go files. My command is now: $ protoc --proto_path=proto \ --proto_path=third_party \ --go_out=plugins=grpc:proto service.proto And it keeps coming back with the error message: Missing output directives.
@TensorProgramming
@TensorProgramming 4 роки тому
Did you put the include files in the third_party folder? If so, try reinstalling protoc and see if that helps. Also, can't tell if you are using double dashes or single dashes. Each one should be a double dash.
@TheFlareMind
@TheFlareMind 3 роки тому
Can someone help me please? when i run the protoc command i'm getting the following error: 'protoc-gen-go' is not recognized as an internal or external command, operable program or batch file. --go_out: protoc-gen-go: Plugin failed with status code 1. I'm on Windows 10. I have my gopath set in my path. I have protoc installed.
@TensorProgramming
@TensorProgramming 3 роки тому
Do you have the protoc-gen-go library installed? Make sure to run "go install google.golang.org/protobuf/cmd/protoc-gen-go" and make sure your gobin path is in your path variable.
@codelucky
@codelucky 4 роки тому
Can you make a series on it? Please, make a series on Golang gRPC to build modern API & Microservices.
@TensorProgramming
@TensorProgramming 4 роки тому
Eventually I will be doing microservices but its a bit more complex then a single video.
@codelucky
@codelucky 4 роки тому
@@TensorProgramming Ya that's why I asked you to make a series of tutorials like multiple videos under a playlist. That would be cool if you cover from basics of gRPC to creating complex APIs with it in Golang.
@supergirl4817
@supergirl4817 4 роки тому
that's a great idea.... even am looking for a full course on grpc in Go. You should create it... I will share the videos with my 25k Twitter followers (mostly devs) and 115k IG followers (general people, 50% douche & 50% students).
@ThanhVu-eo2lj
@ThanhVu-eo2lj 3 роки тому
Hi Tensor Programming. Please let me know what is your font and themes name. Thank you. Your video is awesome
@TensorProgramming
@TensorProgramming 3 роки тому
Fira code with font ligatures and spacemacs dark theme.
@ThanhVu-eo2lj
@ThanhVu-eo2lj 3 роки тому
@@TensorProgramming Thank you very much
@dumike2388
@dumike2388 4 роки тому
love your commandline tool, could you share the link of the cmd. LOL
@TensorProgramming
@TensorProgramming 4 роки тому
Its just Cmder. cmder.net/
@rishikeshkumar490
@rishikeshkumar490 2 роки тому
Please write an example code for a simple Server and Client program in Visual Studio 2019 using C++ language using GRPC calls. Please explain how to solve grpc/protobuf library dependency.
@TensorProgramming
@TensorProgramming 2 роки тому
Sorry, I don't cover C++ on this channel, nor do I use Visual Studio... You can find examples in C++ on the gRPC documentation page and in github. C++ doesn't have an auto include package manager like Go or Rust do, so you are going to have to use something like Bazel or make/cmake to include the protobuffer.
@kudoamv
@kudoamv 4 роки тому
Hi, When I generated .pb.go file it did not automatically made the interfaces part of the code you are showing in your video. What should I do now?
@TensorProgramming
@TensorProgramming 4 роки тому
Which interface are you talking about specifically?
@kudoamv
@kudoamv 4 роки тому
@@TensorProgramming 10:00 AddServiceClient interface and all the other stuff after that was not generated for me. thanks for such quick response.
@TensorProgramming
@TensorProgramming 4 роки тому
@@kudoamv It seems that the old command that I was running with the new protoc compiler doesn't produce both the server and client interfaces. so instead of running that command, run this command: protoc -I proto\ proto\service.proto --go_out=plugins=grpc:proto Basically -I tells it to get the include directory, then you pass in the dir with the proto files in it and the protofile path and then you specify that you want grpc as a plugin and point it at your dir again.
@kudoamv
@kudoamv 4 роки тому
@@TensorProgramming Oh yeh, protoc -I=proto proto/service.proto --go_out=plugins=grpc:proto worked for me. I was doing "protoc -I=proto --go_out=proto proto/service.proto" before, as it was mentioned in the docs. I still could not understand what "plugins=grpc:proto" does?
@TensorProgramming
@TensorProgramming 4 роки тому
@@kudoamv The plugin tells the compiler that you want to generate code using the grpc library and when you specify proto in this case, its just the folder that your protobuffers are inside of.
@shubhamagarwal2959
@shubhamagarwal2959 2 роки тому
Can I Call my gRPC function of server directly from Angular 10
@TensorProgramming
@TensorProgramming 2 роки тому
You would need a grpc client. Dunno personally about whether or not angular has such a thing.
@georgelza
@georgelza 3 роки тому
hmm, getting the below message on the client. client\main.go:24:3: g.Get undefined (type *gin.Engine has no field or method Get)
@georgelza
@georgelza 3 роки тому
ignore, resolved :) g.Get g.GET
@nishantpatil9005
@nishantpatil9005 4 роки тому
can you help me with this,, its coming while running the server cannot find package "grpc_tutorial-master/proto" in any of: C:\Go\src\grpc_tutorial-master\proto (from $GOROOT) C:\Users ishantpatil\go\src\grpc_tutorial-master\proto (from $GOPATH)
@TensorProgramming
@TensorProgramming 4 роки тому
Check to see the module name of the generated proto file and make sure that its correct.
@nishantpatil9005
@nishantpatil9005 4 роки тому
@@TensorProgramming Actually My project wasn't inside src folder.. that was the cause
@TensorProgramming
@TensorProgramming 4 роки тому
@@nishantpatil9005 You should use the module system; it simplifies these potential problems.
@shayaxelrod7691
@shayaxelrod7691 Рік тому
Welcome to the Golang! Any COD fans?
@atharvchinchkar1100
@atharvchinchkar1100 Рік тому
bro can u make a video for whole algo trading with grpc
@TensorProgramming
@TensorProgramming Рік тому
maybe at some point. Algo trading is more of a trading topic though than a programming topic; so its not really all that interesting for this channel. I could however do a series on building a matching engine given I have a ton of experience in that though.
@poterior1314
@poterior1314 4 роки тому
excuse me, why do we need `plugins` and `grpc` into `--go_out=plugins=grpc:proto`
@TensorProgramming
@TensorProgramming 4 роки тому
protobuf isn't grpc. We use the plugin to tell the protobuf compiler that we want it to generate for grpc.
@mustache2295
@mustache2295 4 роки тому
So, basically, I'm a noob and all this pretty much went over my head. What knowledge serves as a prerequisite in understanding this material? I've only recently started studying programming and such but mostly I've been studying web development. As of now I've only reached JavaScript after learning HTML and CSS. I've also learned a bit of Python but truthfully still at a very basic level for it all, really. I've also just learned about API's and have been researching them since TechLead says that coding is so "10 years ago" and that you should be using API's and I'm not really sure what he means. After some time researching API's I am still rather confused as to how it fits into the puzzle of programming. Can you help me understand this a little better? I apologize for any vague language I may be using. As I said, I'm very new to programming and I'm just trying to improve my understanding of the technologies before me in order to make an informed decision on the skills I should be focusing on. Thanks, Ian
@TensorProgramming
@TensorProgramming 4 роки тому
You probably shouldn't listen too much to what techlead says. That guy tends to be hypercritical/hypocritical and hes opinions generally are not very relevant for the average developer. If you want to learn about RPCs and APIs, I recommend that you look into the basics of building servers and the difference between client and server side architecture. There are many different ways to structure a web app; you can build serverless apps, client side progressive web apps, servers with API endpoints that feed into multiple clients, servers that use server side rendering with small clients etc. APIs and more generically RPCs just serve the purpose of connecting one application to another. They are interfaces that define how an application can access some data from another application. When you get on a website like Facebook or Google, your browser accesses a client facing web application which renders out the user interface (Html/Css etc) and that app fetches data from multiple APIs to allow you to do things. There are also many different types of APIs that you can use; GraphQL, Rest, Restful, SOAP, Json-RPC, Proto-RPC etc. Start with something small; for instance, you can look at my Go playlist and follow along with the Wiki series (its old but most of it should still be relevant) or you can find whatever other resources are out there for building basic web applications. Good luck
@mustache2295
@mustache2295 4 роки тому
@@TensorProgramming Thanks a ton for such a well put together response to my question. I will look into your playlist for a better understanding!
@michaeladeyeri5982
@michaeladeyeri5982 5 років тому
Please, what's the name of your VS Code proto extension?
@TensorProgramming
@TensorProgramming 5 років тому
The syntax extension that I am using is called vscode-proto3
@Wallawallawallawalla
@Wallawallawallawalla 5 років тому
I think you mispoke when talking about the use of the field number. It isn't used to specify the size of what is stored in it, it's used to have a small reference to the field so it may be identified in the message binary format. Field numbers 1-15 take do take just one byte to encode, and should therefore be reserved for frequently occurring fields. The type (as in actual type like int64, string, etc) of data in the field should never influence the field number. Source: am googler, use these every day, and double checked my expectations against the docs to verify.
@Wallawallawallawalla
@Wallawallawallawalla 5 років тому
By the way, I think the (possible) error doesn't at all take away from the excellent video! Thank you for making these and all your videos, they are always excellent!
@TensorProgramming
@TensorProgramming 5 років тому
@@Wallawallawallawalla Its not a problem. Thank you for pointing out the issue. Another subscriber mentioned the same problem a little while ago when the video came out. One of the side effects of doing everything "Live" is that the explanations can suffer somewhat. I did try to make the concept clear in the follow up video on gRPC so I am hoping that makes up for it (since it is a fairly fundamental concept for gRPC and protobuffers).
@haI9k
@haI9k 3 роки тому
If I am honest this library is a nightmare, nothing works the same as it was at the moment when this video was recorded.
@TensorProgramming
@TensorProgramming 3 роки тому
To be fair the video was recorded about a year ago. Most of the API should be similar though I am sure some stuff has changed since then.
@DheerajKumar-lc9tx
@DheerajKumar-lc9tx 2 роки тому
Hi, can you share unit tests for the code.
@TensorProgramming
@TensorProgramming 2 роки тому
I didn't write any unit tests for this code. It was all live coded like all of my tutorials, so what you see is what you will get in the repo.
@atultiwari9326
@atultiwari9326 2 роки тому
I am new, but how is this any easier than CORBA or REST!!!!!!!
@TensorProgramming
@TensorProgramming 2 роки тому
Well first, Rest is not really comparable to gRPC. But Cobra is similar in some ways, though its much larger. Cobra is an objected oriented framework with a huge set of features and flexibility for distributed computing, gRPC is just a remote procedure call framework based on http/2 and protobuf. Cobra is more opinionated and gRPC is not.
@ariseyhun2085
@ariseyhun2085 2 роки тому
Has anyone ever told you that you mistake forward-slash with back-slash? lol
@TensorProgramming
@TensorProgramming 2 роки тому
yeah get it plenty. Its a side effect of being dyslexic.
@ackeejag
@ackeejag 3 роки тому
Great video but why have all of these packages gone towards single letter meaningless method names!? Why be complicated on purpose!?
@TensorProgramming
@TensorProgramming 3 роки тому
Not sure what you mean, give me an example...
@kosnowman
@kosnowman 4 роки тому
hey the content is nice and clear, but please don't just paste and the code and talk, it was very hard to follow, apart from that nice tutorial
@devashishkhandelwal1009
@devashishkhandelwal1009 3 роки тому
His Voice sounds so computerised and autotuned for some reason
@TensorProgramming
@TensorProgramming 3 роки тому
Hmm, might have been my mic but no its my natural voice.
@pc2753
@pc2753 3 роки тому
He's lying. His name is not Tensor.
@TensorProgramming
@TensorProgramming 3 роки тому
Of course my name isn't tensor, its just a pseudonym.
@pc2753
@pc2753 3 роки тому
@@TensorProgramming well obviously. Never mind, we all have a different sense of humour.
@TensorProgramming
@TensorProgramming 3 роки тому
@@pc2753 Oh I know, don't worry, I like to take the sails out of these kinds of jokes. My humor is very dry....
@pc2753
@pc2753 3 роки тому
@@TensorProgramming oh I see what you're doing, very clever. Good content btw
@TensorProgramming
@TensorProgramming 3 роки тому
@@pc2753 glad you like it. Cheers.
@NBGTFO
@NBGTFO 4 роки тому
Ugh, Go is terrible.
@TensorProgramming
@TensorProgramming 4 роки тому
oh? why do you think that?
Building a Chat app with Docker and gRPC
25:39
Tensor Programming
Переглядів 27 тис.
When RESTful architecture isn't enough...
21:02
Dreams of Code
Переглядів 234 тис.
I PUT MY ARMOR ON (Creeper) (PG Version)
00:19
Sam Green
Переглядів 3,2 млн
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Переглядів 711 тис.
Protocol Buffers Crash Course
36:07
Hussein Nasser
Переглядів 228 тис.
gRPC в Golang на реальном примере
26:38
BACKEND NINJA
Переглядів 16 тис.
Beginners Guide to gRPC in Go!
18:15
TutorialEdge
Переглядів 125 тис.
Getting Started with Protocol Buffers in Go - Tutorial
10:05
TutorialEdge
Переглядів 61 тис.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Переглядів 61 тис.
Building Microservices with the Go Kit Toolkit
25:12
Tensor Programming
Переглядів 50 тис.
Golang gRPC  | Build a Unary Service Method - Part 1
29:47
Tech and Beyond With Moss
Переглядів 32 тис.
The Need for Protocol Buffers
5:25
Stephane Maarek
Переглядів 64 тис.
I had no idea SHEIN sold PC parts…
27:10
Linus Tech Tips
Переглядів 1,4 млн
Как открыть дверь в Jaecoo J8? Удобно?🤔😊
0:27
Суворкин Сергей
Переглядів 765 тис.
ЭТО САМЫЙ МОЩНЫЙ ИГРОВОЙ СМАРТФОН ЗА 270$ 🔥
13:33
Thebox - о технике и гаджетах
Переглядів 32 тис.
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Переглядів 951 тис.
Phone charger explosion
0:43
_vector_
Переглядів 6 млн
Интел подвинься, ARM уже в ПК!
14:06
PRO Hi-Tech
Переглядів 137 тис.