the forces driving java
DESCRIPTION
Presentation for London Java Community Open Conference. 22nd November 2012. Steve Elliott - Oracle UK.TRANSCRIPT
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1
The Forces Driving Java
Steve Elliott Oracle UK November 2012
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 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.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 3
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 4
The Highlander Fallacy
“There can be only one”
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 5
The Highlander Fallacy
“This, of course, is a classic example of what I have called the Highlander Fallacy, which briefly stated is the principle that there can be only one. If any two technologies can be described using the same set of words, then there is no need for both of them, and only one will survive. I call this a fallacy because, to use a technical term, it is total crap.”
Jim Waldo http://blogs.law.harvard.edu/waldo
“There can be only one”
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 6
“If someone claims to have the perfect programming language, he is either a fool, a salesman or both” “There are only two kinds of programming languages : those people complain about and those nobody uses” “ How do you pronounce ‘Bjarne Stroustrup’ ? It can be difficult for non-Scandinavians. The best suggestion I heard yet was “start by saying it a few times in Norwegian then stuff a potato down your throat and do it again” J
Bjarne Stroustup
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 7
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 8
http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 9
C
Cloud
Cloud
Cloud
Embedded Mobile Devices
Developer Tools CI DevOps
Concurrency Threads
JVM
Language Evolution Polyglot Programming
Performance Monitoring Management Tuning
Big Data NoSQL Modularity
Deployment
Web Technologies User
Interface
Community Governance Open Source
Hardware Evolution
Multi-tenancy
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10
Hardware Evolution
§ Pipelining, Superscalar, OoO execution… § Multi Core, Hyperthreading, Crypto… § Caches, Memory Hierarchy / Disk / SSD… § GPU processing § Networking § etc etc etc
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11
Hardware Evolution
§ Herb Sutter – The free lunch is over – Welcome to the jungle
§ Jason Robert Carey Patterson – Modern Microprocessors – A 90 minute guide
§ Ulrich Drepper – What every programmer should know about memory
§ Cliff Click – A crash course in modern hardware
§ Martin Thompson (Mechanical Sympathy), Peter Lawrey, Kirk Pepperdine, Jevgeni Kabanov (Do you really get memory?) and many more…
Know your system
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 12
Why Lambdas for Java?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 14
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 15
Language Evolution / Polyglot Programming
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 16
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 17
Influences on Java (née GreenTalk/Oak : 1991-92)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12
Fortran
LISP
Clojure
Pascal (p-code)
Perl
C
PL/M Smalltalk
Java
occam
BASIC
Ruby
Scala
Coral
Algol
Ada
BCPL
Forth
Simula Modula
C++ Scheme
Objective C
Erlang
Haskell Python
http://en.wikipedia.org/wiki/Timeline_of_programming_languages http://hopl.murdoch.edu.au/
VB
PHP
Groovy
LiveScript/JavaScript
Dart
Go
Mesa Cedar
B
Self (Hotspot)
Kotlin
Ceylon
Fantom
TypeScript
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 18
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 19
The Da Vinci Machine Project Polyglot Programming
Nashorn Ceylon
Seph
Virtual Machine InvokeDynamic
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 20
Project Nashorn
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 21
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 22
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 23
Performance
§ JVM § Throughput / Latency § Monitoring / Instrumentation § Tuning § …
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 24
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 25
G1 – Garbage First
§ Supported for production use since 7u4 § Large heaps with GC latency requirements
– Typically ~6GB or larger heaps – Stable and predictable GC latencies below 0.5 seconds
§ Applications that have – more than 50% live data on the heap – varied object allocation rate – undesired long GC or compaction pauses (greater than 0.5s)
Recommended Use Cases
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 26
Performance Features
§ Partial Permanent Generation removal in JDK 7 – Interned Strings moved to Java heap
§ First step: Full removal in JDK 8 § My be necessary to adjust GC tuning
– Interned Strings now in heap – Applications with high GC time – Applications with high interned String count – Larger heap size may be needed
HotSpot JVM: Partial Perm Gen Removal
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 27
Java Diagnostic Commands
§ Complete tool chain – Framework for easy implementation and integration – Command line tool, jcmd
§ jcmd – List running Java processes
§ jcmd <pid> help – List all available commands, currently ~15 different commands
JDK Introspection
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 28
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29
Modularity / Deployment
§ Modules – Jigsaw – OSGi – Project Penrose
§ Deployment – Enterprise, Web, App Store model
§ Build Systems / CI / Devops… – Maven, Gradle, Hudson etc
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 30
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 31
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 32
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 33
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 34
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 35
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 37
UI / Web
§ JavaFX § Websocket / JSON (Java EE) § HTML5 § Mobile
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 38
JavaFX Update
JavaFX 2.2 for Linux Scene Builder 1.0
Linux Developer Preview
JavaFX 2.1 for OS X
OpenJFX project created
Dec 11
NetBeans 7.2 with FX 2.1 and Scene Builder integration
Linux/ARM Dev Preview Scene Builder Linux Dev Preview
Jan 12 Apr 12 Aug 12
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 39
Avatar
• Applications based on Thin Server Architecture • Incubator for HTML5/JavaScript clients with Java EE
– Learn by experimenting – Identify targets for standardization, e.g. WebSocket (now), Server-
Sent Event (Future)
• End-to-end framework: Client and Server – A-la-carte, not all or nothing
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 40
Introducing Project Easel – Advanced Tooling for HTML 5
• Provides the foundation for tooling support for Project Avatar.
• Consume Java EE based services with today’s popular JavaScript frameworks
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 41
Java EE
JPA JAX-RS
SSE WebSocket
EL . . .
Angry Bids Demo
Auction Items
HTM
L5 Server
Infrastructure
Live Bid
Chat
HTTP restModel
Server-Sent Event pushModel
WebSocket socketModel
Database
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 42
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 43
http://spoofzu.blogspot.co.uk
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 44
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 45
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 46
http://www.oracle.com/technetwork/java/seccodeguide-139067.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 47
Roadmaps
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 48
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 49
JDK 8 Java for Everyone • Profiles for constrained devices • JSR 310 - Date & Time APIs • Non-Gregorian calendars • Unicode 6.1 • ResourceBundle. • BCP47 locale matching • Globalization & Accessibility
Innovation • Lambda aka Closures • Language Interop • Nashorn
Core Libraries • Parallel operations for core
collections APIs • Improvements in functionality • Improved type inference
Security • Limited doPrivilege • NSA Suite B algorithm support • SNI Server Side support • DSA updated to FIPS186-3 • AEAD JSSE CipherSuites
Tools • Compiler control & logging • JSR 308 - Annotations on
Java Type • Native app bundling • App Store Bundling tools
Client • Deployment enhancements • JavaFX 8 • Public UI Control API • Java SE Embedded support • Enhanced HTML5 support • 3D shapes and attributes • Printing
General Goodness • JVM enhancements • No PermGen limitations • Performance lmprovements
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 50
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 51
JavaFX 2.2 and Beyond
Multi-Touch Mac
Scene Builder Advanced Cells
1080p Embedded
Performance
Rich Text
ComboBox
HTTP Live Streaming
Pagination
3D Native Deployment
h.264
Snapshot Canvas
Writeable Image
ColorPicker
i18n
Linux Printing
Accessibility 3rd Party Controls
SWT for Linux
ARM
Complex Text
SwingNode
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 52
To Java SE 9 and Beyond!
Jigsaw
Cloud
Ease of use Optimizations Generic Lang Interoperability
Penrose
OpenJFX Project Sumatra – Java for GPUs
Ports: Power PC/AIX
Multi-Tenancy Support
Self Tuning JVM
Improved Integration with Native
Resource Management Lang Enhancements
Unified Type System Data Structure Optimizations
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 53
Roadmap Java SE
2015 2012 2013 2014
7u6 • JRE on Mac complete • JavaFX 2.2 integration • Linux ARM V6/V7 • JavaFX on Mac and Linux
JDK 8 • Lambda • Complete JVM Convergence • JavaScript Interop • JavaFX 8
– Public UI Control API – Java SE Embedded support – Enhanced HTML5 support
NetBeans IDE 7.2 • Support for JDK 7 on Mac • Support for JavaFX on
Mac and Linux
Scene Builder 1.0 • Windows and Mac
Major Serviceability improvements • Java Flight Recorder in JDK • Native memory tracking • Java Discovery Protocol • App Stores Packaging tools • Last Public Release of JDK 6
JDK 9 • Jigsaw • Interoperability • Optimizations • Cloud • Ease of Use • JavaFX JSR
NetBeans IDE 7.3 • Scene Builder 1.1 support
Scene Builder 1.1 • Linux support
NetBeans IDE 8 • JDK 8 support • Scene Builder 2.0 support
Scene Builder 2.0 • JavaFX 8 support • Enhanced Java IDE support
NetBeans IDE 9 • JDK 9 support • Scene Builder 3.0 support
SceneBuilder 3.0 • JavaFX 9 support
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 54
Roadmap Embedded Java
2015 2012 2013 2014
Java Embedded Suite 7 • SE Embedded 7 • GlassFish for Embedded • Java DB
Java SE Embedded 8 • Complete JVM convergence • Additional compact profiles • JavaFX for Embedded
Java Embedded Suite 8 • Additional enterprise middleware integrations
• Flight Recorder/Mission Control
Java ME Embedded 3.2 • Microcontroller support • Device Access APIs
Java ME SDK 3.2 • Embedded emulator • Eclipse integration
Java Embedded Suite 7.1 • Sync with latest JDK and
GlassFish • Optimizations and additional
platform support
Java Embedded 9 • JDK9 • Modularity based on
Jigsaw • Additional Embedded
device APIs • Ease of Development
Java ME Embedded 3.3 • Enhanced device access • Footprint optimization &
configuration tools • Improved developer
tooling & experience
Java ME Embedded 8 • Java ME 8 • Standardized Embedded API • New on-device debugging
architecture NetBeans IDE 8 • Java ME/SE 8 Embedded
support
NetBeans IDE 7.2 • ME Embedded support
NetBeans IDE 9 • Java ME/SE 9
Embedded support • Jigsaw support
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 55
Java EE Past, Present, & Future
May 1998
Enterprise Java Platform
Dec 1999 10 specs
Robustness
Sep 20110 13 specs
Web Services
Nov 2003 20 specs
Ease of Development
May 2006 23 specs
Lightweight
Dec 2009 28 specs
Simplicity & HTML5
Q2 2013 33+ specs
JPE Project
J2EE 1.3 CMP, Connector Architecture
Java EE 5 Ease of Development, Annotations, EJB 3.0, JPA, JSF, Updated Web Services
J2EE 1.4 Web Services Mgmt, Deployment, Async Connector
Java EE 6 Pruning, Extensibility Ease of Dev, CDI, JAX-RS
Web Profile
Servlet 3.0, EJB 3.1 Lite
Java EE 7 JMS 2.0, Batch, JCache, TX Interceptors HTML5: WebSocket, JSON
Web Profile
JAX-RS 2.0
J2EE 1.2 Servlet, JSP, EJB, JMS RMI/IIOP
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 56
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 57
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 58
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 59
Java EE 7 – Candidate JSRs
Connector 1.6
Managed Beans 1.0 EJB 3.2
Servlet 3.1
Portable Extensions
JSF 2.2 JAX-RS 2.0
Bea
n Va
lidat
ion
1.1
JMS 2.0 JPA 2.1
EL 3.0
JTA 1.2
JSP 2.2
Interceptors 1.1 CDI 1.1 Common Annotations 1.1
Updated Major Release
New
Java Caching API (JSR 107)
Batch Applications (JSR 352)
Java API for JSON (JSR 353)
Java API for WebSocket (JSR 356)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 60
Connector 1.6
Managed Beans 1.0 EJB 3.2
Servlet 3.1
Portable Extensions
JSF 2.2 JAX-RS 2.0
Bea
n Va
lidat
ion
1.1
JMS 2.0 JPA 2.1
EL 3.0
JTA 1.2
JSP 2.2
Interceptors 1.1 CDI 1.1 Common Annotations 1.1
Java Caching API (JSR 107)
Batch Applications (JSR 352)
Java API for JSON (JSR 353)
Java API for WebSocket (JSR 356)
Java EE 7 – Specification Status
✔ Early/Public Drafts Available
✔
✔
✔ ✔ ✔
✔
✔
✔
✔ ✔
✔
✔
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 61
4.0 Java EE 7 – Implementation Status
download.java.net/glassfish/4.0/promoted/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 62
Java EE 8 and beyond
§ Deliver cloud architecture
§ Multi tenancy for SaaS applications
§ Incremental delivery of JSRs
§ Modularity based on Jigsaw (SE 9)
Standards-based cloud programming model
Java EE 7
PaaS Enablement
Multi- tenancy
NoSQL
JSON-B
State Management Avatar
Concurrency
Storage
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 63
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 64
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 65
References § Herb Sutter
– http://www.gotw.ca/publications/concurrency-ddj.htm – http://herbsutter.com/welcome-to-the-jungle
§ Jason Robert Carey Patterson – http://www.lighterra.com/papers/modernmicroprocessors
§ Ulrich Drepper – http://lwn.net/Articles/250967
§ Cliff Click – http://www.infoq.com/presentations/click-crash-course-modern-hardware
§ James Gosling – http://dl.acm.org/citation.cfm?id=620728
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 66
Acknowledgments § Much of the content of this presentation is taken from various
JavaOne and Oracle OpenWorld 2012 slide decks. § Thanks to..
Hasan Rizvi, Georges Saab, Henrik Stahl, Nandini Ramani, Cameron Purdy, Mark Reinhold, Brian Goetz, Richard Bair, ArunGupta, Simon Ritter, Tomas Nilsson, Marcus Lagergren, Marcus Hirt, Staffan Friberg, David Keenan, Scott Kovatch, John Clingan, John Rose, Milton Smith, Joe Darcy, Stuart Marks…and anybody else I missed.
§ Thanks also.. – James Gosling – ‘The Feel of Java’ and a lot more J – John Rose / JVM Languages Summit – ‘Vitruvian Duke’ graphic – Jim Waldo – ‘Highlander Fallacy’ reference – Bjarne Stroustup - quotes – http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html