Spring Boot 3.2 With Virtual Threads Explained | Benchmarking Insights | JavaTechie

  Рет қаралды 24,175

Java Techie

Java Techie

Күн бұрын

#JavaTechie #SpringBoot #VirtualThread #BenchMarking
👉 In this video, we dive into Spring Boot virtual threads and how they can supercharge your application's performance.
🌐 What You'll Learn:
🔄 Understanding the basics of virtual threads in Spring Boot.
⚡ How virtual threads differ from traditional threads and the benefits they bring.
🚦 Benchmarking of platform and virtual thread performance
🕵️‍♂️ Tips and best practices for leveraging virtual threads in your Spring Boot projects.
Virtual thread :
• JDK 19 | Java Virtual ...
Jmeter performance & Load Testing :
• JMeter API Testing | S...
Spring boot microservice Premium course lunched with 70% off 🚀 🚀
Hurry-up & Register today itself!
COURSE LINK : javatechie5246.ongraphy.com/
PROMO CODE : JAVATECHIE50
OR use Javatechie APP
Download the JavaTechie app on your iOS or Android device from the App Store or Google Play Store.
Find the links below :
Android 🌐 :
play.google.com/store/apps/de...
IOS 🌐 :
apps.apple.com/in/app/javatec...
GitHub:
github.com/Java-Techie-jt/spr...
Blogs:
/ javatechie4u
Facebook:
/ javatechie
Join this channel to get access to perks:
kzfaq.infojoin
🔔 Guys, if you like this video, please do subscribe now and press the bell icon to not miss any update from Java Techie.
Disclaimer/Policy:
📄 Note: All uploaded content in this channel is mine and it's not copied from any community, you are free to use source code from the above-mentioned GitHub account.

