Structured Concurrency in Java: The What & Why • Balkrishna Rawool • GOTO 2023

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

GOTO Conferences

GOTO Conferences

Күн бұрын

This presentation was recorded at GOTO Amsterdam 2023. #GOTOcon #GOTOams
gotoams.nl
Balkrishna Rawool - IT Chapter Lead at ING
RESOURCES
/ balarawool
github.com/balkrishnarawool
/ balkrishnarawool
ABSTRACT
This talk introduces Virtual Threads and Structured Concurrency and explains their benefits and shortcomings. It compares Structured Concurrency API with CompletableFuture API by live coding multiple examples with both of these APIs.
Virtual threads are lightweight user threads, enabling Java applications to produce thousands (or even millions) of threads. Also, they are super-efficient as they don't block their 'carrier' threads. These two characteristics of virtual threads let application developers focus on business requirements rather than managing platform threads (for example, with thread-pools etc.) which enables Structured Concurrency.
With structured concurrency, we can let each business-task be executed by a separate virtual thread and structure these virtual threads in any logical way that we want. It provides us with control structures for managing our virtual threads and simplifies applications that use concurrency.
A big part of the talk is live coding where multiple examples are first implemented with CompletableFuture and then with Structured Concurrency API. For each example, these two implementations are then compared. These examples highlight that CompletableFuture’s reactive-like API relies on callbacks whereas Structured Concurrency puts forward an imperative-like API which is easier to read and reason.
All in all, this talk introduces virtual threads and structured concurrency to the audience and explains why one should seriously consider using it. [...]
TIMECODES
00:00 Intro
00:27 Project Loom
01:55 How to create virtual threads?
03:53 Demo
06:55 Virtual Threads continued
08:28 Demo
09:07 Virtual Threads continued
10:53 Structured Concurrency
14:42 CompletableFuture API vs Structured Concurrency API
15:09 Demo
38:55 Shutdown policies
40:43 Outro
Download slides and read the full abstract here:
gotoams.nl/2023/sessions/2770
RECOMMENDED BOOKS
Jeff Scott Brown & Graeme Rocher • The Definitive Guide to Grails 2 • amzn.to/3DdcugY
Todd Raymond Sharp • Introducing Micronaut • amzn.to/3pFvt0v
Sanjay Patni • Pro RESTful APIs with Micronaut • amzn.to/43qekpp
Nirmal Singh & Zack Dawood • Building Microservices with Micronaut • amzn.to/43mKfH5
/ gotocon
/ goto-
/ gotoconferences
#Java #Java21 #Concurrency #StructuredConcurrency #VirtualThreads #API #ProjectLoom #PlatformThreads #CompletableFuture #ING #Pinning #BalkrishnaRawool
Looking for a unique learning experience?
Attend the next GOTO conference near you! Get your ticket at gotopia.tech
Sign up for updates and specials at gotopia.tech/newsletter
SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
kzbin.info...

Пікірлер: 7
@sumithksheerasagar2295
@sumithksheerasagar2295 4 ай бұрын
Excellent explained neatly on live coding. Appreciated and fluent hands-on work
@hiteshbitscs
@hiteshbitscs 8 ай бұрын
very nice hands on session. I liked GoTo
@FABGIO1
@FABGIO1 5 ай бұрын
A master peace❤ on Structured concurrency!
@FABGIO1
@FABGIO1 5 ай бұрын
I actually migrated a CompletableFuture Json deserialization http response method to StructuredTaskScope
@user-dn8nm9ie2y
@user-dn8nm9ie2y 9 ай бұрын
Well done and demonstrated !
@shannonantony
@shannonantony 9 ай бұрын
Very nice !!!
Programming's Greatest Mistakes • Mark Rendle • GOTO 2023
51:24
GOTO Conferences
Рет қаралды 78 М.
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 518 М.
1 класс vs 11 класс (неаккуратность)
01:00
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 27 МЛН
Эффект Карбонаро и бесконечное пиво
01:00
История одного вокалиста
Рет қаралды 6 МЛН
Java 21… and Beyond
48:30
Java
Рет қаралды 22 М.
The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019
42:03
GOTO Conferences
Рет қаралды 332 М.
Virtual Threads and Structured Concurrency in Java 21 With Loom
1:14:41
IntelliJ IDEA, a JetBrains IDE
Рет қаралды 28 М.
Calling Functions Across Languages • Richard Feldman • GOTO 2023
48:35
Back to Basics: C++ Concurrency - David Olsen - CppCon 2023
1:00:58
Coroutines and Loom behind the scenes by Roman Elizarov
45:22
Kotlin by JetBrains
Рет қаралды 29 М.
cool watercooled mobile phone radiator #tech #cooler #ytfeed
0:14
Stark Edition
Рет қаралды 8 МЛН
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
superfirsthero
Рет қаралды 1,3 МЛН
#miniphone
0:16
Miniphone
Рет қаралды 1,9 МЛН