SlideShare a Scribd company logo
How Java 19 Influences The
Future Of Your High-Scale
Applications
Java Champion Alumni, Certified Architect
Senior Developer Advocate
Passionate about solving complex scenarios involving Java and
Kubernetes.
@ammbra1508.mastodon.social
Any Change Starts with
Why
Why is Scalability Important?
Can cause service
disruptions that drive end users
away.
Impacts a business’s ability to
meet demands that
continuously change.
Reduces IT costs when demand
is less, and the system(s)
should downscale.
Types of Scalability
Vertical Scaling
Increase
RAM/CPU
Increase the number of machines
Horizontal Scaling
How Application Scalability
Matters
Application Scalability
An application's ability to handle a
growing number of users and load.
Not compromising on performance
or causing disruptions to user
experience when demand increases.
Measured by the number of requests
it can effectively support
simultaneously.
Scaling Through Elastic Adjustments
A combination of improvements to
network bandwidth, CPU and
memory requirements, and hard
disk adjustments.
Application needs to be correctly
configured, align the right software
protocols and hardware to meet
increasing number of requests per
seconds.
Write Once, Run Anywhere
A Partial History Of Running Anywhere
During the 1970s, computer science
focused on increasing the complexity of
computer architectures.
Semiconductor technology favoured a
type of computer architecture capable to
of complex instruction set computers
(CISCs).
From CISC to RISC
C. David Patterson and Carlo Sequin from
the University of California at Berkeley
thought that by simplifying the processor
a better performance can be achieved at a
much lower cost.
This hypothesis translated into RISC,
reduced instruction set computer.
Key Features of RISC-V
Simple
instruction set
Modularity Extensibility Open
Standard
Load-store
architecture
*At the moment, RISC-V still has limited hardware support.
The port will support the HotSpot subsystems
The template
interpreter
The C1 (client)
JIT compiler
The C2 (server)
JIT compiler
All current
mainline GCs,
including ZGC
and Shenandoah.
JEP 422 focuses on integration of the
Linux/RISC-V port into the JDK main-line
repository.
From ISA To SIMD
RISC-V is a free and open-
source RISC instruction set
architecture (ISA)
CPU architectures include
extensions to their instructions
sets that allow applying a
single instruction to multiple
data items simultaneously
(SIMD).
Heterogeneous ISAs offer
clock speed/parallelism
tradeoffs for workloads with
frequent usage of SIMD
instructions.
Portable Java ~ Efficient Java
Coding Style of Choice
Synchronous Asynchronous
Continuations
Scheduler
Thread
Platform Threads and Scaling
Platform threads take up
considerable memory to exist.
When you have lots of
blocking I/O, threads are just
waiting for data, and the CPU
is not utilized to its full
capacity.
Context switch for platform
threads is costly in terms of
resources.
Reactive Programming To The Rescue?!
Offers non-blocking I/O by letting a running thread
make a blocking call.
Analysing the performance and costs of reactive programming libraries in Java focuses on
RxJava, Project Reactor, SmallRye Mutiny.
Reactive Programming To The Rescue?!
Offers non-blocking I/O by letting a
running thread make a blocking call.
Executes the rest of the program without
waiting for data from storage or the
network.
Reactive Programming To The Rescue?!
Offers non-blocking
I/O by letting a
running thread make a
blocking call.
Executes the rest of
the program without
waiting for data from
storage or the
network.
It keeps an event loop that
continuously checks whether the
socket received data.
Reactive Programming To The Rescue?!
Offers non-
blocking I/O by
letting a running
thread make a
blocking call.
Executes the rest of
the program
without waiting for
data from storage
or the network.
It keeps an event loop that
continuously checks whether the
socket received data.
Once data is received it will be
processed by another thread, so the
running thread does not get blocked.
Virtual Threads To The Rescue
A thread managed
by JVM scheduler
can get a task
assigned by you.
Java scheduler
assigns the virtual
thread to platform
thread(s).
Virtual thread asks platform
thread(s) to perform the task.
If a virtual thread has some blocking
I/O operation, it will be detached from
the platform thread.
Another virtual thread is assigned to the
platform thread so that the platform thread
stays in a running state
JEP 425 Virtual Threads (Preview)
Readable Code with Virtual Threads
Create one new virtual thread per task
Explicitly start a virtual thread
Maintainable Code with Virtual Threads
Explicitly start a virtual thread
Execute 1000 tasks
Maintainable Code with Virtual Threads
Create one new virtual thread per task
Unblocking Virtual Threads
sun.nio.ch.Poller thread
creates a map between the blocked
virtual thread and its corresponding
socket where data will be received.
Poller thread is a continuous
event loop that checks whether
the socket mapped to a
particular thread received data
or not.
java.internal.vm.Continuation
is a public low-level API that is used
in virtual threads, it can yield and
continue whenever required.
Herding Virtual Threads
JEP 428 Structured Concurrency (Incubator)
Herding Virtual Threads
JEP 428 Structured Concurrency (Incubator)
Herding Virtual Threads
JEP 428 Structured Concurrency (Incubator)
Benefits for High Scaling Applications
Higher throughput when having high
number concurrent requests, with fewer
CPU operations and threads spending
significant time waiting.
When having blocking calls, you can
scale well because virtual threads will go
in a waiting state until they receive data
while platform threads will continuously
use the CPU.
Cloud Native Java software is highly
distributed, evolves with the language, tools
and frameworks, and operates in a constantly
changing environment.
Faster, Safer, Easier Java-to-
Native Integration
JNI
From Unsafe To Proper Handling
Create an object without
running its constructor
Directly access hardware
features or the CPU
Manually manage off-heap
memory
Foreign Function & Memory API
Get lookup object for string library
Get method handler for strlen
Convert string to store it in
the off-heap memory
Invoke foreign function
JExtract From Native C Headers
export C_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs
jextract --source --output src -t org.unix -I $C_INCLUDE_PATH $C_INCLUDE_PATH/string.h
java --enable-preview --enable-native-access=ALL-UNNAMED --source FFMBenchmark.java
Sustainable Design Impacts
Scalability
(Nested) Record Patterns
Java 16 style for Record Pattern
Java 19 style for Record Pattern
Pattern Matching For Switch
Java 17 (first preview) style
Java 19 (Third Preview) style
newHashMap()to Create Preallocated
HashMaps
Deprecation Of Locale Class Constructors
Before Java 19
After Java 19
Decommissioned Methods In ThreadGroup
• ThreadGroup.destroy()- invocations of this method will be ignored.
• ThreadGroup.getDaemon() – returns the value of the unused daemon flags
• ThreadGroup.isDestroyed() – always returns false.
• ThreadGroup.setDaemon() – sets the daemon flag without any effect.
• ThreadGroup.resume(), ThreadGroup.suspend(), ThreadGroup.stop throw
an UnsupportedOperationException.
It’s That Time(zone) Of The Year
• Chile's DST is delayed by a week in September 2022.
• Iran no longer observes DST after 2022.
• Rename Europe/Kiev to Europe/Kyiv.
• Finish moving duplicate-since-1970 zones to ‘backzone’.
source:
Thank YOU!
Additional Resources
• Java19 All Release Notes: https://www.oracle.com/java/technologies/javase/19all-relnotes.html
• Helidon Nima with Loom https://medium.com/helidon/helidon-n%C3%ADma-helidon-on-virtual-
threads-130bb2ea2088
• Quarkus guide with Virtual Threads: https://quarkus.io/guides/virtual-threads
• SpringBoot & Virtual Threads: https://spring.io/blog/2022/10/11/embracing-virtual-threads
• Loom Lab: https://github.com/nipafx/loom-lab
• Vector Math made easy: https://blogs.oracle.com/javamagazine/post/java-vector-api-simd
• FizzBuzz SIMD Style: https://www.morling.dev/blog/fizzbuzz-simd-style/
• JEP425 https://openjdk.org/jeps/425#java-lang-ThreadGroup
• https://bugs.openjdk.org/browse/JDK-8294042
• https://bugs.openjdk.org/browse/JDK-8292654

