[gRPC #12.1] Upload file in chunks with client-streaming gRPC - Golang

  Рет қаралды 15,846

TECH SCHOOL

TECH SCHOOL

Күн бұрын

Пікірлер: 25
@babanadopu
@babanadopu 4 жыл бұрын
Excellent content! I would just like to see how you could save the file chunks directly to disk by appending chunk by chunk to the open file, as they are read from the stream. With your current implementation, you buffer the whole image in RAM and then store it to file all at once. By saving chunk by chunk, we could send over pretty large files and not worry if the machine will run out of RAM
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
Yes, you're absolutely right, Aleksandar! I also thought about that when making this video. However, to keep this video simple and focus on the main point about client-streaming gRPC, I decided to just buffer the whole image in memory.
@khoaminh5569
@khoaminh5569 2 жыл бұрын
Hi, thank you very much for your awesome video, can you give me example how to write file chunk by chunk ?
@until_4ever362
@until_4ever362 4 жыл бұрын
This is the best instructional video I have ever seen
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
Thanks! That means a lot to me.
@until_4ever362
@until_4ever362 4 жыл бұрын
Thank you very much, I like your video very much
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
I'm glad you like it, Pd Yolo :D
@anhhaoam3379
@anhhaoam3379 Жыл бұрын
@yusupovjasur
@yusupovjasur Жыл бұрын
I wonder why I'm not getting an error saying "laptopServer should implement UploadImage method" after I have generated new protobuf files
@yisanhuang9298
@yisanhuang9298 3 жыл бұрын
When I click "run test" on TestClientUploadImage function. I met an error "The process cannot access the file be cause it is being used by another process." At this time, the jpg file in tmp dir was processed by the client and server, the client has called the file.close(), the server receives the data and save them to file, but not call file.close(). I found at line 57 in service/image_store.go file, should add "defer file.Close()" . This issue may not happen on MAC OS, but I am using windows.
@TECHSCHOOLGURU
@TECHSCHOOLGURU 3 жыл бұрын
nice catch! thanks Yisan!
@nossandra
@nossandra 4 жыл бұрын
Thank you very much!
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
Welcome!
@whorudra
@whorudra 4 жыл бұрын
Topics and tutorial is awesome. I am having trouble on understanding things a bit maybe its because of you are explaining super fast. It feels like I am following your code but not understanding it. So please give some time on explaining and slow down a bit. also the whole test thing in client/main.go is really confusing. stores are also confusing.
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
Thanks for your feedback, Rudra! I will try to slower down a bit and explain more in the next videos. However, I suggest you to watch the whole course (bit.ly/grpccourse) from the beginning to fully understand it, because the codes in each lecture is written based on the previous ones.
@whorudra
@whorudra 4 жыл бұрын
@@TECHSCHOOLGURU I am following your whole playlist.😊
@Ali_Alhajji
@Ali_Alhajji 4 жыл бұрын
@@TECHSCHOOLGURU The lessons and code are great, but when you do the videos you're only reading what you're writing, and you do it very fast. There is no explaining of why you're doing what you're doing.
@vjekoeng5
@vjekoeng5 4 жыл бұрын
Allow me to share some insights. In my case, 12 lectures later, I am starting to get a grasp of things. I have experience in C/C++/Python, but left coding in favor of product management. With fair experience in coding, not working with Go previously doesn't seem to be an issue. What is quite challenging is to understand the details of client-service implementation i.e. how does the whole "architecture" work. Additionally, I don't think that introductory lessons on gRPC shared enough to understand details of implementation in client/service. Once you start connecting the dots on those, everything makes sense. In that light, I definitely agree that explaining why are things done the way they are would significantly raise quality of the lessons.
@atulbari4867
@atulbari4867 4 жыл бұрын
Thanks man !!!
@TECHSCHOOLGURU
@TECHSCHOOLGURU 4 жыл бұрын
Happy to help
@ArjunTiwari91
@ArjunTiwari91 3 жыл бұрын
What does this "one of " do in .proto ?
@ShubhamGupta-vi2bm
@ShubhamGupta-vi2bm 2 жыл бұрын
Yeah! I am confused with same when to use the enums and oneof
@yisanhuang9298
@yisanhuang9298 3 жыл бұрын
Thanks, my teacher! I have a question. When the client uploads an image, it uses many times to call stream.Send function, the one is sending image's info, the others are sending image data, at the server-side, the server can get info or data from the same stream, can this be understood as using the features of http2?Thanks again!
@TECHSCHOOLGURU
@TECHSCHOOLGURU 3 жыл бұрын
Yes, exactly Yisan. The same stream can be used to send and receive multiple chunks of the data.
@Hjgd-d5o
@Hjgd-d5o Жыл бұрын
Too much code for a simple task
[gRPC #11.1] Implement server-streaming gRPC API - Golang
16:21
TECH SCHOOL
Рет қаралды 14 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 34 МЛН
[gRPC #9.1] Serialize protobuf message - Golang
25:38
TECH SCHOOL
Рет қаралды 19 М.
Building a gRPC Service in Golang: Server Streaming RPC (Tutorial)
14:28
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 260 М.
Where should you use gRPC? And where NOT to use it!
10:57
CodeOpinion
Рет қаралды 86 М.
How to Upload Files with Go Fiber (S3 or save to disk)
15:22
Coding with Robby
Рет қаралды 8 М.
[gRPC #10.1] Implement unary gRPC API - Golang
33:00
TECH SCHOOL
Рет қаралды 19 М.
Beginners Guide to gRPC in Go!
18:15
TutorialEdge
Рет қаралды 139 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 123 М.
[gRPC #13.1] Implement bidirectional-streaming gRPC - Golang
17:06