Excellent tutorial👌 and very accurate, precise chart. These are some much needed topics to be taken care of. My small request will be to share the code and chart in a repo, it will be much helpfull.
Is it just me or our good tutor looks like Scarlett Johansson's brother 🤔. This is A really good tutorial by the way. Gives good context for how to write Async code.
@evgenymaksimov 26:09 Of course, we cannot see that it has made a big difference with just a request. If you send thousands of IO-heavy requests, each request will be dedicated to a different thread, and as you said before, the application will lose performance after a while because the threads are memory hungry. If we use coroutines instead, I can say that they are lighter threads, the application will run more efficiently. Actually this may also be an answer to when to use thread and when to use async.
@@akshaysarbhukan6701 not quite. FastAPI itself doesn't have hard dependecy on webserver. Regularly most use uvicorn as webserver, which uses http 1.1, but you can install hypercorn instead which supports 2.0 and it will work just fine
It doesn't forbid to create, it just doesn't let more than one kernel thread take execution at the same time. However, for I/O calls GIL is getting realeased, so it doesn't impact it in our case
« writing async in front of every function and hoping for the best » yup that’s me 😂
That is really how it looks like when you do not check the implementation under the hood
That was me too btw:)
Лучшее видео по FastAPI что я смотрел за последнее время. Кратко и в то же время очень ёмко. Видно что автор глубоко разбирается в вопросе. Респект!
спасибо :)
finally amazing explanation with good examples
I don't know how how come that you don't have a milion of views
You desire a million views - that is a great in-depth tutorial!
Excellent tutorial👌 and very accurate, precise chart. These are some much needed topics to be taken care of. My small request will be to share the code and chart in a repo, it will be much helpfull.
Thank you for the kind words! Noted, I added git with chart to the video description :)
hi, Evgeny!
great job! crystal clear explanation!
big thanks!
Is it just me or our good tutor looks like Scarlett Johansson's brother 🤔. This is A really good tutorial by the way. Gives good context for how to write Async code.
Great video, well done!
Thx for best material. It will be interesting if you do video about ASGI and WSGI web servers.
Thank you! I’m considering it
@evgenymaksimov 26:09 Of course, we cannot see that it has made a big difference with just a request. If you send thousands of IO-heavy requests, each request will be dedicated to a different thread, and as you said before, the application will lose performance after a while because the threads are memory hungry. If we use coroutines instead, I can say that they are lighter threads, the application will run more efficiently. Actually this may also be an answer to when to use thread and when to use async.
great point! thanks
This video should have more views 👍
Great video. Thank you very much!
Great video, thanks!
Excelent
Отличное видео
Good job comrade
Very interesting
can you send a book you are referring to in your video?
Thanks for the tutorial. I have a question, is there any way to implement server sent events in FastAPI?
take a look at pip package sse-starlette, it adds this functionality and you can use it with fastapi!
@@evgenymaksimov thanks. So basically FastAPI still uses http 1.1 on top of which sse-starlette implements SSE, am I correct?
@@akshaysarbhukan6701 not quite. FastAPI itself doesn't have hard dependecy on webserver. Regularly most use uvicorn as webserver, which uses http 1.1, but you can install hypercorn instead which supports 2.0 and it will work just fine
@@evgenymaksimov yeah, got it. Thanks again for the help.
Hi bro, can you make a video of using chunk method
Awesome
Did you try to use psycopg3 since it provides async?
14:50 What about GIL, doesn't it forbid to create multiple threads within 1 process?
It doesn't forbid to create, it just doesn't let more than one kernel thread take execution at the same time. However, for I/O calls GIL is getting realeased, so it doesn't impact it in our case
подписался) Жека а че не на русском?)