This document outlines the keynote presentation "20 years in Java and JVM land from an engineer's perspective" given by Marcus Lagergren. The presentation looks back over Lagergren's 20 years working with Java and runtimes, from his early experiences in university in the 1990s through projects at Ericsson and involvement with early Java releases. It provides a first-hand account of the evolution of Java and runtime technologies from the perspective of an engineer who has worked with Java throughout its history.
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Javaland keynote final
1. A
trip
down
memory
lane:
20
years
in
Java
and
JVM
land
Marcus
Lagergren
@lagergren
2. The following is intended to outline our
general product direction. It is intended for
information purposes only, and may not be
incorporated into any contract. It is not a
commitment to deliver any material, code, or
functionality, and should not be relied upon
in making purchasing decisions.
The development, release, and timing of any
features or functionality described for
Oracle’s products remains at the sole
discretion of Oracle.
Safe
Harbor
Statement
4. Safe
Harbor
Statement
[This
is
my
story,
my
experiences.
Official
and
other
peoples’
versions
of
events
may
vary]
@lagergren
5. I’ve
talked
about
computer
history
in
a
runMme
perspecMve
before
@lagergren
• GeekOut
2014,
Tallinn
• JokerConf
2014,
Saint
Petersburg
6. I’ve
talked
about
computer
history
in
a
runMme
perspecMve
before
@lagergren
• GeekOut
2014,
Tallinn
• JokerConf
2014,
Saint
Petersburg
…
but
never
from
a
personal
perspecMve.
7. What
have
I
been
doing
with
my
life
for
these
past
20
years?
28. 1991-‐1993
• Project
“Green”
at
Sun
Microsystems
• A
portable
architecture
for
home
electronics
29. 1991-‐1993
• Project
“Green”
at
Sun
Microsystems
• A
portable
architecture
for
home
electronics
• Remote
controls?
30. 1994
• I’m
sMll
at
university
• Scraped
together
enough
money
to
build
a
high
performance
mini
tower
PC
• PenMum
90
• “Wow!
CPU
frequencies
are,
like,
in
the
FM
the
FM
band
these
days”
32. 1994
• At
the
same
Mme
in
Santa
Clara
• Oak
has
beder
applicaMons
than
programming
remote
controls
33. 1994
• At
the
same
Mme
in
Santa
Clara
• Oak
has
beder
applicaMons
than
programming
remote
controls
• Deal
with
Netscape
is
being
finalized
34. 1994
• At
the
same
Mme
in
Santa
Clara
• Oak
has
beder
applicaMons
than
programming
remote
controls
• Deal
with
Netscape
is
being
finalized
• Write
once
/
run
everywhere
35. 1994
• At
the
same
Mme
in
Santa
Clara
• Oak
has
beder
applicaMons
than
programming
remote
controls
• Deal
with
Netscape
is
being
finalized
• Write
once
/
run
everywhere
• “Network
aware”
language
36. 1995-‐1996
• 1995
was
the
year
where
Internet
suddenly
meant
“The
World
Wide
Web”
• 1996:
JDK
1.02
• The
first
JDK
released
by
Sun
• Java
in
Netscape
Navigator
37. 1996
• I
worked
with
Alphas
of
JDK
1.0
at
Ericsson
Medialab
38. 1996
• I
worked
with
Alphas
of
JDK
1.0
at
Ericsson
Medialab
39. 1996
• I
worked
with
Alphas
of
JDK
1.0
at
Ericsson
Medialab
• The
JDK
fit
on
one
of
these
• Sneakernet,
back
and
forth
to
KTH
where
there
was
bandwidth
and
not
just
my
v42’’
modem
49. 1996
• Java
1.0
• Pure
byte
code
interpretaMon
• University
professor
suddenly
proud
of
his
interpreted
toy
language,
not
ashamed
as
previously
• “If
Java
gets
away
with
it,
I
can”
• But
did
it?
50. 1996
• Java
1.0
• Pure
byte
code
interpretaMon
• University
professor
suddenly
proud
of
his
interpreted
toy
language,
not
ashamed
as
previously
• “If
Java
gets
away
with
it,
I
can”
• But
did
it?
• Java
Memory
Model
(broken)
51. 1996
• Java
1.0
• Pure
byte
code
interpretaMon
• University
professor
suddenly
proud
of
his
interpreted
toy
language,
not
ashamed
as
previously
• “If
Java
gets
away
with
it,
I
can”
• But
did
it?
• Java
Memory
Model
(broken)
• Thread.stop
and
all
its
friends
• (@deprecated)
52. 1996
• Java
1.0
• Pure
byte
code
interpretaMon
• University
professor
suddenly
proud
of
his
interpreted
toy
language,
not
ashamed
as
previously
• “If
Java
gets
away
with
it,
I
can”
• But
did
it?
• Java
Memory
Model
(broken)
• Thread.stop
and
all
its
friends
• (@deprecated)
• “Very
1.0”
53. 1996
• “Your
development
cycle
is
much
faster
because
Java
is
interpreted.
The
compile-‐link-‐load-‐test-‐crash-‐debug-‐cycle
is
obsolete”
-‐
James
Gosling
54. 1996
• “Your
development
cycle
is
much
faster
because
Java
is
interpreted.
The
compile-‐link-‐load-‐test-‐crash-‐debug-‐cycle
is
obsolete”
-‐
James
Gosling
• Wait!
Isn’t
that
the
argument
the
JavaScript
kiddies
use
today?
55. 1996
• Appeal
Soqware
SoluMons
is
founded
in
Stockholm
- All
members
had
extensive
Java
experience,
having
used
the
language
from
the
start
- Java
ConsulMng
- …
and
…
*sigh*
UML/RUP
59. 1997
• Java
on
the
client
side
not
really
taking
off
60. 1997
• Java
on
the
client
side
not
really
taking
off
• Write
once
/
run
everywhere
does,
however
• And
no
buffer
overruns
• And
no
pointers
• And
automaMc
memory
management
• ==
fast
applica+on
development
• The
JDK
is
a
great
library
for
development
61. 1997
• Java
on
the
client
side
not
really
taking
off
• Write
once
/
run
everywhere
does,
however
• And
no
buffer
overruns
• And
no
pointers
• And
automaMc
memory
management
• ==
fast
applica+on
development
• The
JDK
is
a
great
library
for
development
• The
dawn
of
applicaMon
servers
62. 1997
• Java
on
the
client
side
not
really
taking
off
• Write
once
/
run
everywhere
does,
however
• And
no
buffer
overruns
• And
no
pointers
• And
automaMc
memory
management
• ==
fast
applica+on
development
• The
JDK
is
a
great
library
for
development
• The
dawn
of
applicaMon
servers
• Prehistoric
trail
toward
Java
EE
65. JavaOne
1997
• Sun
Microsystems
presents
the
HotSpot
virtual
machine
– “WOW!
This
is
the
way
to
do
it!
AdapMve
runMmes!”
66. 1998
• JDK
1.2
• Swing
• stricmp
• JIT
introduced
in
the
classic
VM
• CollecMons
API
• JDK
triples
in
size:
1520
classes,
59
packages
67. 1998
• JDK
1.2
• Swing
• stricmp
• JIT
introduced
in
the
classic
VM
• CollecMons
API
• JDK
triples
in
size:
1520
classes,
59
packages
68. JavaOne
1998
• Sun
Microsystems
presents
the
HotSpot
virtual
machine
again
69. JavaOne
1998
• Sun
Microsystems
presents
the
HotSpot
virtual
machine
again
– “WTF!
This
is
slide-‐by-‐slide
the
exact
same
presentaMon
as
last
year!?!”
– We
can’t
wait
any
longer.
Let’s
build
our
own
VM.
How
hard
can
it
be?
71. ProducMze
a
narrower
domain?
• Server-‐side
usage
only.
Headless.
– We
need
to
help
the
early
app
server
vendors
get
performance
and
scalability
72. ProducMze
a
narrower
domain?
• Server-‐side
usage
only.
Headless.
– We
need
to
help
the
early
app
server
vendors
get
performance
and
scalability
• No
interpreter
– “startup
Mme
doesn’t
mader
on
the
server
anyway”
73. 1998
• BEA
Acquires
WebLogic
• Weblogic
becomes
one
the
first
drivers
for
J2EE
specificaMon
75. 1998
• TowerJ
• Excelsior
JET
• Convert
byte
code
to
C
code
and
run
gcc
• Fundementally
incompaMble
with
a
runMme
language
• Rakes
in
$$$
anyway
76. 1999
• Appeal
Soqware
SoluMons
finance
JRockit
development
• HunMng
for
VC
• In
August
we
sell
the
first
part
of
our
souls
• We
spend
nights
reading
academic
papers
• Jalapeño
(to
become
Jikes
RVM)
77. 2000
• Java
is
now
the
fastest
growing
programming
language
in
the
world
• Dot
com
bubble
• NASDAQ
hits
5.000
just
before
the
tech
wreck
78. 2000
• The
Java
License
• You
can’t
call
yourself
“Java”
without
a
Java
license
• You
need
to
pass
the
TCK
test
suite
– Not
available
without
license
• To
get
a
Java
License
you
need
a
“value
add”
87. 2000
• JDK
1.3
“Kestrel”
– HotSpot
released
before,
April
1999
J2SE
JVM
– But
Kestrel
bundles
HotSpot
with
JDK
– JNDI
– JPDA
– RMI/Corba
– JavaSound
88. 2000
• Q1
2000
– JRockit
1.0
released
– “Very
1.0”
– N
x
M
green
threads
hybrid
– We
actually
sell
some
licenses
• We
are
stupid
enough
to
write
it
in
the
year
end
financial
statement
90. 2001
• Appeal
Virtual
Machines
is
broken
out
from
Appeal
Soqware
SoluMons
• Appeal
Virtual
Machines
finally
gets
its
Java
License!
• “Managability
value
add”
• StaMc
compiler
mindset
sMll
very
strong
• Very
hard
to
sell
adapMve
runMmes
as
concept
91. 2001
• BEA
wants
performance
and
scalability
YESTERDAY
• We
take
Mme
to
help
them
out
• Start
cooperaMng
on
benchmarks
• Intel
/
BEA
discussions
about
JRockit
95. 2002
• JDK
1.4
“Merlin”
– First
plamorm
developed
under
JCP
– assert
keyword
– Regexps
(sorta
like
Perl
but
not
really)
– ExcepMon.getCause()
– NIO
– Logging
API
– Image
I/O
– XML
– IPv6
96. 2002
• ValenMne’s
day:
BEA
acquires
Appeal
Virtual
Machines
• Now:
how
do
we
make
money?
• Eventually
we
found
4
value
adds
97. 2002
• ValenMne’s
day:
BEA
acquires
Appeal
Virtual
Machines
• Now:
how
do
we
make
money?
• Eventually
we
found
4
value
adds
98. 2002
• Value
add
#1
– CCE/SE
– Implement
BEA’s
mulM
Mer
support
process
99. 2002
• Value
add
#2
– Managability
– JSR
works
starts
on
JSR-‐174
– Management
console
is
the
first
part
of
Java
Mission
Control
to
get
out
there
101. 2003-‐2004
• Some
hardware
observaMons
are
in
order
– Clock
rate
curves
start
to
fladen
out
102. 2003-‐2004
• Some
hardware
observaMons
are
in
order
– Clock
rate
curves
start
to
fladen
out
– MulM
cores,
NUMA,
hyperthreading
103. 2003-‐2004
• Some
hardware
observaMons
are
in
order
– Clock
rate
curves
start
to
fladen
out
– MulM
cores,
NUMA,
hyperthreading
– Java
sMll
has
explicit
Threads
104. 2003-‐2004
• Some
hardware
observaMons
are
in
order
– Clock
rate
curves
start
to
fladen
out
– MulM
cores,
NUMA,
hyperthreading
– Java
sMll
has
explicit
Threads
– In-‐order
execuMon
is
a
bad
idea
for
JITs
105. 2003-‐2004
• Some
hardware
observaMons
are
in
order
– Clock
rate
curves
start
to
fladen
out
– MulM
cores,
NUMA,
hyperthreading
– Java
sMll
has
explicit
Threads
– In-‐order
execuMon
is
a
bad
idea
for
JITs
– ExecuMon
Time
=
RunMme
Overhead
+
Program
RunMme
108. 2004
• x86_64
released
–
not
the
Itanium,
sMll
64
bit
– For
the
first
Mme
in
history
AMD
eats
Intel’s
lunch
– Full
backwards
compaMbility
towards
IA32
– AdopMon
(recognize
the
parallel
to
Java)
– Wider
register
bandwidth
– 2x
the
number
of
registers
– EXABYTES
of
virtual
memory
space
110. The
Benchmark
Wars
• SPECjvm98
was
the
benchmark
since
Mme
immemorial
• SPECjbb2000,
2005
• SPECJAppServer
• Running
SPECjbb2005
is
a
quanMfiable
management
goal
111. The
Benchmark
Wars
• Brought
real
world
opMmizaMons
– Compressed
references
– Non
conMguous
heaps
for
32
bits
– External
and
internal
heap
compacMon
– Concurrent
GC
– Biased
locking
– Large
pages
– NUMA
– Prefetch
heurisMcs
– Using
vectorized
hardware
instrucMons
SSE3/4
– ParMal
Escape
Analysis
– Off
heap
storage
prototypes
112. The
Benchmark
Wars
• Brought
real
world
opMmizaMons
– Compressed
references
– Non
conMguous
heaps
for
32
bits
– External
and
internal
heap
compacMon
– Concurrent
GC
– Biased
locking
– Large
pages
– NUMA
– Prefetch
heurisMcs
– Using
vectorized
hardware
instrucMons
SSE3/4
– ParMal
Escape
Analysis
– Off
heap
storage
prototypes
113. The
Benchmark
Wars
• All
this
from
a
few
semi-‐syntheMc
benchmarks
• CompeMMon
leads
to
Java
server
side
performance
being
pushed
to
where
it’s
never
been
before
• “Performance
releases”
not
always
great
for
stability,
though
118. 2004
• JSR-‐174
gets
finalized
• Mission
Control
ships
with
its
first
versions
– ProducMon
Mme
zero
overhead
monitoring
– Limited
flight
recordings
(JRA)
– Extremely
cheap
–
Just
use
data
available
from
the
runMme
already
123. 2006
• Sun
Microsystems
not
doing
all
too
well?
• JavaFX
is
going
on.
– Mobile
phones
are
everything.
– It
gets
a
bit
quiet
from
our
side
of
the
scene.
124. 2006
• Apache
Harmony
– Needed
to
rewrite
classes
from
scratch
– IBM
and
others
contribute
a
lot
of
code
• Asks
for
Java
license
which
it
doesn’t
get
– Field
of
use
restricMons
claimed
not
compliant
with
JCP
rules
• Various
JCP
fights
ensue
• Sun
opens
up
JVM/JDK
sources
under
GPL
v2
125. 2006
• JDK
6.0
(December,
JSR-‐270)
“Mustang”
– javax.scripting
(built
in
Rhino
integraMon)
– Compiler
API
– JDBC
4.0
– Dynamic
languages,
JSR-‐292
up
for
review
127. 2006
• Dynamic
languages
are
becoming
trendy
• JRuby
leads
the
growth
• JSR-‐292,
invokedynamic
• BEA,
IBM,
Sun
all
in
the
process
– We
contribute
substanMally
to
the
spec
• The
polyglot
JVM
effort
is
starMng
to
be
coordinated
• Bytecode
is
basically
serialized
Java
– No
runMme-‐only
dispatch
128.
129. 2006
• VirtualizaMon
is
becoming
trendy
• “The
JVM
is
just
a
specialized
operaMng
system
for
running
Java”
• BEA
Starts
building
JRockit
Virtual
EdiMon
(VE)
– Value
add
#4
131. 2006
• Why
is
virtualized
Java
powerful?
– Removal
of
abstracMon
– Zero
copy
I/O
– Move
everything
we
can
to
userland
– Minimize
syscalls
– Threads
can
protect
memory
from
other
threads
• Cheap
read
barriers
for
low
latency
GC!
– But
device
drivers?
– That’s
what
we
have
the
Hypervisor
for
– Heavily
encouraged
by
the
investment
banking
industry
132. 2007
• Apache
requests
TCK
• The
JCP
stalls
• JRockit
needs
to
hedge
its
bets,
and
can
run
Harmony
aqer
a
few
months
• BEA/Sun
Java
license
discussions
• No
language
updates
for
the
forseeable
future?
135. 2008
• Oracle
acquires
BEA
• JRockit
engineering
works
closely
with
ExaData
and
the
Oracle
server
stacks
• JRockit
becomes
default
Oracle
JVM
136. 2008
• Oracle
acquires
BEA
• JRockit
engineering
works
closely
with
ExaData
and
the
Oracle
server
stacks
• JRockit
becomes
default
Oracle
JVM
• Oracle
forces
the
move
from
VMWare
to
Xen
for
Jrockit
VE.
146. 2011
• Java
7
extremely
well
received
by
community!
• Tipping
point
and
community
goodwill
• Oracle’s
second
JavaOne
extremely
well
received
147. JVM
Architecture
observaMon
• We
have
the
backwards
compaMbility
sMll
• We
will
always
maintain
it
– In
some
ways,
things
might
change,
e.g.
Jigsaw,
but
fundamental
compaMbility
will
always
be
there
149. 2011-‐2012
• Java
8
development
starts
picking
up
speed
• Nashorn
project
officially
starts
• JMC
/
servicability
port
to
HotSpot
completes,
part
of
Java
8
(7u40)
• Beder
build
and
test
infrastructure
152. 2014
• Java
8
(released
March
18)
– Biggest
and
best
Java
release
ever
– Perm
gen
removal
– Type
annotaMon
– Unsigned
integer
math
– Repeated
annotaMons
– Date
and
Time
API
(JSR-‐310)
– Nashorn