More Related Content

Similar to How Java 19 Influences the Future of Your High-Scale Applications .pdf

IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016Trayan Iliev
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynoteSuyash Joshi
 
Presto: Distributed sql query engine
Presto: Distributed sql query engine Presto: Distributed sql query engine
Presto: Distributed sql query engine kiran palaka
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8jclingan
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core javaWE-IT TUTORIALS
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouJohn Pape
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceTim Ellison
 
Bring the Spark To Your Eyes
Bring the Spark To Your EyesBring the Spark To Your Eyes
Bring the Spark To Your EyesDemi Ben-Ari
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Trayan Iliev
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyWill Gage
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Sandeep Rawat
 

Similar to How Java 19 Influences the Future of Your High-Scale Applications .pdf (20)

IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynote
 
Presto: Distributed sql query engine
Presto: Distributed sql query engine Presto: Distributed sql query engine
Presto: Distributed sql query engine
 
Java 8
Java 8Java 8
Java 8
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
 
What is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK TechnologiesWhat is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK Technologies
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core java
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell You
 
Java basic
Java basicJava basic
Java basic
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
Bring the Spark To Your Eyes
Bring the Spark To Your EyesBring the Spark To Your Eyes
Bring the Spark To Your Eyes
 
Remote Web Desk
Remote Web DeskRemote Web Desk
Remote Web Desk
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 

