Very interesting sample of Virtual threads. How does this integrate when youre building an application with a framework? Dont the framework handle the creation of threads?
Yes, a good question. Short answer is that yes, typically that's what happens, and typical software project inside any web framework pretty much ignores you needing to tap into parallelism - you just think about it when accessing background resources. But two reasons to still keep up with Java parallelism features: 1) Well sometimes you do build something from scratch, that would mainly happen if you want to do some intensive calculations without web servers, or if you are building a server. 2) Virtual Threads are currently finding their way into popular servers and frameworks, so mostly you can just enjoy the benefits, but it's at least good to get the idea why they may bring more performance when your favorite framework start using them. So mostly I think this is the message that Java platform is still very much alive and kicking, and still getting better. Spring Framework is already embracing them, for example: spring.io/blog/2022/10/11/embracing-virtual-threads Might be a fun topic for a future video.
okay great. Maybe you might consider making a video in the future for this question or you could please share your ideas here. I'm a bit confused if Virtual Threads are going to replace Reactive Programming. If they would, why? and if they won't, why?@@DevXplaining
Very interesting sample of Virtual threads. How does this integrate when youre building an application with a framework? Dont the framework handle the creation of threads?
Yes, a good question. Short answer is that yes, typically that's what happens, and typical software project inside any web framework pretty much ignores you needing to tap into parallelism - you just think about it when accessing background resources.
But two reasons to still keep up with Java parallelism features:
1) Well sometimes you do build something from scratch, that would mainly happen if you want to do some intensive calculations without web servers, or if you are building a server.
2) Virtual Threads are currently finding their way into popular servers and frameworks, so mostly you can just enjoy the benefits, but it's at least good to get the idea why they may bring more performance when your favorite framework start using them.
So mostly I think this is the message that Java platform is still very much alive and kicking, and still getting better.
Spring Framework is already embracing them, for example: spring.io/blog/2022/10/11/embracing-virtual-threads
Might be a fun topic for a future video.
okay great. Maybe you might consider making a video in the future for this question or you could please share your ideas here. I'm a bit confused if Virtual Threads are going to replace Reactive Programming. If they would, why? and if they won't, why?@@DevXplaining