Discussions abound about the ‘future of Java’ though most of them are actually focused on the here and now. What are the consequences of Java 9 modularity, of moving JEE to Eclipse, of running your application in the cloud? All questions that are important now. but what are the important questions for tomorrow?
In this talk learn about a different view on the real future of Java. See how new hardware technologies, new software approaches and new ideas are powering Java towards a life far removed from that envisioned at its inception. It’s time to look up and see how you will need to change how you think: Whether it's driven by AI or Quantum Computers the problems of tomorrow demand new approaches and new thinking. Are you ready?
n detail the talk will show examples from simple procedural thinking , through lambdas to neural networks etc up to quantum computing. The talk will cover how the JVM is being extended to embrace new forms of hardware - from GPU's and FPGAs and large compute clusters through organic processors and (eventually) QC's.
This talk will explain the journey that Java is on and how its ultimate end point is perhaps not what you'd expect.
32. 3
2
Scripting Language Modern Native LanguageRuntime Language
Type Safe Type Safe, with InferenceDynamically Typed
Type Safe means JIT’s or compilers can optimise code
significantly better than a dynamically type language
Since an int is always an int
In Javascript a int is a thing until the very last minute
33. 3
3
Scripting Language Modern Native LanguageRuntime Language
Type Safe Type Safe, with InferenceDynamically Typed
Bytecode: JIT Compiled JIT Compiled Pre-Compiled
JIT compilers can optimize as the workload changes.
Pre compiled code can’t do that
34. 3
4
Scripting Language Modern Native LanguageRuntime Language
Type Safe Type Safe, with InferenceDynamically Typed
Bytecode: JIT Compiled JIT Compiled Pre-Compiled
Garbage Collected Garbage Collected Reference Counted
GC can run in the background at the cost of a buffer of memory. Can be
parallelized more effectively and more accurately (no circular
references)
35. 3
5
Scripting Language Modern Native LanguageRuntime Language
Type Safe Type Safe, with InferenceDynamically Typed
Bytecode: JIT Compiled JIT Compiled Pre-Compiled
Garbage Collected Garbage Collected Reference Counted
Concurrent Threaded Single Thread Concurrent Work Pool
Single threaded means no locking or syncronisation needed. But CPU
workload is a major Achilles heel
36. 3
6
Scripting Language Modern Native LanguageRuntime Language
Type Safe Type Safe, with InferenceDynamically Typed
Bytecode: JIT Compiled JIT Compiled Pre-Compiled
Garbage Collected Garbage Collected Reference Counted
Concurrent Threaded Single Thread Concurrent Work Pool
All Platforms All Platforms Apple Platforms and Linux
37. 3
7
Runtime Language
Type Safe
Bytecode: JIT Compiled
Garbage Collected
Concurrent Threaded
All Platforms
These characteristics
let us take the JVM
anywhere.
No other runtime
environment comes
close
49. c c e n t u r y b j
m k h l y t n e w t
t c i g a f n n o y
f d h t u s i a o v
i a w a h o h r v e
d i r n v e n y s i
g a p t u a o e x t
q f e a m o j k b o
y i c h r b y p n a
t t n v a e i z h i
Java
In
The
Twenty
First
Century
Are
you
thinking
far
enough
ahead
IBM
Find
which
one of
these
words is
missing
51. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
Java
In
The
Twenty
First
Century
Are
you
thinking
far
enough
ahead
IBM
56. c c e n t u r y b j
m k h l y t n e w t
t c i g a f n n o y
f d h t u s i a o v
i a w a h o h r v e
d i r n v e n y s i
g a p t u a o e x t
q f e a m o j k b o
y i c h r b y p n a
t t n v a e i z h i
When searching for
“java” we have to
make sure we don’t
run off the edge
while( l<w.length()
&& dy>0 &&
p.charAt(x,dy)==w.
charAt(l)) { l++;dy--
; }
57. c c e n t u r y b j
m k h l y t n e w t
t c i g a f n n o y
f d h t u s i a o v
i a w a h o h r v e
d i r n v e n y s i
g a p t u a o e x t
q f e a m o j k b o
y i c h r b y p n a
t t n v a e i z h i
Changing the data
reduces our code
Adding a empty
boarder the width
of the largest word
Means we’ll never run
off the end of the array
59. IntStream is=IntStream.range(0, (side+buffer)*(side+buffer)*8);
is.parallel().forEach( i -> {
int offsets[]=directions[i % 8];
int r = i / 8;
int x = i % r;
int y = i / r;
// loop through word matching each character
for(int i=0;i<word.length;i++) {
. . .
// move to next char in required direction by simply:
x+= offsets[0];
y+= offsets[1];
}
...
68. if(a) {
// do this
} else {
// do this instead
}
On a standard CPU
Each thread runs in parallel
With its own ’program counter’
Independently.if(a) {
// do this
} else {
// do this instead
}
Step 1
Step 1
Step 2
Step 2
69. if(a) {
// do this
} else {
// do this instead
}
On a GPU
Each thread runs in sync
sharing a program counter
The length of time for the
program to complete is
a factor of all the
paths traveled
GPU’s are best when
data driven!
if(a) {
// do this
} else {
// do this instead
}
Step 1
Step 1
Step 2
Step 3
86. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 1 3,5 -> NE
87. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 1 3,5 -> NE
No – try again
88. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 2 4,4 -> N
89. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 2 4,4 -> N
No – try again
90. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 3 6,3 -> NW
91. r c e n t u r y l m
y q h m y t n e w t
j x v g f a s r h h
f u r t u k h o u q
y a m a h o c e k n
s b r p v e n c a t
a y g e u a j e a d
h z g a m o j i p b
h z a e r b y a n n
d m t f g e i v e i
“Java”
Try 3 6,3 -> NW
No – try again
GPU TestSorting 30k elements - in order to see offload to GPU being of benefit
CPU trend down towards 4m elements/sec
GPU trended up towards 400m elements / sec
Between 3m and 300m elements
approaching 100X improvement
At roughly the same time that Grover published his algorithm,
Bennett, Bernstein, Brassard, and Vazirani proved that no quantum solution to the problem can evaluate the function fewer than thes this times,
so Grover's algorithm is asymptotically optimal.[1]
With a QC ability to execute all search's in parallel wordsearches are easy
But theans