I was the one asking for this video, you have no idea how much I appreciate you right now. Your videos are some of the best out there when it comes to Java. I am sending your videos to everyone in my college.
Maybe you already have one but perhaps you could do a video on IO? I found it hard to figure out what's a buffered reader, why we insert another file reader inside, what's an output stream etc etc. Also, let's say I wanna learn a new api and it's structure. How would you do it ?
I did a high level video on file IO here a little while back: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Ldx3NdGk86o.html I don't go into a lot of detail on that video, but hopefully that touches on some of your questions. Learning a new API can be fun or frustrating depending on the documentation and examples available. I usually try to approach the API with a high level picture in mind of what its intended to do, and then I find the simplest example that accomplishes that. After I start learning the API's jargon, I'll play around with it some more and make sure I understand it, sometimes peaking at the source code if its available. In my experience following an example without context isn't super helpful, nor is diving head first into the documentation without looking at the bigger picture from time to time.
This was an amazing walk through. Network programming in general is super interesting. I would really appreciate it if you cover the NIO way of socket programming.
Hello, I'm watching your video in Korea :) But if you don't use NIO-socket for reading or writing, then isn't it essentially the same as using multi-platform threads? I'm a bit confused. Thank you for your nice video!
Thanks for the question! If the server has to spin off a thread per request (or thread per client), then you have two main options: 1. Platform threads (the original way) 2. Virtual threads In Java 21 and later, most of the time you'll want do option 2 due to how virtual threads are implemented. Most of the time you'll get a perceived performance boost because the JVM is more efficiently utilizing CPU resources across threads.
Yes, Tomcat is adding support for these! I haven't personally tried it, but the docs seem to indicate that virtual thread executors are avilable in Tomcat 11 at least, and there might be some support in Tomcat 10.
Personal preference I suppose 🙂 I know folks who use it every chance they get and others that wish it was never added to the language. What are your thoughts on it? I agree with a lot of what is stated here: openjdk.org/projects/amber/guides/lvti-style-guide