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 👍
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?
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.
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.
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!
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.
How to sell more asynchronous workflows for a team that believes that synchronous processes are easier and asynchronous will get things too complicated?
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.
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! :)
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.
@@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.
The process of ordering food perfectly explained. Thanks! 😁
Thanks for watching!
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 👍
I'm going to cover the different between A & B in a video soon.
Thanks for the video!
You bet!
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?
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.
Nice example 🙂
Thanks! 😃
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.
I found this. th-cam.com/video/wEUTMuRSZT0/w-d-xo.html. thanks.
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
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!
Fine dining fast food.
This is a good video but don't most languages handle this automatically for yourself like example, the async keyword in C#?
No, there's a different between in-process asynchronous programming models and messaging. I'll create a video in the future about this.
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.
How to sell more asynchronous workflows for a team that believes that synchronous processes are easier and asynchronous will get things too complicated?
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.
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! :)
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.
@@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.