Working with Channels in .NET

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

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

  • @draganradovac8803
    @draganradovac8803 11 หลายเดือนก่อน +17

    Learning is always so easy with Stephen Toub

  • @dune102
    @dune102 4 ปีที่แล้ว +20

    Nice format, very informative.
    Thanks for showing the code, I was able to put it in Visual Studio and try it out.
    Great way to learn.

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

    Good job men. This piece of infrastructure was desperately needed!

  • @EzDoesntExist
    @EzDoesntExist 4 ปีที่แล้ว +1

    Very informative way to demonstrate the idea.

  • @letgabeequaltrue9097
    @letgabeequaltrue9097 4 ปีที่แล้ว +27

    I never knew the lead singer to Metallica had a coding channel

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

    What I don't feel you addressed was, what is this for? What are the concrete use-cases for this mechanism? Might be a topic for a follow-up episode.

    • @dandoescode
      @dandoescode 4 ปีที่แล้ว

      Aggreed. I thought a more concrete example is really needed to drive the point home. For example a couple of services responsible for certain tasks, and how this plays with DI. Obviously both services would need to be aware of exactly the same channel.

  • @dcuccia
    @dcuccia 4 ปีที่แล้ว +4

    Great discussion! Liked the comparisons to pipelines and pub/sub. Surprised, however, there was no comparison to all the Rx stuff.

  • @sergeymikolaitis8205
    @sergeymikolaitis8205 4 ปีที่แล้ว

    Guys, thanks for this! Informative, useful, clear. I'm pumped for all of the performance improvements things.

  • @ivandrofly
    @ivandrofly 6 หลายเดือนก่อน

    10:19 - bound vs unbound writing
    21:50 - comparison with Pipelines

  • @AdamsTaiwan
    @AdamsTaiwan 4 ปีที่แล้ว +1

    So I have c# like Notebook app and run workflows in the background. There are several ways of displaying information and would like to know what tech. would work best: Channel, Pipeline, other?
    1. Showing progress (ok to lose frames of data)
    2. Logging results to a file (frames of data cannot be missed)
    3. Logging results to a view (frames of data cannot be missed)
    I tried using ShareMemory for the progress and reading just last value when possible, but takes a bit to setup.

  • @hamadsherazi6896
    @hamadsherazi6896 3 หลายเดือนก่อน

    Life is good with .net

  • @ivandrofly
    @ivandrofly 2 หลายเดือนก่อน

    [21:54] - What are the merits of Channels compared to Pipelines?

  • @johnnm3207
    @johnnm3207 4 ปีที่แล้ว +2

    Awesome, thanks I was reading about this last week

    • @CecilPhillip
      @CecilPhillip 4 ปีที่แล้ว

      Channels are amazing once you understand their use case

    • @ssoltani498
      @ssoltani498 4 ปีที่แล้ว +2

      @@CecilPhillip is there any real world example of that?

    • @willinton06
      @willinton06 4 ปีที่แล้ว

      S Soltani I can think of a couple hundred, basically any time you need to asynchronously listen and react to an API, I have my own implementation of this in basically every server I make, of this shows promise I might go back and refactor a little, although it would be an aesthetic decision, for this is wouldn’t make much of a difference to my implementation, I’ll de finely use channels in future projects tho

    • @5pirithief
      @5pirithief 4 ปีที่แล้ว +1

      ​@@ssoltani498 Channels can be used like Dataflow blocks. This tutorial gives you real-life scenarios:
      docs.microsoft.com/en-us/dotnet/standard/parallel-programming/dataflow-task-parallel-library
      Here is a nice article that explains the difference between Dataflow vs Channel:
      devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/
      github.com/dotnet/runtime/issues/25439

  • @MrRishabSharma
    @MrRishabSharma 4 ปีที่แล้ว +1

    Good enough information to getting started but Is there a way i can connect two different services using a separate channel service and how can i migrate this in memory operation to a persistent data store for fault tolerant

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

    Nice, Thanks for the good session.

  • @johnernest8109
    @johnernest8109 4 ปีที่แล้ว +2

    Since Channel.CreateUnbounded has a set number and capacity, is this useful in a scenario like a database record for example say you store a serialized JSON per record in the filesystem and want to avoid race conditions in a high concurrency scenario where clients may be reading from the same table at the same time, but you don't want them to read a record that's in the middle of being written so you need to implement record locking, and there could be multiple records queued up to be written at a time from different clients?

  • @DriRoPeloMundo
    @DriRoPeloMundo 4 ปีที่แล้ว +1

    can do a real case for use it?

  • @KarthikChintalaOfficial
    @KarthikChintalaOfficial 8 หลายเดือนก่อน

    Is Channels inspired from Golang?

  • @ivandrofly
    @ivandrofly 6 หลายเดือนก่อน

    Thank you :)

  • @jianglongdu946
    @jianglongdu946 4 ปีที่แล้ว

    channel like blockingCollection , so what is diff ?

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

    Reactive extensions is much more powerful as it is much higher in abstraction, but this has better backpressure semantics, as this is a low-level construct

  • @NavedRasul
    @NavedRasul 2 ปีที่แล้ว +1

    Great (high quality) learning content guys! It helped me a lot. Hope it does others as well. 👍🏼🙂

  • @yasser2768
    @yasser2768 4 ปีที่แล้ว

    You need to add read based on value condition

  • @conaxlearn8566
    @conaxlearn8566 4 ปีที่แล้ว +1

    10:54 You're not the only one. 😂😂😂

  • @christopherhill9348
    @christopherhill9348 4 ปีที่แล้ว

    Great feature! I have code to refactor!

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

    So basically this is an Async Message Pump.

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

    Hello my dudes!

  • @TeaDrivenDev
    @TeaDrivenDev 4 ปีที่แล้ว +2

    Small nitpick: 10,000ft are about 3km, not 1.

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

    After the storm

  • @bob-xm7ny
    @bob-xm7ny 10 หลายเดือนก่อน +1

    oh my god let him talk for 10 seconds. This video wasn't supposed to be him explaining to you.

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

    Ko

  • @roy_c
    @roy_c 4 ปีที่แล้ว

    Go.NET?

  • @timob24311111
    @timob24311111 4 ปีที่แล้ว

    not work :(

  • @yasser2768
    @yasser2768 4 ปีที่แล้ว

    Didn't like it much, so I created something called conditional list, way better

    • @andersborum9267
      @andersborum9267 5 หลายเดือนก่อน +2

      Sure, you’re beating Stephen Toub, a distinguished engineer and guarantor of of the perf improvements in recent .NET Core releases.