Java Virtual Threads

  Рет қаралды 20,927

Java

Java

Күн бұрын

Concurrent applications, those serving multiple independent application actions simultaneously, are the bread and butter of Java server-side programming. The thread has been Java’s primary unit of concurrency since its inception and is core to the entire Java platform. However, it can no longer efficiently represent a domain unit of concurrency. As a result, Java has seen a proliferation of libraries and frameworks that offer scalability while abandoning the thread as the unit of software concurrency-and, with it, the support of Java’s observability tooling. In this session, learn how Project Loom aims to reinstate the thread as an efficient unit of concurrency by adding a lightweight implementation of threads to the Java platform.
An Oracle DevLive Level Up - Java Developer Day session.
Presented by Sergey Kuksenko, Principal Member of Technical Staff
More info ➱ inside.java/ta...
More Level Up videos ➱ • Oracle DevLive Level U...
Tags: #Java #OpenJDK #JDK20 #concurrency

Пікірлер: 12
@kevindurant4952
@kevindurant4952 Жыл бұрын
01:10 Now it's possible to have millions of Java processes running concurrently. 04:28 Traditional threads are expensive, the solution could be asynchronous programming, but asynchronous programming has very intrusive downsides. 06:35 Project Loom tries to make Threads cheaper. 06:38 What is a Virtual Thread? Conclusion: they feel like normal Threads, it allows you not to care about the details underneath. 07:38 We call traditional Threads, Platform Threads. 08:39 Virtual Thread builder example and newVirtualThreadPerTaskExecutor() example. 09:26 Virtual Threads x Platform Threads x Sequential Benchmark. 12:15 Real Application Benchmark data. The higher the bar, the better the framework scores. 15:35 Little's Law, it works for stable systems, not for systems which continually grow. An example on how Thread-per-Request was their bottleneck in an application. 18:26 Little's Law Chart, Platform Threads x Virtual Threads throughput. 19:39 How to adopt Virtual Threads. Write synchronous code inside the task, as boring and as straightforward possible. 21:02 You should NOT pool Virtual Threads. If you need to pool, or rather limit async execution, use the Semaphore class. 22:10 Don't cache in ThreadLocals. Instead use Scoped Values. 24:10 Avoid pinning. 28:24 (end) How to adopt Virtual Threads frame. 28:54 Structured Concurrency, short intro. For Spring enthusiasts, an interesting blog post: spring.io/blog/2022/10/11/embracing-virtual-threads. This post shows how you can change the Thread-per-Request executor to a newVirtualThreadPerTaskExecutor.
@tanveerhasan2382
@tanveerhasan2382 Жыл бұрын
Bless your heart
@sergeyshcherbakov3653
@sergeyshcherbakov3653 Жыл бұрын
Молодец, Серёга, хорошо объяснил !
@oneextrabit
@oneextrabit Жыл бұрын
Very informative and detailed! This talk can serve as a good summary as to why/when you should use VT.
@prunge
@prunge Жыл бұрын
Will be great when we can write performant concurrent code with this. Had to debug some Spring Webflux / Reactive stuff lately and it was not easy.
@CarlosSaltos
@CarlosSaltos Жыл бұрын
Cool T-shirt !! ... Cool talk !! 👍😎
@juliandurchholz
@juliandurchholz Жыл бұрын
Will you introduce API to offer control over which executor a virtual thread should run on?
@FurkanAliUnal
@FurkanAliUnal Жыл бұрын
Thank you for informative videos
@srinutippana
@srinutippana Жыл бұрын
Very informative
@jackgame8841
@jackgame8841 Жыл бұрын
really good talk
@dumdumdumdum8804
@dumdumdumdum8804 Жыл бұрын
Another language mojo is coming in the AI machine learning space, valhalla should come early or some struct like construct along with vector APIs otherwise java could never take off for AI/Machine learning space.
@fertiz_
@fertiz_ Жыл бұрын
hello
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 730 М.
Java 21 new feature: Virtual Threads #RoadTo21
33:35
Java
Рет қаралды 71 М.
Spring Tips: Virtual Threads
50:31
SpringDeveloper
Рет қаралды 16 М.
Serialization - A New Hope
50:53
Java
Рет қаралды 15 М.
Evolution of software architecture with the co-creator of UML (Grady Booch)
1:30:43
The Pragmatic Engineer
Рет қаралды 101 М.
Valhalla - Java's Epic Refactor
52:07
Java
Рет қаралды 80 М.
Java Virtual Threads - Reactive Programming Killer?
13:57
Viraj Shetty
Рет қаралды 22 М.