More from Ana-Maria Mihalceanu

Java 22 and Beyond- A Roadmap of Innovations
Java 22 and Beyond- A Roadmap of InnovationsJava 22 and Beyond- A Roadmap of Innovations
Java 22 and Beyond- A Roadmap of InnovationsAna-Maria Mihalceanu
 
Surveillance de la sécurité des applications Java avec les outils du JDK e...
Surveillance de la sécurité des applications Java  avec les outils du JDK e...Surveillance de la sécurité des applications Java  avec les outils du JDK e...
Surveillance de la sécurité des applications Java avec les outils du JDK e...Ana-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Monitoring Java Application Security with JDK Tools and JFR Events.pdf
Monitoring Java Application Security with JDK Tools and JFR Events.pdfMonitoring Java Application Security with JDK Tools and JFR Events.pdf
Monitoring Java Application Security with JDK Tools and JFR Events.pdfAna-Maria Mihalceanu
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17Ana-Maria Mihalceanu
 
Java 21 Language Features and Beyond
Java 21 Language Features and BeyondJava 21 Language Features and Beyond
Java 21 Language Features and BeyondAna-Maria Mihalceanu
 
From Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security EnhancementsFrom Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security EnhancementsAna-Maria Mihalceanu
 
Java 21 and Beyond- A Roadmap of Innovations
Java 21 and Beyond- A Roadmap of InnovationsJava 21 and Beyond- A Roadmap of Innovations
Java 21 and Beyond- A Roadmap of InnovationsAna-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox
 A Glance At The Java Performance Toolbox A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdfAna-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox-TIA.pdf
 A Glance At The Java Performance Toolbox-TIA.pdf A Glance At The Java Performance Toolbox-TIA.pdf
A Glance At The Java Performance Toolbox-TIA.pdfAna-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdfAna-Maria Mihalceanu
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdfAna-Maria Mihalceanu
 
The Automation Challenge Kubernetes Operators vs Helm Charts.pdf
The Automation Challenge Kubernetes Operators vs Helm Charts.pdfThe Automation Challenge Kubernetes Operators vs Helm Charts.pdf
The Automation Challenge Kubernetes Operators vs Helm Charts.pdfAna-Maria Mihalceanu
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upAna-Maria Mihalceanu
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upAna-Maria Mihalceanu
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upAna-Maria Mihalceanu
 
The automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm chartsThe automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm chartsAna-Maria Mihalceanu
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upAna-Maria Mihalceanu
 

More from Ana-Maria Mihalceanu (20)

Java 22 and Beyond- A Roadmap of Innovations
Java 22 and Beyond- A Roadmap of InnovationsJava 22 and Beyond- A Roadmap of Innovations
Java 22 and Beyond- A Roadmap of Innovations
 
Surveillance de la sécurité des applications Java avec les outils du JDK e...
Surveillance de la sécurité des applications Java  avec les outils du JDK e...Surveillance de la sécurité des applications Java  avec les outils du JDK e...
Surveillance de la sécurité des applications Java avec les outils du JDK e...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Monitoring Java Application Security with JDK Tools and JFR Events.pdf
Monitoring Java Application Security with JDK Tools and JFR Events.pdfMonitoring Java Application Security with JDK Tools and JFR Events.pdf
Monitoring Java Application Security with JDK Tools and JFR Events.pdf
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
 
Java 21 Language Features and Beyond
Java 21 Language Features and BeyondJava 21 Language Features and Beyond
Java 21 Language Features and Beyond
 
From Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security EnhancementsFrom Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security Enhancements
 
Java 21 and Beyond- A Roadmap of Innovations
Java 21 and Beyond- A Roadmap of InnovationsJava 21 and Beyond- A Roadmap of Innovations
Java 21 and Beyond- A Roadmap of Innovations
 
A Glance At The Java Performance Toolbox
 A Glance At The Java Performance Toolbox A Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdf
 
