Download - Javaland keynote final
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
Safe Harbor Statement
[This is my story, my experiences. Official and other peoples’ versions of events may vary]
@lagergren
I’ve talked about computer history in a runMme perspecMve before
@lagergren
• GeekOut 2014, Tallinn • JokerConf 2014, Saint Petersburg
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.
Agenda
• It’s 2015 • Java has been around for 20 years. • Longer if you count the alphas/
betas of Java 1.0
1991-‐1993
• Project “Green” at Sun Microsystems
• A portable architecture for home electronics
• Remote controls?
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”
1994
• At the same Mme in Santa Clara • Oak has beder applicaMons than programming remote controls
• Deal with Netscape is being finalized
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
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
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
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
1996 • Internship at Ericsson Medialab • “Play with Ericsson’s future” • Use “cukng edge technology” to do something with media on demand
1996 • Internship at Ericsson Medialab • “Play with Ericsson’s future” • Use “cukng edge technology” to do something with media on demand
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?
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)
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)
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”
1996 • “Your development cycle is much faster because Java is interpreted. The compile-‐link-‐load-‐test-‐crash-‐debug-‐cycle is obsolete”
-‐ James Gosling
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?
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
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
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
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
1997 • Java 1.1 • Inner classes • JavaBeans • JDBC • RMI • Limited ReflecMon (non runMme) • The first JITs • (Symantec on Windows)
• SERIALIZATION – THE HORROR!
JavaOne 1997
• Sun Microsystems presents the HotSpot virtual machine – “WOW! This is the way to do it! AdapMve runMmes!”
1998 • JDK 1.2 • Swing • stricmp • JIT introduced in the classic VM • CollecMons API • JDK triples in size: 1520 classes, 59 packages
1998 • JDK 1.2 • Swing • stricmp • JIT introduced in the classic VM • CollecMons API • JDK triples in size: 1520 classes, 59 packages
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?
ProducMze a narrower domain?
• Server-‐side usage only. Headless. – We need to help the early app server vendors get performance and scalability
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”
1998 • TowerJ • Excelsior JET • Convert byte code to C code and run gcc • Fundementally incompaMble with a runMme language • Rakes in $$$ anyway
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)
2000 • Java is now the fastest growing programming language in the world • Dot com bubble • NASDAQ hits 5.000 just before the tech wreck
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”
The Java License
• What’s a “value add”? – Superior performance! – What? You didn’t like that? – OK… Let’s see… Err.. “managability”
2000
• JDK 1.3 “Kestrel” – HotSpot released before, April 1999 J2SE JVM – But Kestrel bundles HotSpot with JDK – JNDI – JPDA – RMI/Corba – JavaSound
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
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
2001
• BEA wants performance and scalability YESTERDAY
• We take Mme to help them out • Start cooperaMng on benchmarks • Intel / BEA discussions about JRockit
2001
• JavaOne 2001 • I was mostly in San Mateo gekng JRockit to run on IA64 in binary translaMon mode
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
2002
• ValenMne’s day: BEA acquires Appeal Virtual Machines
• Now: how do we make money? • Eventually we found 4 value adds
2002
• ValenMne’s day: BEA acquires Appeal Virtual Machines
• Now: how do we make money? • Eventually we found 4 value adds
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
2003-‐2004
• Some hardware observaMons are in order – Clock rate curves start to fladen out – MulM cores, NUMA, hyperthreading
2003-‐2004
• Some hardware observaMons are in order – Clock rate curves start to fladen out – MulM cores, NUMA, hyperthreading – Java sMll has explicit Threads
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
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
2004
• JDK 5.0 (“Tiger”, JSR-‐176) – Number scheme changed from 1.x – Biggest Java release so far! – Generics – AnnotaMons – Autoboxing / unboxing – Enums – Varargs (Object… ) – StaMc imports – java.util.concurrent
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
The Benchmark Wars
• SPECjvm98 was the benchmark since Mme immemorial
• SPECjbb2000, 2005 • SPECJAppServer • Running SPECjbb2005 is a quanMfiable management goal
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
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
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
2004
• Meanwhile at Appeal Virtual Machines – Value add #3 – DeterminisMc GC – QoS level for pause Mmes – Modern applicaMons want low latency rather than throughput
– Telco, finance sectors went wild
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
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.
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
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
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
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
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
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?
2008
• Oracle acquires BEA • JRockit engineering works closely with ExaData and the Oracle server stacks
• JRockit becomes default Oracle JVM
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.
2011
• Sadly, sMll no new Java release since 2006 • IBM joins the OpenJDK • Harmony reMres • Marcus comes back to the Language team
2011
• Java 7 “Dolphin” – Plan “A” – IniMal (naMve) implementaMon of invokedynamic bytecode
– Compressed oops default – Project Coin
• Try-‐with-‐resource, switch on strings, binary literals, underscores, mulM catch with | separators
– Concurrency uMliMes finalized (JSR-‐166) – NIO-‐2 (JSR-‐203)
2011
• Java 7 extremely well received by community!
• Tipping point and community goodwill • Oracle’s second JavaOne extremely well received
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
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
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
2014
List<?> costBeforeTax =
Arrays.asList(100, 200, 300, 400, 500);
for (Integer cost : costBeforeTax) {
double price = cost + .25*cost; System.out.println(price);
}
2014
List<?> costBeforeTax =
Arrays.asList(100, 200, 300, 400, 500);
costBeforeTax.stream().
map((cost) -> cost .25*cost).
forEach(System.out::println);
2014
List<?> costBeforeTax =
Arrays.asList(100, 200, 300, 400, 500);
costBeforeTax.parallelStream().
map((cost) -> cost .25*cost).
forEach(System.out::println);
2015
• Java 9 in the works – Jigsaw – REPL (Project Kulla) – Nashorn parMal ES6 support, huge performance improvements
2015
• Aqer Java 9 – Value types (project Valhalla) – Foreign funcMon interface (project Panama) – Arrays 2.0 – DeterminisMc and Low Latency GC