Hey Hussein Great Vid! I wanted to give you also a heads up that within the go programming language there is a context package in the standard library that is also built into net http library. From the docs it states that: "the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes". From typical usage you spawn a background context object and embed that into all subsequent http requests paths. For example if a user is connected through a websocket connection, or sends an expensive http request and then closes their browser (or some other defined actions that signals a stop), you invoke a method on that context object that sends a cancellation signal that propogates across all the function paths and cause them to return early and stop the operation.
@harshavardhan99914 жыл бұрын
Thanks for adding KZbin chapters.. I will always come back and watch chapters that I am not confident.. 👍
@kafirboysrock4 жыл бұрын
I like such thought experiments. As engineers this is the most underrated skill one can have. But it's the most powerful one. Please create more such videos, you are a good teacher just like Feynman.
@soumyadeeproy66114 жыл бұрын
man ! Can you make a video on how to work with wire shark and analyse network traffic ?
@KashifMinhaj4 жыл бұрын
With grpc and Go, it is easier to implement request cancellation. Go has built-in concept of contexts, which you can check after every atomic operation to see if it is cancelled.
@TenderBug4 жыл бұрын
Thanks for this eye opening explanation
@naceriomar64842 жыл бұрын
i'm searching for this a long time
@ankitsaiyan6151 Жыл бұрын
I have imolemented it using context cancel in HTTP2 requests in Golang
@sariksiddiqui60594 жыл бұрын
thanks for the video man, how come grpc can cancel request and http2 not,when they both use multiplexing?both have a handle on request sent,right?
@hnasr4 жыл бұрын
Siddiqui Sarik great question! That is because gRPC has access to low level HTTP/2 API which allows control at stream level. This low level api doesn’t exist on browsers or vanilla HTTP/2 apis. Client libraries take care of multiplexing out of the box. Hope that make sense
@sariksiddiqui60594 жыл бұрын
@@hnasr that does make sense,so in terms of browsers adapting to grpc,they will have to tacke this issue and implement more native low level http2 apis
@hnasr4 жыл бұрын
Siddiqui Sarik correct! Thats another reason why gRPC are not on browsers yet.
@alejandroloaiza84264 жыл бұрын
Can you do a video for http3 vs http2?
@hnasr4 жыл бұрын
Sure! I am yet to make a dedicated video on H3 meanwhile check out this playlist kzbin.info/www/bejne/ZoDVnn55d5WIqLM kzbin.info/www/bejne/nIeugaV6p6qqiqs
@noahwilliams89184 жыл бұрын
"Cancel what dood?" needs to be a shirt 😂 with an HTTP 418