SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von Ana-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
 
DevoxxUK 2021 Techniques for maintainable Quarkus applications
DevoxxUK 2021 Techniques for maintainable Quarkus applicationsDevoxxUK 2021 Techniques for maintainable Quarkus applications
DevoxxUK 2021 Techniques for maintainable Quarkus applicationsAna-Maria Mihalceanu
 

Mehr von Ana-Maria Mihalceanu (20)

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
 
DevoxxUK 2021 Techniques for maintainable Quarkus applications
DevoxxUK 2021 Techniques for maintainable Quarkus applicationsDevoxxUK 2021 Techniques for maintainable Quarkus applications
DevoxxUK 2021 Techniques for maintainable Quarkus applications
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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