A Glance At The Java Performance Toolbox-TIA.pdf
 A Glance At The Java Performance Toolbox-TIA.pdf A Glance At The Java Performance Toolbox-TIA.pdf
A Glance At The Java Performance Toolbox-TIA.pdf
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdf
 
A Glance At The Java Performance Toolbox.pdf
 A Glance At The Java Performance Toolbox.pdf A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdf
 
The Automation Challenge Kubernetes Operators vs Helm Charts.pdf
The Automation Challenge Kubernetes Operators vs Helm Charts.pdfThe Automation Challenge Kubernetes Operators vs Helm Charts.pdf
The Automation Challenge Kubernetes Operators vs Helm Charts.pdf
 
Exploring Quarkus on JDK 17
Exploring Quarkus on JDK 17Exploring Quarkus on JDK 17
Exploring Quarkus on JDK 17
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground up
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground up
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground up
 
The automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm chartsThe automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm charts
 
Cloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground upCloud native resiliency patterns from the ground up
Cloud native resiliency patterns from the ground up
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

How Java 19 Influences the Future of Your High-Scale Applications .pdf

  • 1. How Java 19 Influences The Future Of Your High-Scale Applications
  • 2. Java Champion Alumni, Certified Architect Senior Developer Advocate Passionate about solving complex scenarios involving Java and Kubernetes. @ammbra1508.mastodon.social
  • 3. Any Change Starts with Why
  • 4. Why is Scalability Important? Can cause service disruptions that drive end users away. Impacts a business’s ability to meet demands that continuously change. Reduces IT costs when demand is less, and the system(s) should downscale.
  • 5. Types of Scalability Vertical Scaling Increase RAM/CPU Increase the number of machines Horizontal Scaling
  • 6.
  • 8. Application Scalability An application's ability to handle a growing number of users and load. Not compromising on performance or causing disruptions to user experience when demand increases. Measured by the number of requests it can effectively support simultaneously.
  • 9. Scaling Through Elastic Adjustments A combination of improvements to network bandwidth, CPU and memory requirements, and hard disk adjustments. Application needs to be correctly configured, align the right software protocols and hardware to meet increasing number of requests per seconds.
  • 10. Write Once, Run Anywhere
  • 11. A Partial History Of Running Anywhere During the 1970s, computer science focused on increasing the complexity of computer architectures. Semiconductor technology favoured a type of computer architecture capable to of complex instruction set computers (CISCs).
  • 12. From CISC to RISC C. David Patterson and Carlo Sequin from the University of California at Berkeley thought that by simplifying the processor a better performance can be achieved at a much lower cost. This hypothesis translated into RISC, reduced instruction set computer.
  • 13. Key Features of RISC-V Simple instruction set Modularity Extensibility Open Standard Load-store architecture *At the moment, RISC-V still has limited hardware support.
  • 14. The port will support the HotSpot subsystems The template interpreter The C1 (client) JIT compiler The C2 (server) JIT compiler All current mainline GCs, including ZGC and Shenandoah. JEP 422 focuses on integration of the Linux/RISC-V port into the JDK main-line repository.
  • 15. From ISA To SIMD RISC-V is a free and open- source RISC instruction set architecture (ISA) CPU architectures include extensions to their instructions sets that allow applying a single instruction to multiple data items simultaneously (SIMD). Heterogeneous ISAs offer clock speed/parallelism tradeoffs for workloads with frequent usage of SIMD instructions.
  • 16.
  • 17. Portable Java ~ Efficient Java
  • 18. Coding Style of Choice Synchronous Asynchronous
  • 20. Platform Threads and Scaling Platform threads take up considerable memory to exist. When you have lots of blocking I/O, threads are just waiting for data, and the CPU is not utilized to its full capacity. Context switch for platform threads is costly in terms of resources.
  • 21. Reactive Programming To The Rescue?! Offers non-blocking I/O by letting a running thread make a blocking call. Analysing the performance and costs of reactive programming libraries in Java focuses on RxJava, Project Reactor, SmallRye Mutiny.
  • 22. Reactive Programming To The Rescue?! Offers non-blocking I/O by letting a running thread make a blocking call. Executes the rest of the program without waiting for data from storage or the network.
  • 23. Reactive Programming To The Rescue?! Offers non-blocking I/O by letting a running thread make a blocking call. Executes the rest of the program without waiting for data from storage or the network. It keeps an event loop that continuously checks whether the socket received data.
  • 24. Reactive Programming To The Rescue?! Offers non- blocking I/O by letting a running thread make a blocking call. Executes the rest of the program without waiting for data from storage or the network. It keeps an event loop that continuously checks whether the socket received data. Once data is received it will be processed by another thread, so the running thread does not get blocked.
  • 25. Virtual Threads To The Rescue A thread managed by JVM scheduler can get a task assigned by you. Java scheduler assigns the virtual thread to platform thread(s). Virtual thread asks platform thread(s) to perform the task. If a virtual thread has some blocking I/O operation, it will be detached from the platform thread. Another virtual thread is assigned to the platform thread so that the platform thread stays in a running state JEP 425 Virtual Threads (Preview)
  • 26. Readable Code with Virtual Threads Create one new virtual thread per task Explicitly start a virtual thread
  • 27. Maintainable Code with Virtual Threads Explicitly start a virtual thread Execute 1000 tasks
  • 28. Maintainable Code with Virtual Threads Create one new virtual thread per task
  • 29. Unblocking Virtual Threads sun.nio.ch.Poller thread creates a map between the blocked virtual thread and its corresponding socket where data will be received. Poller thread is a continuous event loop that checks whether the socket mapped to a particular thread received data or not. java.internal.vm.Continuation is a public low-level API that is used in virtual threads, it can yield and continue whenever required.
  • 30. Herding Virtual Threads JEP 428 Structured Concurrency (Incubator)
  • 31. Herding Virtual Threads JEP 428 Structured Concurrency (Incubator)
  • 32. Herding Virtual Threads JEP 428 Structured Concurrency (Incubator)
  • 33. Benefits for High Scaling Applications Higher throughput when having high number concurrent requests, with fewer CPU operations and threads spending significant time waiting. When having blocking calls, you can scale well because virtual threads will go in a waiting state until they receive data while platform threads will continuously use the CPU.
  • 34. Cloud Native Java software is highly distributed, evolves with the language, tools and frameworks, and operates in a constantly changing environment.
  • 35. Faster, Safer, Easier Java-to- Native Integration
  • 36. JNI
  • 37. From Unsafe To Proper Handling Create an object without running its constructor Directly access hardware features or the CPU Manually manage off-heap memory
  • 38. Foreign Function & Memory API Get lookup object for string library Get method handler for strlen Convert string to store it in the off-heap memory Invoke foreign function
  • 39. JExtract From Native C Headers export C_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs jextract --source --output src -t org.unix -I $C_INCLUDE_PATH $C_INCLUDE_PATH/string.h java --enable-preview --enable-native-access=ALL-UNNAMED --source FFMBenchmark.java
  • 41. (Nested) Record Patterns Java 16 style for Record Pattern Java 19 style for Record Pattern
  • 42. Pattern Matching For Switch Java 17 (first preview) style Java 19 (Third Preview) style
  • 44. Deprecation Of Locale Class Constructors Before Java 19 After Java 19
  • 45. Decommissioned Methods In ThreadGroup • ThreadGroup.destroy()- invocations of this method will be ignored. • ThreadGroup.getDaemon() – returns the value of the unused daemon flags • ThreadGroup.isDestroyed() – always returns false. • ThreadGroup.setDaemon() – sets the daemon flag without any effect. • ThreadGroup.resume(), ThreadGroup.suspend(), ThreadGroup.stop throw an UnsupportedOperationException.
  • 46. It’s That Time(zone) Of The Year • Chile's DST is delayed by a week in September 2022. • Iran no longer observes DST after 2022. • Rename Europe/Kiev to Europe/Kyiv. • Finish moving duplicate-since-1970 zones to ‘backzone’. source:
  • 48. Additional Resources • Java19 All Release Notes: https://www.oracle.com/java/technologies/javase/19all-relnotes.html • Helidon Nima with Loom https://medium.com/helidon/helidon-n%C3%ADma-helidon-on-virtual- threads-130bb2ea2088 • Quarkus guide with Virtual Threads: https://quarkus.io/guides/virtual-threads • SpringBoot & Virtual Threads: https://spring.io/blog/2022/10/11/embracing-virtual-threads • Loom Lab: https://github.com/nipafx/loom-lab • Vector Math made easy: https://blogs.oracle.com/javamagazine/post/java-vector-api-simd • FizzBuzz SIMD Style: https://www.morling.dev/blog/fizzbuzz-simd-style/ • JEP425 https://openjdk.org/jeps/425#java-lang-ThreadGroup • https://bugs.openjdk.org/browse/JDK-8294042 • https://bugs.openjdk.org/browse/JDK-8292654