Комментарии:
Awsome content.
ОтветитьThis is my Well actually comment:
you have two CPU threads per physical core.
Also it's the kernel who does the context switching, not the CPU
Also a thread that's waiting for network can safely be idle. As long as it's not doing work. The kernel is smart enough to give it a lower priority. Since read()ing a socket blocks (unless you're doing epoll) you can safely have 100 threads waiting for responses without a significant performance degradation. The problem will be of course if all of those threads are doing work at the same time, where you're absolutely correct.
Hello Hussein,please record fastApi Architecture analysis.
ОтветитьSo, if in Django there is like 1 client, 1 thread, 1 query, then how does it tackle several (10k like) clients?
ОтветитьHussein, Can we do data replication in django? I am very confused about it. Some says yes, some say it cant be
ОтветитьHussain I don't hv words to say, these stuff are absolutely important and these are the actual engineering stuff. I love this content and really appreciate your effort on these videos. There stuff are really important for everyone specially for fresh graduates like me. Again thank you so much. Watching and noting down your videos is my new hobby. Thanks again.
ОтветитьIs this video added in Udemy course as well. ? On another note, I have a question, if Python is not concurrent (can't run multiple threads at the same time due to GIL), how does Django handle concurrent API requests? Does it use multiple processes.
ОтветитьI think this is one of the major drawbacks of doing backend processing in django, because if we have to update databases continuously in a background thread, that means we can't use persistent connection as it will keep one of the connections in idle state always
ОтветитьI would love to see a video on a good multi client per thread model
ОтветитьGreat stuff!
it think it worthes mentioning that ORM only lately started being async in a very recent version, which means the thread will keep the request waiting and any other calculation as-well!
we d love to see how to do parallel processing in python and especially Js and Python!
What about asgi with one thread how the Django will handle the transactions?
ОтветитьQns???
I'm downloading something in my laptop from mobile's network so very interesting thing is happening all the time while downloading. That is , whenever in every 2-3 sec there is spam of 1 sec in which the Mobile network speed goes to less than 0 kb .
Why is that happening?
And and there is no drop-down speed in laptop. It's normal
Great video 📹 👍 👏
ОтветитьIs it possible to do spring boot architecture and how project reactor works ? love the storytelling here !
ОтветитьGot confused. Isn't WSGI spinning a new forked subprocess every time a new request arrives? How does that relates with this one connection per thread?
ОтветитьHi Hussein, thanks for such content, it is really helpful and help me to evolve.
I feel like using your old way of explaining stuff (using a PowerPoint presentation) is much easier to follow and make the topic you are trying to explain much simpler, I hope you return back to use it again, Thanks.
Hi Hussein, Thanks for sharing quality content.
Can we expect a course on LInux OS fundamentals on udemy as u created for networking ? Please reply. Thanks
I highly appreciate your video and the hardwork behind it. One request to you could you please make a same kind of video for hibernate and tomcat. Please...
ОтветитьNice T shirt 😂
ОтветитьGreat video from one Hussein to another
ОтветитьDjango is ❤
Thank you Hussein for talking about Django and covering about this topic...
I'm sot sure but the way you talk about threads here make me feel that you are actually talking about worker process, not threads, each process having it's own memory, I'm I missing something here?
ОтветитьI'm going to post this here as well as on Stackoverflow. So here it goes:
I am running Django app using the WSGI server (gunicorn) on Linux. I am using the local memory for caching inside the application. I am using 3 workers (workers are altogether different forked processes that shared different memory spaces) and multi-threads using g-event under each worker. As the memory space is the same for each worker I'm safe having one single cache in one worker. But the load to the workers is balanced by the OS kernel so if the workers have different memory space so, the application cache 'set' by one worker can be made a 'get' by another worker or will it turn into an issue. I can solve this using unified caching using Redis or Memcached but wanted to clear this doubt before implementing another new service.
As always, great video. Thanks you so much, learned few new things!
ОтветитьSo is it not good to use multiple threads? Even though there is context switching wouldn’t still go much faster than blocking I/o? Isn’t that why it exists? GIL or not?
ОтветитьCould you do a similar video but for Rails? Would be hella interesting to compare.
ОтветитьThank you Hussain.. I am waiting for your 5th udemy course 😅
ОтветитьHi Hussein, I don't quite agree with your discussion regarding context-switching near the end of the video. Your typical web-server is IO bound and like you explained the worker threads are just mostly sitting idly waiting for a response from the database. If that is the case, why would context-switching be a significant concern? Even if you have a hundred threads, the context switch only happens when there is an actual response from the db server, right? And when it does happen, the cost of the context switch (< 10 μs) is insignificant compared to typical db response times (at least a few milliseconds).
Ответитьdjango have sqlite3 api?
ОтветитьMuch love
Ответитьfast api next?!
ОтветитьHussein could you please explain how WSGI servers work or why are they necessary for production with the python frameworks and not with other languages like node js or go?
I just can't understand why they need that intermediate layer between the python server and the clients
Thank you for this amazing video! I would love to see a video on frontend listening models.
ОтветитьLol. Love way you say the bad kid dB. Really the orm. I am beginner Dev level but crap. I am forcing myself to do ORM way coz want to learn but just SQL seems so much easier than rubbing ORM into compliance. Really ORM is the hardest and doing Django way. But at times the SQL is way quicker than orm... But yeah learning is cool and your vids even better.
Ответитьwhat about async orm (django4+)?
ОтветитьHussein, what does happen if you put PgBouncer into this?
ОтветитьThank you 🥺❤️
ОтветитьI believe the problem is not with Django per say but python's threading model. Yes you guessed right, the GIL. Also to avoid data races, Django has to execute the queries synchronously. Even using async frameworks like django channel, you must wrap your async coroutines with synchronous helpers. Hello GIL
ОтветитьThank you sir!! Awesome video!!
ОтветитьHussein, I love and appreciate all the content you put out. You truly are a rare breed of teacher.
I can't express my gratitude enough as well as how much you have taught and have helped me throughout my career. I always learn something new when I watch your videos, take your courses, listen to your podcasts or read your articles.
You have this great ability to go very deep into the technology stack without confusing people. Really, not all heroes wear capes.
Also, are we seeing a teaser for a Udemy course here? 👀
Salam from 🇩🇿
Very interesting! Can you please make a video on spring/springboot backend architecture?
ОтветитьThanks for making this video Hussein.
ОтветитьThanks for great explanation, was using this framework for a couple of years before, and was wondering about someone explain how it actually works behind the scenes) keep it up!
Ответитьnever knew django was this stupid
ОтветитьVery interesting, I would be interested to hear your opinions on Laravel a popular PHP framework.
ОтветитьGreatly informative like every other video. What do you think about netty and its use cases??
ОтветитьYou remind me of Firas Zahabi.. related?
ОтветитьAwesome video!
ОтветитьI am beginner django developer. What course from you should I take first to improve my backend knowledge?
ОтветитьReally informative video. Make more like these !! We love it.
Ответить