Пікірлер: 41
@huseyinaydin1002
@huseyinaydin1002 6 ай бұрын
I love Java Techie.
@rishiraj2548
@rishiraj2548 6 ай бұрын
Great thanks!
@Deepakblg97
@Deepakblg97 6 ай бұрын
Thank you so much sir ❤
@chiranjevig4280
@chiranjevig4280 6 ай бұрын
Congratulations Sir....
@arpitasati8557
@arpitasati8557 6 ай бұрын
Number of concurrent thread execution depends on the processor virtual cores.. 8 vcore CPU can run 8 thread concurrently.. I may be mistaken but this is what my understanding is.
@Javatechie
@Javatechie 6 ай бұрын
Absolutely correct 👍
@kauegatto
@kauegatto 3 ай бұрын
You're correct, even if we're talking about virtual threads, when they're running, there's a real platform thread executing those instructions, then, if we find a blocking instruction, the virtual thread context is sent to our primary memory and another green thread starts to run on the platform thread, however, only 8 green threads will be executed at the same time.
@CodeMyth
@CodeMyth 6 ай бұрын
Congratulations for 150k subscriber. 🎇🎇💥
@psudhakarreddy6548
@psudhakarreddy6548 6 ай бұрын
🎉 thank you 🙏
@anwarshaik8578
@anwarshaik8578 6 ай бұрын
Awesome sir❤
@ishantbhatia3194
@ishantbhatia3194 6 ай бұрын
My fab topic
@prashlovessamosa
@prashlovessamosa 6 ай бұрын
Thank you.
@gopisambasivarao5282
@gopisambasivarao5282 6 ай бұрын
Thanks Basant, Appreciate your efforts. Nicely explained Java 21 feature on Virtural thread. 🙏👍🙂End of the session the question you asked " Can we run 100 threads on our machine concurrently, Is it possible?" Answer I thought : "Running 100 parallel threads on a quad core processor is technically possible, but it may not be efficient. A quad core processor can handle up to four threads simultaneously, so running 100 parallel threads could lead to significant overhead and decreased performance due to frequent context switching.....On a single-core CPU, you're only ever going to have one thread running at a time, but on a multi-core CPU, it's possible to run more than one thread simultaneously...
@Javatechie
@Javatechie 6 ай бұрын
Thanks for your words brother. The answer to my question is straight forward it depends on the core of the machine if it's 20 then 20 threads will run concurrently
@vishaldeshmukh4459
@vishaldeshmukh4459 6 ай бұрын
If we have async task like auditing then how to do this with virtual threads? Previously we were using @async annotation with ThreadPoolTaskExecutor
@kenneth_jensen
@kenneth_jensen 6 ай бұрын
I guess it depends on your implementation 🙂
@PracticeTech-rg7yh
@PracticeTech-rg7yh 6 ай бұрын
Can this be used in production development. Does using virtual threads optimize the perfromance of the app vs using the platform thread?
@norulshahlamjohn1140
@norulshahlamjohn1140 4 ай бұрын
yes of course but performance testing must be done pre prod to see the difference first. not all use case works for virtual thread
@naresh_k_005
@naresh_k_005 6 ай бұрын
Hi Bro I have one doubt relating to Jwt Token in realtime for every rest endpoint like login ,forgotpassword,resetpassword ,we have to generate token or just for login only it is basic doubt i have
@Javatechie
@Javatechie 6 ай бұрын
Generate for login and use that for password but forgot password you can bypass it
@sairammanchala40
@sairammanchala40 6 ай бұрын
Can you do it with spring reactive web flux as well.
@Javatechie
@Javatechie 6 ай бұрын
Yes 👍
@kamalhm-dev
@kamalhm-dev 6 ай бұрын
i got your question, but i think its worded wrongly? it should be parallel thread execution
@Javatechie
@Javatechie 6 ай бұрын
Which one buddy didn't get you
@andriibakhtiozin4477
@andriibakhtiozin4477 6 ай бұрын
Wondering does such test makes any sense? U are running jmeter on the same machine u run ur application. So jmeter utilities same resources that ur app
@Javatechie
@Javatechie 6 ай бұрын
Yes but what's the problem? You want me to use a different server for jmeter for testing? How that make sense
@andriibakhtiozin4477
@andriibakhtiozin4477 6 ай бұрын
@@Javatechie I mean that usually perf results especially with load won't be very representative if jmeter fights with spring boot app for resources as u running them on one machine that shares the same CPU. U could spend some time writing a script to deploy for example app in cloud or on ur second laptop in ur network and run jmeter tests from ur local machine. In this case app will have their pool of resources completely separated from load generator resources.
@SmurahaLurk
@SmurahaLurk 6 ай бұрын
The default thread size is 200 for Tomcat if you use standard threads. So, you didn't reach 400 in the last test.
@Javatechie
@Javatechie 6 ай бұрын
Yes but the thread will reuse right? Once one thread is free he can pick up the task
@SmurahaLurk
@SmurahaLurk 6 ай бұрын
@@Javatechie right. But if you increased it to 400, the result might be better for platform threads. At least, it would be fair.
@Javatechie
@Javatechie 6 ай бұрын
I believe you didn’t get what is virtual thread and it’s importance could you please check my previous video about virtual threads
@sadiulhakim7814
@sadiulhakim7814 Ай бұрын
Ok understood. Now question is, can i just use Virtual Thread? Is there any case where i cannot (should not) use Virtual Threads?
@balajaysan
@balajaysan 5 күн бұрын
Hi, this reply may be a bit late the author has video on virtual threads. As per my understanding, there are multiple kinds of workloads. CPU based, I/O based (Network, File system read right), memory intensive. Virtual threads are mapped to platform threads which are wrapped to OS threads and ultimately to number of available CPU by OS scheduler. Virtual threads you can consider as tasks. if our application has a lot of I/O based operation like File Upload, Download, calling web service, Database operations then they are useful. because when these i/o operation occurs the platform threads will be released and can serve other requests. Also virtual threads by default support non blocking Java I/o APIs instead of standard blocking APIs to read network and File operations. This is provided by JVM itself. If your application is more cpu based like service has image processing logic, data science related.calculations, encryption and decryption or data algorithms then virtual threads are less useful since the career thread (platform thread) will be blocked for CPU operation so we can directly use platform threads. How career threads are mounted and unmounted using a feature called continuation scope which you can search for JVM documentation. Hope it helps.
@sadiulhakim7814
@sadiulhakim7814 5 күн бұрын
@@balajaysan Thanks. It surely helps.
@itsnarahari
@itsnarahari 6 ай бұрын
If you create 100 threads at a time it won't run 100 threads at a time the Java threads use of OS Threads here the example 1 platfoem Thread = 1 OS Thread If your cpu cores are 8 then the 8 threads it will run at a time remaining will wait for lock release and continue the others
@Javatechie
@Javatechie 6 ай бұрын
Absolutely correct buddy
@huseyinaydin1002
@huseyinaydin1002 6 ай бұрын
I couldn't understand the video because my English is poor. Someone please explain it to me. What is the difference between Virtual Threads and Platform Threads? What is Virtual Thread? What is Platform Thread?
@Javatechie
@Javatechie 6 ай бұрын
Hello buddy please checkout the video below 👇 👇 kzfaq.info/get/bejne/sJdnhMacqMCalnU.html
@nijatSh
@nijatSh 6 ай бұрын
Your english is maybe poor, but this video is not understandable as this guy's accent very bad, i am sorry for that but i have to say it
@denizozen2150
@denizozen2150 6 ай бұрын
Bro all is fine but the accent is heavy
@blastys
@blastys 6 ай бұрын
Lmao he cant change that 🤣
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 16 МЛН
Handle 1,000,000 Threads with Java and Spring Boot !!!
21:50
Daily Code Buffer
Рет қаралды 20 М.
Java 21 new feature: Virtual Threads #RoadTo21
33:35
Java
Рет қаралды 58 М.
4 Spring Boot Mistakes to AVOID in 2024
15:18
Java Brains
Рет қаралды 55 М.
Spring Tips: Virtual Threads
50:31
SpringDeveloper
Рет қаралды 11 М.
Virtual Threads in Java 21
17:22
Will Tollefson
Рет қаралды 3,4 М.
Asynchronous Programming in Java using Virtual Threads, Venkat Subramaniam
49:16
Bulgarian Java User Group
Рет қаралды 10 М.
Java Virtual Threads - Reactive Programming Killer?
13:57
Viraj Shetty
Рет қаралды 15 М.
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 23 МЛН
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 769 М.
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 467 М.
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
Вэйми
Рет қаралды 1,1 МЛН
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 7 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,7 МЛН