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.
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.
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.
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
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.
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.
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
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: