Structured Concurrency in Java: The What & Why • Balkrishna Rawool • GOTO 2023
GOTO Conferences
@goto-About
GOTO gathers the brightest minds in the software community to help developers tackle projects today, plan for tomorrow and create a better future. Learn from thought leaders and innovators with top-rated videos released daily, and at our year-round conferences, masterclasses and meetups. GOTO offers attractive sponsorship opportunities for partner companies. Reach out for limited offerings: [email protected] GOTO YouTube Channel Code of Conduct: https://blog.gotocon.com/yt-coc
Video Description
This presentation was recorded at GOTO Amsterdam 2023. #GOTOcon #GOTOams https://gotoams.nl Balkrishna Rawool - IT Chapter Lead at ING RESOURCES https://twitter.com/BalaRawool https://github.com/balkrishnarawool https://www.linkedin.com/in/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: https://gotoams.nl/2023/sessions/2770 RECOMMENDED BOOKS Jeff Scott Brown & Graeme Rocher • The Definitive Guide to Grails 2 • https://amzn.to/3DdcugY Todd Raymond Sharp • Introducing Micronaut • https://amzn.to/3pFvt0v Sanjay Patni • Pro RESTful APIs with Micronaut • https://amzn.to/43qekpp Nirmal Singh & Zack Dawood • Building Microservices with Micronaut • https://amzn.to/43mKfH5 https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.facebook.com/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 https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1
Java Developer's Must-Haves
AI-recommended products based on this video

LEGO Speed Champions Oracle Red Bull Racing RB20 F1 Race Car Model Kits - Building Set for Adults, Ages 18+ with Realistic Features - Red Bull F1 DIY Crafts for Display - Gift Idea for F1 Fans - 77243

Magnetic Nasal Strips Starter Kit: Comfortable Nasal Breathing Support for Sleep, Helps Reduce Snoring Noise, Includes 60 Tabs (30 Uses) with 4 Sizes

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men

eufy Security, eufyCam S220 (eufyCam 2C Pro) 2-Cam Kit, Wireless Home Security Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67, Night Vision, Motion Only Alert, No Monthly Fee

Cleaner Kit for Airpods Pro 1 2 3 Multi-Function Cleaning Pen with Soft Brush Flocking Sponge for Bluetooth Earphones Case Cleaning Tools White

Whitebite Pro Upgraded Teeth Whitening Kit with Pens for Sensitive Teeth: Teeth Whitening LED Light, Mouth Tray, Carbamide Peroxide Whitening Gel

Whitebite Pro Professional Teeth Whitening Kit for Sensitive Teeth | LED Light Accelerator | 4 Whitening Gels (35% Carbamide Peroxide) & 2 Remineralizing Gels | Professional Dental-Grade | Enamel Safe

Easter Gifts For Kids: Easter I Spy Search & Find for Kids Ages 3-7: Cute Spring Puzzles, Hidden Objects and Brain Games – Screen-Free Fun, Easter Basket Stuffers and Family Activities

Lindt Fun Friends Easter Milk Chocolates, 100-Gram Bag, Perfect for Easter Gift for Kids & Egg Hunts

It's Not Easy Being a Bunny: An Early Reader Book for Kids

Little Blue Truck's Springtime: An Easter And Springtime Book For Kids – An Interactive Adventure with Baby Animals

135W USB C AC Adapter Charger for Lenovo ThinkPad Z16 P16s P15s P14s E16 E15 E14 T16 Yoga/Slim Pro 9 7 6 7i 9i Book 9 ThinkBook 16 14p 14 15 14s IdeaPad Slim/Pro 9 7 5 Legion 9 Laptop ADL135YSDC3A




















