Great video Nick! Keep up the good C# content! One thing I can say regarding bidirectional streaming is that you can still model it in a request-response type fashion if you really want to. What you can do is use `oneof` and have 2 different types of messages you can send both ways (ClientRequest/Response and ServerRequest/Response). In code, you can use for example a waithandle to await in one thread until you receive a response from the other side. This is again very niche but I've had such a use-case.
@@nickchapsas Indeed, I was just hoping these aren't prerecorded and you can also mention this niche use-case. But looking forward to the Friday video regardless.
Congrats for the video! Hope to see in the future an update by you targeting .NET 7 or .NET 8 Preview. You’re a smart software engineer with very good skills in teaching, too. 12:38
Offtopic: I don't know about memory issues with string interpolation in logging, but what's more serious is that structured logging becomes impossible in this case. Great video anyways 👍🏻
Because the message in the text section can be used as a message template if you are using something like serilog, you would be creating one template per different value of that interpolated item. The correct approach would be _logger.Log("My name is {FullName}", "Nick Chapsas"); so that the first bit is the template and the second is a variable.
Probably a naive question, but is there a perf benefit in streaming analytics data rather than a separate call for each click? Or just a stylistic difference?
Streaming analytics through an already open conneciton means that there is no overhead of connecting again and again for every call. You just have a single open connection and you can send a lot of requests through that same open connection.
Awesome explanation. But I have some questions related to GRPC. 1. GRPC is based on HTTP2 so we can not use both HTTP1 and HTTP2 at same time on same project. How we can achieve it. Because in many cases we need both REST and GRPC. 2. you are using simple string and integer in Objects (Messages) which is quite easy to consume (it doesn’t required sterilization of deserialization and not required Mapping). What if anyone want to use mapping of complex object. 3. I was managed to use both HTTP1 and HTTP2 both on same project it was performing very well on local but as soon as I deployed it on Kubernetes it was not responding as I was aspecting. Can you make a video on my above two questions? Once again thanks, I learnt a lot from you thanks.
1. gRPC and a normal non grpc endpoint are exposed with different mechanisms so you can have both 2. The Proto syntax can be extended quite a bit and you can build any object using it. I highly recommend you take a lookt at the proto3 spec 3. Performance depends on the operation and gRPC won't just magically be faster. It need to be optimized. There will be a video for that subject in the series.
Great video Nick! Keep up the good C# content!
One thing I can say regarding bidirectional streaming is that you can still model it in a request-response type fashion if you really want to. What you can do is use `oneof` and have 2 different types of messages you can send both ways (ClientRequest/Response and ServerRequest/Response). In code, you can use for example a waithandle to await in one thread until you receive a response from the other side.
This is again very niche but I've had such a use-case.
That’s the subject of the video for Friday 😀😀
@@nickchapsas Indeed, I was just hoping these aren't prerecorded and you can also mention this niche use-case. But looking forward to the Friday video regardless.
You have awesome concepts of Software Engineering. Thanks alot.
Congrats for the video! Hope to see in the future an update by you targeting .NET 7 or .NET 8 Preview. You’re a smart software engineer with very good skills in teaching, too. 12:38
Offtopic: I don't know about memory issues with string interpolation in logging, but what's more serious is that structured logging becomes impossible in this case.
Great video anyways 👍🏻
Because the message in the text section can be used as a message template if you are using something like serilog, you would be creating one template per different value of that interpolated item. The correct approach would be _logger.Log("My name is {FullName}", "Nick Chapsas"); so that the first bit is the template and the second is a variable.
Hey Nick! I would love to see a video on some nice reusable techniques for pagination and filtering at the business/domain layer!
Its really helpful. Thanks.
Can we pass an object as request which has a streaming param and a normal param?
Thanks nick
What will happen if we cancel the client side streaming? Will it raise exception?
Probably a naive question, but is there a perf benefit in streaming analytics data rather than a separate call for each click?
Or just a stylistic difference?
Streaming analytics through an already open conneciton means that there is no overhead of connecting again and again for every call. You just have a single open connection and you can send a lot of requests through that same open connection.
@@nickchapsas sweet, thanks for the response.
I incorrectly assumed we would maintain a http2 connection for unary calls too.
Thanks!
Awesome explanation. But I have some questions related to GRPC.
1. GRPC is based on HTTP2 so we can not use both HTTP1 and HTTP2 at same time on same project. How we can achieve it. Because in many cases we need both REST and GRPC.
2. you are using simple string and integer in Objects (Messages) which is quite easy to consume (it doesn’t required sterilization of deserialization and not required Mapping). What if anyone want to use mapping of complex object.
3. I was managed to use both HTTP1 and HTTP2 both on same project it was performing very well on local but as soon as I deployed it on Kubernetes it was not responding as I was aspecting. Can you make a video on my above two questions?
Once again thanks, I learnt a lot from you thanks.
1. gRPC and a normal non grpc endpoint are exposed with different mechanisms so you can have both
2. The Proto syntax can be extended quite a bit and you can build any object using it. I highly recommend you take a lookt at the proto3 spec
3. Performance depends on the operation and gRPC won't just magically be faster. It need to be optimized. There will be a video for that subject in the series.
@@nickchapsas do you have any id where we discuss it. Because i got only one answer of my questions.