Client Streaming | gRPC in .NET 5

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น •

  • @vasil922
    @vasil922 3 ปีที่แล้ว +2

    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
      @nickchapsas  3 ปีที่แล้ว +2

      That’s the subject of the video for Friday 😀😀

    • @vasil922
      @vasil922 3 ปีที่แล้ว

      @@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.

  • @rao6815
    @rao6815 3 ปีที่แล้ว +1

    You have awesome concepts of Software Engineering. Thanks alot.

  • @rottofili
    @rottofili ปีที่แล้ว

    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

  • @OlegKosmakov
    @OlegKosmakov 3 ปีที่แล้ว +1

    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 👍🏻

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +3

      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.

  • @lost-prototype
    @lost-prototype 3 ปีที่แล้ว +1

    Hey Nick! I would love to see a video on some nice reusable techniques for pagination and filtering at the business/domain layer!

  • @muhammadshoaibsikander5148
    @muhammadshoaibsikander5148 3 ปีที่แล้ว

    Its really helpful. Thanks.

  • @Positivevibes-xn6uy
    @Positivevibes-xn6uy 3 ปีที่แล้ว +1

    Can we pass an object as request which has a streaming param and a normal param?

  • @bahabbj5798
    @bahabbj5798 3 ปีที่แล้ว

    Thanks nick

  • @yrj4029
    @yrj4029 2 ปีที่แล้ว

    What will happen if we cancel the client side streaming? Will it raise exception?

  • @89sfry
    @89sfry 3 ปีที่แล้ว

    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?

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +3

      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.

    • @89sfry
      @89sfry 3 ปีที่แล้ว

      @@nickchapsas sweet, thanks for the response.
      I incorrectly assumed we would maintain a http2 connection for unary calls too.
      Thanks!

  • @rao6815
    @rao6815 3 ปีที่แล้ว +1

    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.

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +1

      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.

    • @rao6815
      @rao6815 3 ปีที่แล้ว

      @@nickchapsas do you have any id where we discuss it. Because i got only one answer of my questions.