Build Asynchronous Systems! The world is full of Asynchronous Workflows

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

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

  • @ofadiman
    @ofadiman 2 ปีที่แล้ว +6

    The process of ordering food perfectly explained. Thanks! 😁

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

      Thanks for watching!

  • @appy2501
    @appy2501 2 ปีที่แล้ว +6

    In real world we are making lot of synchronous HTTP calls to other micro services(tightly coupled) to get the desired data which is a big ball of MUD for us.
    W.R.T Asynchronous there are two things that are there -
    a) Events
    b) Asynchronous Modules(asyncio, co-routines, FLUX & MONO)
    Still lot to learn and your videos are very informative 👍

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

      I'm going to cover the different between A & B in a video soon.

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

    Thanks for the video!

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

    so what would the data look like of the event that's being pushed to the message broker? Doesn't this mean that both boundaries need to have some shared entity?

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

      Wait Staff sends a message (specifically a command) to the kitchen. That command would contain an identifier of the request and the food to make Kitchen would send an event or a reply when the food is ready which the Wait staff would consume. That event or reply would contain the same identifier sent from the initial command to correlate it.

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

    Nice example 🙂

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

    Does that mean that the client and server need to have an open web socket connection? Often in a webApp, the client expect synchronous response. This just happened to me an hour ago when I ordered something, and later the waiter came and tell me they can't fulfill my order. It's a bad UX.

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

      I found this. th-cam.com/video/wEUTMuRSZT0/w-d-xo.html. thanks.

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

      Yup, websockets are a good way to push updates to the client. Check out this video th-cam.com/video/Tu1GEIhkIqU/w-d-xo.html

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

    I have Problems parsing the food Icon with THAT waiter Icon. The waiter seems to be of a different kind of protocol than what this food needs ;)
    Apart from this, another nice vid!

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

      Fine dining fast food.

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

    This is a good video but don't most languages handle this automatically for yourself like example, the async keyword in C#?

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

      No, there's a different between in-process asynchronous programming models and messaging. I'll create a video in the future about this.

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

      Asynchronous code is not the same as asynchronous communication between processes/client-server. HttpClient.GetAsync establishes a synchronous connection that is non-blocking in code. It is asynchronous in the sense that it does not block the rest of the program from running while waiting for the result to return. Tasks are a complex topic because the way they are handled underneath varies. If it is threads, networking processes, or IO processes at a OS level.

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

    How to sell more asynchronous workflows for a team that believes that synchronous processes are easier and asynchronous will get things too complicated?

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

      If they believe they are easier and in their current form hold up and don't have issues, then not much to do. If however processes are left hanging in a bad state because of failures, well that would be a reason why to look at async workflows.

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

    The 'absurd' example is only looking at cost, but it's incredibly low latency. Need a refill? No worrying about trying to flag down your 'worker' or hoping the 'scheduler' is fair.
    Is there a middle ground? What about sharing that resource... but with SLA's tied to money? Congrats, you now understand 'the cloud' too! :)

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

      Not only cost, but resilience and availability. The waiter/waitress/server can go take a lunch break, they don't have to stand waiting for you to eat your food. They don't need to be available.

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

      @@CodeOpinion I'm largely teasing, just saying that there are upsides and appropriate situations for the 'blocking' request/response style. Sometimes its preferable to get a fast answer or error vs a guaranteed answer later. 'Yesterdays News' and all that.
      Its also *far* easier to understand a nice, linearizable 'workflow'. Sure, it won't scale up very well but the intellectual burden of MDA doesn't scale down so great either. A team of jr to mid level devs is going to crash and burn badly.