Get my Fundamentals of Networking for Effective Backends udemy course Head to network.husseinnasser.com for a discount coupon (link redirects to udemy with coupon applied)
@LordErnie3 жыл бұрын
Man you should start a podcast for this stuff, just put some of it on spotify for us to listen to it in the background. You are so good at explaining these things in such a casual way that you are kinda having a conversation rather then just explaining, thats a real skill. Would love some of this on spotify to listen to while just cleaning up and stuff.
@venkyman49853 жыл бұрын
Him: does anyone even print stuff these days The books behind him: ...
@hnasr3 жыл бұрын
You got me
@ahmedmalakai97533 жыл бұрын
You probably dont care at all but does anyone know of a trick to get back into an Instagram account..? I was dumb forgot the password. I would appreciate any assistance you can give me!
@hacker64xfn993 жыл бұрын
@@ahmedmalakai9753 If u still did not get back to ur account, it is as simple as clicking forget the password and that will send an email to ur gmail and then create new one for that instagram account !
@emonymph69113 жыл бұрын
@@hacker64xfn99 dude probably forgot his youtube account as well lol
@boredsherbet3 ай бұрын
@@ahmedmalakai9753 wait ok why are you asking here? This seems like the world's #1 most irrelevant place to ask that question. no shade or anything but like, i mean where did u think it was gonna go?
@aadityarane34643 жыл бұрын
This is what they always told me at work, understand the basics, understand the basic.. and here I am always ended up getting confused in basic. And back to ur channel to relearn all those things
@MikkoOnBass2 ай бұрын
Not only was your explanation informative and served as a great recap of the differences between these paradigms, but you were funny too! Your engaging personality kept me interested for the whole video, and it was over before I realised :)
@yaBoyDreamer4 жыл бұрын
I loved this explanation! You might consider doing a podcast when you just chill by yourself or with a guest and start off from some technical subject but treat it casually and with lots of everyday examples, just like you did in this clip. New sub from me and keep it up! :D
@hnasr4 жыл бұрын
dreamer ❤️ thank you for the suggestion ! Appreciate it and welcome to the channel!
@yaBoyDreamer4 жыл бұрын
@@hnasr Glad to be a member of this community!
@rouabahoussama3 жыл бұрын
@Hussein Nasser I would love to know your opinion about goroutines (Golang) and erlang process
@kez994 жыл бұрын
i'm thankful to the people who suffered through callback hell
@goregeway82874 жыл бұрын
I clicked the thumb up button after I watched the whole video, and I ended up given all video I've been watched a thumb up in this channel, thank you Hussein!
@hnasr4 жыл бұрын
jiaojie wei thumbs up to you dear 👍 and much love ❤️ thanks for your comments glad you enjoyed the content
@JesusJacomeOvalle4 ай бұрын
I was very confused about asynchronous vs. multithreading, and you clarified that a lot in the first 3 minutes. Thank you!
@BangMaster963 жыл бұрын
Thanks to the geniuses who made coding so easier for us newbies in the 21st century. Imagine, having to code back in the 70's or 80's, with no software like VS Code that can color code your text, auto complete lines of code, spin up the compiler/interpreter with just a click of a button, handles the communication with the OS, does syntax error check, etc. All we have to do is just know how to and what to code.
@hellowill2 жыл бұрын
The systems we build now are much more complex 😉
@avg_user-ty2eg Жыл бұрын
@@hellowill aah yes the code monkeys making another useles webapp
@adityachaubey3893Ай бұрын
Who the hell is this guy ??? To this day, this is the best explanation I ever found.
@_0_o_9242 жыл бұрын
I don't think anybody can explain it in a more better way . Thank you
@centurion37084 жыл бұрын
I just realized you've got a ps2 on the background, so many good memories of that console
@icbm73 жыл бұрын
Great video, as usual. To summarize: if your app is "i/o bound" (e.g. reading data from a db, and sending it back) then use the asynchronous model (like NodeJS). If you are doing something "cpu bound" (e.g. video processing or cracking passwords) then use something supports subprocesses and channels (like golang).
@thatoneuser86003 жыл бұрын
What do you mean by "and sending it back"? Unlike in real life, data can be in two places at once, so there's no need to send anything back
@mustafayldrm2853 жыл бұрын
Hussein the way you express yourself echoing in my mind. I like your passion and professional attitude which are seen rarely together man. True engineer
@hnasr3 жыл бұрын
Thank you Mustafa for the kind words dear ❤️
@anzwertree2 жыл бұрын
This dude rocks. He talks in a way I can understand, and he's not boring.
@ahmeddaraz84944 жыл бұрын
multithreading languages tend to solve the problem by introducing reactive programming, Java did this after the community introduced some technologies like RxJava. and it is very power to combine both in the language echo system. however hard to perceive from the first glance. Great video buddy, all my wishes to you.. keep up bro
@hnasr4 жыл бұрын
Ahmed Daraz thanks Ahmed for the insights! Well said
@wafleez0r4 жыл бұрын
welp i just got addicted to this channel i guess
@ravisomvanshi10723 жыл бұрын
First time I felt myself laughing at a programming tutorial/explanation. Thank you for this video!
@avalon21992 жыл бұрын
Clear and concise explanation, proof that we don't need beautiful architecture drawings when concepts are clear.
@siddheshswnt3 жыл бұрын
I just can't stop watching your videos man .... Keep them coming !
@hnasr3 жыл бұрын
Thanks! Enjoy 😊
@hasanweb Жыл бұрын
The most amazing, funny, useful. programming information video without coding I have ever seen until now. Amazing brother.
@rohitbaisane67123 жыл бұрын
Does i/o controller need different thread if yes then asynchronous == mulithreading?
@MTX1699 Жыл бұрын
Have this doubt, how would you solve a sudoku using any of the techniques in the least time. Most favourable would be to use multithreading in this case. How to implement it? It is kinda a complicated problem.
@theevertaz16126 күн бұрын
Also, one of the reasons a lot of people moved to asynchronous programming is performance. Multi threading model, aka 1thread/request or thread pool model, induces a lot of context switching between threads, since everytime a thread blocks it’ll be removed and put back when the blocking operation completes. This operation has a hefty cost at scale, while with asynchronous programming you have a fixed set of threads (generally the number of threads your cpu supports) doing non blocking operations.
@AnthonyInSanDiego2 жыл бұрын
You're a really good teacher. I admire your talent sir!
@swathidesai4 жыл бұрын
I guess proxies interest you more than anything (They come up at least once in every video of yours) !!!..Btw, I am a fan, and Thank you for the great content
@leoniemargetich30623 жыл бұрын
This is hilarious! Please make a podcast - i'd love to wake up to you talking about any programming related topic haha XD
@hnasr3 жыл бұрын
❤️ anchor.fm/hnasr
@Abdullah-zc1uy4 жыл бұрын
I agree, multithreading is hard to code but it's worth doing especially if you combine it with asynchronous execution you will have the most responsive, memory-efficient application I'll go with multiprocessing only when execute a rarely use case with heavy logic
@th3h0tpegla353 жыл бұрын
I love your explanations and as someone who is trying to become a backend engineer, I think your channel is a gold mine of useful information. Keep up with awesome videos!
@joshuahampl Жыл бұрын
this is the first time I smiled the whole way through a technical video :)
@UpupaAfricana4 жыл бұрын
Your videos are super great! But I prefer the one with graphics and drawings, because I can understand and memorize better informations
@hnasr4 жыл бұрын
Lahdili Zuhir thanks! I agree with you too. I am experimenting with different formats. And i want mix both drawing and talking head 🗣👍
@livesamarth4 жыл бұрын
Yes exactly
@The8merp4 жыл бұрын
@@hnasr Even Khan Academy style drawings are good or even basic white board. I feel when things are explained with visuals and the key points are written down then it's easier to absorb the information
@KeplerEmeritus2 жыл бұрын
This was a good watch. I think I see single-threaded async behavior differently now. I am now also very interested in process interop now. Most of all, I have a weird urge to try working with multiple asynchronous single-threads at the same time.....
@yashgaur96194 жыл бұрын
Imagine him being your mentor! Freakn amazing,
@dharshan1172 жыл бұрын
Thanks Hussein for this content. Keep the good work going.....
@dexteraparicio68082 жыл бұрын
In your explanation of asynchronous non-blocking flow while waiting for an I/O response, the single-threaded flow does not wait and continues to go on. If the one and only thread did not block and it continues to go on, how is the I/O response got detected? Does it spawn another thread to detect the I/O response? Or does is the one and only thread doing context switching back and forth?
@hnasr2 жыл бұрын
A good example is nodejs, it is a single thread that does an event loop. The thread sends to IO request and moves on to do something else, then it comes back to check if it got a response (polling) the OS. It gets complicated depending on the type of async io the OS supports. Recent linux io_uring is a game changer. This video might clarify kzbin.info/www/bejne/nX7XlJuIpMl2aKs
@naimulmushfiq13902 жыл бұрын
This explanation was something else..... Thanks man!!!!!
@sjitghosh9 ай бұрын
excellent approach & good humor to explain complex topics in a simpler way.
@АртемБатьков-м6ю5 ай бұрын
In a real-life scenario, imagine working as a receptionist in a coffee shop. When working synchronously, you handle one customer at a time, and the line of waiting customers remains inactive until the previous customer receives their order. Multithreading involves teamwork, where a friend assists in taking orders by opening a second counter. However, the challenge arises as you may end up interrupting each other's work. If done effectively, productivity doubles, but without coordination, the service quality may suffer. On the other hand, asynchronous work involves taking orders continuously and serving customers as orders are ready. This method ensures smooth service flow as you can efficiently notify customers when their orders are ready while continuously serving the next customer in line.
@sajad2126 Жыл бұрын
Amazing video, finally i learned this topic.
@BrotoBhattacharjee2 ай бұрын
Can you please the same thing with diagrams or animation ?
@maedehshahabi47442 жыл бұрын
Thank you very much Hussein, that was a clear explanation.
@socksincrocks44212 жыл бұрын
Thanks Nasser. Just getting my feet wet with programming, python, turbo_flask, and threading. I appreciate your explanation.
@orion.5611 Жыл бұрын
so a process is memory allocated to the program during execution
@neuro52612 жыл бұрын
I think you can mix asynchronous and multiprocessing. I did something like that with fastapi using asynchronous functions and a Procfile with different microservices running on different ports
@christianorlandoibarragarc39042 жыл бұрын
Nice explanation man, You have 1 new subscriber 👍👍👍
@igbana_ai2 жыл бұрын
I did it.... Syntactical sugar😂😂... I love your explanation man.... We are the new generation where we don't write multithreading or async code, we IMPORT libraries to do it for us😂✌️
@ganeshniranjan895 Жыл бұрын
which one of the above is better and faster in terms of for performing operations on pandas dataframe & insert those into multiple tables of a database, can anyone please guide me on this
@osamaa.h.altameemi55924 жыл бұрын
As usual fantastic video Hussein but in multi-processing we have to go with IPCs and the like and we will lose the shared memory space (which exists in multi-threading) among the threads. That is one key need in problems that involve high real-time update-rate. I see what you are saying about the locks and all the headache that comes with them and you nailed it there.
@hnasr4 жыл бұрын
Well said Thanks Osama, good points, one slight addition; you can have shared memory between different processes (postgres is an example) of course you have the same trouble of managing the shared memory
@osamaa.h.altameemi55924 жыл бұрын
@@hnasr you got it right Mr. I usually go with Redis for more or less and have all my global "shared" variables there. If you are aware of faster alternatives, I am all in. Thx again.
@osamaa.h.altameemi55924 жыл бұрын
@@hnasr what do you think of green-threads used in Go and all the collaborative scheduling that comes with them. I am planning on taking a deep dive there once we deliver the current project.
@hnasr4 жыл бұрын
Not familiar with Go but heard really good things how Go was built for networking and threading in mind to make it really easy
@osamaa.h.altameemi55924 жыл бұрын
@@hnasr There is one fantastic talk i recall watching I guess in 2018, it is called the "way of Go" or the "why of Go", highly recommended.
@sundaramjha17764 жыл бұрын
Like to see u have very less subscriber, but still u r no bother about it.. u just share very unique knowledge on this channel. Which i have never find on other channel. Thank You, keep continue. sharing is caring.
@justme8code5 ай бұрын
It was fun learning and watching this video😆
@mariometushev4563 Жыл бұрын
Very very good explanation, congratulations!
@jrdtechnologies2 жыл бұрын
Excellant explanation, very engaging and concise!
@RobertTheUser3 жыл бұрын
So... going with your recommendation of multiprocessing... how do you accomplish that in C#? do you have a video on that?
@QVL759 ай бұрын
I love your explanations! Excellent food for thoughts.
@dopamine_Seeker2 жыл бұрын
What is difference Sync communication vs aync process
@k98killer3 жыл бұрын
As the old joke goes: A programmer has a problem. He decides to use threads. has now problem. He two
@jaswalankit54943 жыл бұрын
Well, The best explanation I see in my whole life, till today
@ahmedembaby82303 жыл бұрын
عظمة كل عام وانتم بخير يا هندسة
@tljstewart2 жыл бұрын
Loved this video, the last half of this video could definitely make a great series on ways to use multiprocessing!
@rohitsagar90113 жыл бұрын
so can we make any code asynchronus or mulithreading or it depends on the language or i did not understand whatever u said?
@mhmdshaaban3 жыл бұрын
Any recommendation for good resources about the operating systems.
@BenZekriNBENZ2 жыл бұрын
I love your videos too much! 🥰 They are so deep and teach advanced concepts instead of just showing how to write a "hello world!" In a hell language 😐 Need more ^^
@sauravdeb74123 жыл бұрын
A technical Craig Ferguson! Loved it.
@kevon217 Жыл бұрын
Great intuitive explanation !
@simplefinance51653 жыл бұрын
Love all your videos, specially about soft skills and motivation one. There are times when I get lost and watching these videos again put me on track and keep going.
@amankapoor76653 жыл бұрын
Amazing explanation. Really cleared a lot of doubts.
@ahmedghallab5342 Жыл бұрын
جزاك الله خيرا ❤️ Thanks
@寧々-m4n3 жыл бұрын
Good Explanation!Finally understand these concept quick and good.
@joepreludian Жыл бұрын
Very nice explanation! Thank you for this video!
@alainperez37784 жыл бұрын
I have to disagree about staying away from multithreading. They have their own use context, with their pros & cons of course. And so it is that they came up with worker threads in nodejs. But I liked your explanation. Really funny the js event loop part. Regards!!!!
@hnasr4 жыл бұрын
Alain Perez thanks Alain! Loved your point of view
@alainperez37784 жыл бұрын
@@hnasr I have become a huge fan of your videos 😊😊😊😊😊
@azizulhakim15342 жыл бұрын
Best explanations ever.
@raivatshah77814 жыл бұрын
Very informative and intuitive explanation! Thanks so much
@hassanhammoud7542 жыл бұрын
This is great man, I like your style of teaching! I kind of revise this topic once in a while and I'm going to bookmark this video so I revisit it later on.
@dayvidkelly76833 жыл бұрын
Good video, I've a question about processing. let's say I've a node js code that sends some processing intensive calculation to another language for example python, will it run on another thread?
@RITWIKTIWARI244 жыл бұрын
Hi Hussein, the example you gave of brute force using multiprocessing. Is it applicable for multi-threading too? I mean if thread 1 accesses from A-E from the rainbow table, thread 2 accesses from F-J and so on... This is possible I guess... and will it be still thread safe?
@hnasr4 жыл бұрын
It is applicable in multithreading yes
@RITWIKTIWARI244 жыл бұрын
@@hnasr okay thanks!
@gsb224 жыл бұрын
Every multiprocessing code can be changed to multithreading but you might not get the same benefits. So for this use case of brute force, which is CPU heavy operation, let's say you spin up 10 threads within a single process which is running on octa core computer. In that scenario, your application is using only 1/8 of your computing power and then dividing it into 10 threads amd in reality your cpu is underutilized. What you could do is spin up 8 processes and then have each process spin up few threads and in this way you get the best out of your cpu
@nishatnasir79914 жыл бұрын
Best teacher.
@pikachuverun20622 жыл бұрын
Wow, buddy, it is an amazing explanation. You are awesome!
@section99994 жыл бұрын
In Spanish we have a word for people like you... Chingon! :D
@hnasr4 жыл бұрын
DataSurgeon 369 yay I just googled it and doesn’t mean loco 😍 thanks buddy
@liquidpebbles3 жыл бұрын
Man, I love the enthusiasm you bring to the field!
@vanshthukral5477 Жыл бұрын
Thanks for creating amazing content..✨
@imbanett04 ай бұрын
Regarding the multiprocessing use case for password cracking, if that's done on a particular machine, that's pretty much another variant of bitcoin mining ASIC but with different hashing algorithm. And the machine is optimised for this parallel workload.
@FilthySnob3 жыл бұрын
Awesome video, thanks man.
@minkymoo57732 жыл бұрын
You are such an amazing teacher!!!! I actually kind of understand this now, thanks so much!😍
@Raaviolis4 жыл бұрын
Multiprocessing kind of like distributed processing yarn and zookeeper kind of application?
@hnasr4 жыл бұрын
Correct. Zookeeper helps find a master node to distribute the work.
@rohanmainali90402 жыл бұрын
Hey Hussain, Thanks for clearing all the doubts and great explanation, absolutely loved it♥️ especially the event loop 🙂
@tahirraza25903 жыл бұрын
loved the explanation - simple and concise
@faadi45362 жыл бұрын
Hey Bro. I've been following your videos to understand the basic concepts of Infrastructure and your explanation is amazing, and I have a couple of questions for you if you would like it to clarify for me. In synchronous communication, you mention that when a single process starts, it has a single thread that it uses to trigger the instructions and just wait there for the data but the same thread can be used to spin up multiple threads to execute other processes and get the results but at the backend, they use the same threaded. So it's like a highway tunnel for all other shortcuts and every thread is getting different results and passing back the result in the highway to the processes. Our main thread is not blocked as multiple results are coming back and we are executing the multiple processes over a single thread. I think it's not as evil as you think it is as it is also a form of asynchronous transmission. We are not letting our thread sit idle but rather triggering multiple processes over a single channel and waiting for the callback and the thread is busy working for other processes. Isn't this the same idea behind asynchronicity? if yes, then how we do differentiate between asynchronous and a multi-threaded process as both use the same single thread? Of-course the method is different for both but at the core, isn't both are using the same principles? I would really love your feedback over this and correct me if I am wrong about it as this is how I understood your multi-threading explanation.
@RyanFriedman368 ай бұрын
He sort of explains that the motivation for async in a language like JavaScript is to provide similar functionality to multi-threading without forcing the coder to be responsible for ensuring the resources that the multi-threaded process share are used correctly. This makes developing responsive UIs much easier as developers don't have to think about multiple threads, just the single thread and managing async calls. I think there are some helpful illustrations in this video kzbin.info/www/bejne/pZ28lZVmecl6qq8&pp=gAQBiAQB If you read through the comments there's a great explanation on multiple threads trying to access the same memory that is allocated to the parent process. It essentially says that a process is allocated a set amount of memory (in simple terms basically think of it as an array). If multiple threads happen to try to write data to the same index in that 'array' of memory (because the programmer was not clever enough to avoid this) you now have unpredictable/unsafe behavior for the rest of the execution of the process because one thread is expecting one value and the other is expecting a different value. There are certainly other real-world use cases for multi-threaded applications, they seem to be related to much lower-level programming (lower meaning closer to the hardware)
@adityanagesh49224 жыл бұрын
Great content! However, not sure if we could say event loop > multi threading. Is it possible to have the performance advantage of multi threading (parallel processing) in event loop based approach? Golang is known for its multi threading.
@RationalDissonances3 жыл бұрын
I think with Nodejs clustering you could achieve this. run an event loop on each thread of the CPU as a child node
@contriveai87443 жыл бұрын
Do you know any Udemy Courses(or any Coursera, EDx) which we can take to get better on this?
@bhavyaagrawal40504 жыл бұрын
Very good explanation.. Don't know why so less thumbs-up
@samyomar33134 жыл бұрын
How can single threaded apps handle high load traffic?
@girishfury263011 ай бұрын
smooth explanation .. 5 star
@AdetunjiSundayAwobajo2 жыл бұрын
Java handles multithreading perfectly well, synchronized keywords ensure no 2 thread has access to a method executing a code whilst still in the execution state until the current thread releases the lock. It also avoids deadlocks due to its synchronized nature. I don't know how to implement this in NodeJS.
@satyajitkamble16464 жыл бұрын
Hi Hussein, can you make a video on delete/put API endpoint design? For ex: If I am designing an API endpoint to add a user review...what endpoint should I hit? Would it be better for a put request to "/reviews/:reviewid" or would it be better to do a put request to "/users/:userid/reviews/:reviewid...what would be the pros and cons of both these design decisions?
@hnasr4 жыл бұрын
Hey Satuajit good question! Since you are building a REST api you post to a resource. i would imagine GET /users/1/reviews will give you reviews for user 1. If you PUT /users/1/reviews that will create a new review entry for user 1. This way the same URL is shared for Read and write There is no best practice as far as I know except ease of documentation ..
@SivaKumar894 жыл бұрын
Your asking about the difference between having a resource as a collection and having it as a sub-collection in another resource.it depends on your domain and access pattern. Consider if you want to fetch all reviews when you fetch the user as well. Do you want reviews to exist in their own right? If so, then you'd be better off adding them as a separate collection.
@hnasr4 жыл бұрын
Excellent point Siva! I didn’t pay attention to the group. For sure it matter and could yield significant performance picking one over the other...
@mzgz42163 жыл бұрын
Are you related to Jeff Goldblum ? Cause i see a tech version of him :D Awesome explanation by the way
@evans82454 жыл бұрын
Have you checked out multi-threading with rust-lang ? What do you think about it ?
@hnasr4 жыл бұрын
DELT no I haven’t, but I read that it’s abstracted in a simple way and developer friendly.
@evans82454 жыл бұрын
Not gonna lie tho, you made me learn something new with this video, gonna make an informed decision next when I'm building an api
@hnasr4 жыл бұрын
Enjoy! Keep building cool software
@rodrigolabrador27454 жыл бұрын
Hahaha the asynchronous unordered list on the 15 first seconds, nice touch 😂
@upendrad6081 Жыл бұрын
Use mixing of Multiprocessing and Async. It will be useful
@mohitdahiya31023 жыл бұрын
Nice explanation !!
@boredsherbet3 ай бұрын
this dude is hot and he makes sense. ok. his channel also has a bunch of solid videos. im rollin with him. will watch every single video in the coming weeks. good stuff.