SlideShare a Scribd company logo
1 of 43
Download to read offline
© 2012 IBM Corporation
We can do better, IBM's vision for the next generation of Java runtimes
John Duimovich
IBM Distinguished Engineer
Java CTO
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
About me
IBM Java CTO, responsible for all IBM Java runtimes
25 years experience developing virtual machines, runtimes, tools
Developer of J9, IBM's high performance production JVM
Eclipse Tools PMC lead
john_duimovich@ca.ibm.com
http://duimovich.blogspot.com
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Proposed talk (the bait)
Title: "We can do better - IBM's vision for the next generation of Java runtimes"
Abstract: There is no question that the Java platform is successful. There are mature high performance
runtimes, a rich ecosystem with extensive libraries, a tools ecosystem and broad innovative community
supporting the platform. Even with all these great things, software development remains difficult, the
reuse of components elusive and new runtime requirements for cloud, multicore, big data, and security
are pushing the limits of these runtimes. Leveraging modularity and service architectures, coupled with
runtime enhancements, we can enable continued innovation while maintaining compatibility, improving
performance and making it easier to create, evolve and reuse software components.
A technology perspective on what needs to change in Java to address the challenges of producing
modular software in the future
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Todays talk (the switch)
1. Assess
– Java, OSGi and the ecosystem today
2. Mock (nicely)
– If we’re so smart, why do we do stupid things ?
3. Hope
– Opportunities for Java and modularity solving next generation problems
4. Profit !
– Exercise for the audience
4
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java today
Java is a mature ecosystem
High performance and reliable runtimes
Rich set of developer friendly tools, libraries
Large developer friendly ecosystem
– Eclipse, Apache, OSGi
Java is perfect !
Perfect ?
(@#$%^*)
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java's not done
Developers face big challenges
– “Cloud” - virtualization, footprint/density, runtime dynamism
– “Big*.*” - data, threads, memory, scale out, scale up
– Security - critical to connected software and hard to get right
– Compatibility – need to innovate and protect existing investment in code and tools
– Plus … mobile , polyglot , development efficiency, simplicity, software lifecycle
– Java needs to evolve and address the new reality of increased complexity
• Eclipse and OSGi will play a large role in developing the solutions
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java Platform Evolution
– 2011
– Java 7 - Scripting (JSR 292), concurrency libraries, new “new I/O”
–2013
– Java 8 – Lambda, Date/Time,
– Smaller SE profiles (Full + Compact 1-2-3)
–2015
–Java 9 – Modularity and ???
Too fast ?
Too slow ?
Innovation ?
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java needs …
Cloud, Big*.*, Security and retain Compatibility
Plus the wish list
– Runtime resource control {memory, sockets, files} scoped by {context, module}
– Runtime capabilities use {locks, threads, finalization} scoped by {context, modules}
– Language extensions for new primitive types (value types) and packed data formats
– High performance memory model primitives for improved parallelism (no unsafe)
– High performance Foreign Function Interface(FFI) and “Structs”, a better Java Native Interface (JNI)
– Reified generics and true lambdas
– Large arrays, restartable exceptions, read-only objects, unsigned ints
– … and 200 other things
You may argue the list at your leisure but we likely agree on:
a module system for good software engineering support and functional enhancements
8
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
What do I care about ?
9
Cloud !
SimplicityPerformance
Software
Engineering
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better… 10
Java for Cloud
Some
Innovation
Required
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
IBM HTTP
Server
WebSphere
Application
Server
IBM HTTP
Server
WebSphere
Application
Server
WebSphere
Application
Server
WebSphere
eXtreme Scale
WebSphere
eXtreme Scale
DB2
LDAP
Monitoring
Life cycle
management
11
The Patterns Approach: “exe for the Cloud”
Workload Pattern Virtual Application Instance
Load
balancer
WAS cluster configured with session replicationInitial instance = 3
Database
Web Application
Scaling Policy
User Registry
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java Application
Java Runtime
Operating System
IBM Application Pattern for Java in the IBM PureApplication System
Build
• Dependencies for fit for purpose application
• Templates to create your own PaaS
• Dynamic profile for cloud environment
• M Bean and Health Center monitoring
• Pre-configured for a cloud environment
• CPU, memory, storage and network monitoring
Monitor
Deploy
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Driving High Density Java in the cloud
Hardware
OS Images
Middleware
Application
Hardware
OS Images
Middleware
Application
Hardware
OS Image
Middleware
Application
Hardware
OS Image
Middleware (e.g. WAS)
Application
Share-nothing
(maximum isolation)
Shared hardware Shared OS Shared Process
Hardware
OS Image
Middleware (e.g. WAS)
Application
Tenant
Share-everything
(maximum sharing)
Isolation
Density
-Xshareclasses -Xshareclasses
Isolate API
Mission critical
apps
free apps
1+ GB / tenant 100’’’’s MB / tenant1+ GB / tenant 10’’’’s MB / tenant 10’’’’s KB / tenant
Shared memory, shared CPU
13
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Driving High Density Java in Virtualized Environments
Modularity ?
Cooperate ExploitShare More Use Less
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
“Liberty” Profile – For Web, OSGi and Mobile Apps
Developer First Focus
• Fast easy setup
• Simple server configuration
• Integrated Eclipse AppDev tools
• No restart required code changes
Dynamic Modular Runtime
• Dynamic configuration
• “Right-sized” app profiles
• Lifecycle support
A highly composable, dynamic server profile
Lightweight runtime for Cloud
• Web profile server <50 MB zip
• Small memory footprint < 50 MB
• Fast server start times: < 2 secs
WAS v8.5
Liberty Profile
feature
manager
http
transport
app
manager
servlet-3.0
appSecurity
-1.0
Jaxrs-1.0
restConnector-
1.0
jpa-2.0
Standards Based Modularity for Cloud
• Java EE++ built on OSGi modules and
services
• Modularity now (Java SE 6 and up)
Use Less
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
How did we get where we are today ?
16
If we’re so smart, why do we
*
do stupid things
**
?
*we == polite technical term for “the industry”
** example – insults in keynote
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
OSGi is great technology
Solves a really hard problem
– Enhanced Java with enforced Modularity, a Service oriented architecture, and dynamic module
Lifecycle management
Modularity is goodness
Decomposition of large software systems
Modules as a software building component
Provisioning and deployment
Version and configuration management
Explicit dependencies allow users to reason about modules
Adopted by essentially all Enterprise Middleware Servers
– Multiple implementations validate specification quality
Supported by ecosystem of tools and runtime implementations
– Eclipse, Netbeans, Apache, Bndtools and others
Service Architecture to decouple dependencies, enable lifecycle
– Service Registry decouples service consumers from service providers
Evolving to distributed cloud services
– OSGi Remote Services and Remote Service Admin
? OSGi is perfect !
17
Perfect ?
(@#$%^*)
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
OSGi and Java
OSGi provides advanced modularity built on infrastructure not optimized for modules
Java has basic modularity (aka encapsulation) features
– Classes, Packages and public/default/protected
– No module groupings for deployment, visibility control is insufficient
– No versioning information (serialVersionUID notwithstanding)
OSGi has worked within the limits of the Java platform
– Class loaders as the base mechanism to create a module system is powerful but complex
– “User space” classloaders, result in performance issues, complex implementations, heavyweight
– Fragile as implementations deal with corner cases (unspecified concurrency rules)
OSGi is powerful and solves complex problems but suffers because of Java’s limitations
– The JVM guy says “hey ! the JVM can help … “
Lets try to get modularity enhancements for OSGi into Java and the JVM… It’s time
18
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
JVM support for modularity ?
Imagine if you had JVM support for modularity implementations
– “instant on” , shareable component, enhanced isolation, resource management, API evolution”
– Enhancing security via layered additional control capabilities scoped by modularity
– Plus a free unicorn with every runtime
What do you need for this ?
– Module brokered class loading with proper support and clear semantics for trouble spots
• “Class.forName” and Thread context classloaders
– Deterministic high performance JVM class resolution and load
– If you run lots of Java code between the JVM and a class resolution at runtime you lose
• Need to pursue a cacheable - predictable location for all resolved classes while still enabling
dynamic runtime facilities like ByteCode Instrumentation (BCI)
Do we need a new module system ?
– No, but we could really use JVM support for building modular runtimes
19
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Simplify !
(I have no concrete suggestions except OSGi implentations and Eclipse tools should address this)
– In this case DON’T ASK A JVM GUY - JVM classloading, verify, and other errors also mystifying
20
Constraint violation for package 'bar' when resolving
module 11.0 between existing import 8.0.bar BLAMED ON
[[11.0] package;
(&(package=bar)(version>=1.0.0)(!(version>=2.0.0)))]
and uses constraint 10.0.bar BLAMED ON [[11.0] package;
(&(package=foo)(version>=1.0.0)(!(version>=2.0.0))),
[9.0] package;
(&(package=boz)(version>=1.0.0)(!(version>=2.0.0)))]
OSGi is powerful, deals with complex issues but needs to address simplicity
– Some implementations of OSGi have error messages that are worse that C++ errors
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Opportunities
21
Java and OSGi
Solving next generation problems
and driving adoption
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Innovation and Java
Innovation won’t wait for any particular technology
– Rate and pace of innovation is accelerating and much of it outside of Java
– Java and OSGi need to move faster for Cloud, Big *.* game changers
– “What have you done lately” - key to staying relevant
– OSGi, Eclipse, Apache are in a great position to solve big problems
Blame “compatibility” or standards bodies speed or open source groups or IBM or Oracle
– It’s a myth that “Java can’t change, because it’s too <insert favourite excuse> “
22
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Opportunities
Compatibility
– cripples innovation or innovation to solve compatibility ?
Multi-tenancy
– Critical to cost efficiency in cloud scenarios
Optimized runtimes, fit for purpose and “instance on” runtimes
– Performance is not optional
Driving OSGi adoption on new Java profiles
– Embracing Java 8 profiles
Discussions @theBar
23
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Compatibility: two edge sword
Binary Compatibility has been a key strength of Java
– Protect customer investment by “never” breaking code
– Clean API specification ensures evolution of API within specification and TCK
– Ridiculously old code will run unmodified
Supporting “eternal” binary compatibility is difficult
– JVM complexity – old code drives special use cases in JVM
– Code bloat – deprecated is “just a suggestion” and code is loaded whether it’s used or not
24
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Compatibility is hard !
25
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Versioning and Compatibility ?
How can modularity and versioning help here ?
– Meta information about the software and versions contain semantic intent declared by developer
– So what ?
Version information and explicit dependencies are critical to the solution
Versions enable software to reason and use meta-facilities to assist in providing compatibility
Dependencies render explicit what needs to work and what can be “dropped”
Enables thought experiments and optimizations …
What if they don’t use “X” ?
What if all versions loaded > 2.0 ?
26
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Imagine: Version a class or package
API evolution ?
– How about JVM supported field and method rename / rewrite on load ?
– Selective visibility based on compile time versions
– JVM assisted refactoring for complex cases
– Tools help migrate to new version apply source refactoring automatically from metadata in binaries
Serialization robustness ?
– Class versions aware of prior versions and shapes and can provide conversions routines
– Automatic “schema” migration via tools
Optimized deployment ?
– Java instances “strict latest version” mode to ensure up to date platform code from loading
– Optimized instances that offer smaller, faster, efficient deployment
– Unused components not loaded, corner cases removed
• Thread.stop, Thread.suspend, Thread.resume
27
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Technology to help address compatible class evolution ?
public class Example V1.0 {
public void a ();
public void b ();
public int badField;
}
28
public class Example V2.0 {
public void a ();
public void b ();
deprecated V1.0 public int badField;
public int getField()
public void setField(int);
}
public class Example V3.0 {
public void a ();
public void b ();
public int getField()
public void setField(int);
deprecated V1.0-2.0 public int badField map(getField, setField);
}
Oops, don’t use badField
Note: Imaginary Syntax
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Versions to evolve class shapes
29
public class Example V3.0 {
public void a ();
public void b ();
public int getField()
public void setField(int);
deprecated V1.0-2.0 public int badField map(getField, setField);
}
V1.0
client Example
V 3.0
V2.0
V3.0
Recompile
Run, no errors – binary compatibility ok
Compiler Warning:
badField deprecated
Compiler Error:
no member named badField
Re-write rules corrects reference
No mapping needed
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java modularity landscape
Java 8
– Lambda (Closures) are now main feature for Java 8
• Note Lambda includes functionality for API evolution in “defender methods” for interfaces
Modularity moves to Java 9
– Jigsaw development continues with more time to “get it right”
– OpenJDK JEP 161 has proposed Java SE profiles for smaller runtimes in the interim
OSGi has more runway to influence the JVM support for modularity
– Ensuring primitive operations (classloaders++) are supported to better support OSGi (Penrose)
– Influence Jigsaw architecture to ensure separation of concerns for module system independence
– Seamless OSGi on all JDKs with high performance now
30
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Penrose
Project Penrose's goal is to demonstrate interoperability between Jigsaw and OSGi
Evolving the JVM to support modularity is the right technical approach
– Getting JVM primitives right is the key to OSGi performance bliss
– Imagine your favorite module system on an optimized JVM foundation
– Collaborator Mailing list to enable discussion between modularity implementers and JVM types
OSGi is established and will continue to be used
– Opportunities to drive adoption, understanding use cases in Java community
– Adoption with customers will drive the future direction
31
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java SE 8 and Profiles
JEP 161 @ OpenJDK is proposing three Java SE profiles execution environments
Eclipse Java tools are already enabled to target a execution environment
OSGi enables easy consumption of new profiles
java.lang
java.io
java.nio
java.text
java.math
java.net
javax.net
java.util
java.util.logging
java.security
javax.crypto
javax.security
32
java.sql
javax.sql
javax.xml
org.w3c.dom
org.xml.sax
java.rmi
javax.rmi
javax.transaction
java.lang.management
javax.management
javax.naming
javax.sql.rowset
javax.security.auth.kerberos
org.ietf.jgss
javax.script
javax.xml.crypto
java.util.prefs
javax.security.sasl
java.security.acl
java.lang.instrument
javax.annotation.processing
javax.lang.model
javax.lang.model.element
javax.lang.model.type
javax.lang.model.util
javax.tools
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Multi-tenancy
JVMs evolution to support isolation within a single JVM
– Single copy of code, multiple copy of static variables
– Resource management within isolation context
The drive to ultra light tenants – 10s of K vs MBs per tenant safely
Tenants
EE Applications
Isolated Modules
One copy of code,
many tenants
Tenant State
Application Code
JVM
Tenant State
Tenant State
Tenant State
Tenant State
Tenant State
Tenant State
Share More
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Sharing
J9 JVMs using sharing to reduce costs
– Shared classes cache for read-only shared artifacts (bytecodes)
– Dynamic AOT - reuse JIT code from multiple JVMs
– Reduce memory use by 20%, improve startup time 10-30 %
Cloud ?
– 100-500 JVMs starting up at the same time
JVM
JVM
JVM
JVM
JVM
Shared Classes Cache
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
AOT – Ahead Of Time
(JIT code saved for next JVM)
Verified bytecodes
JVM shared index
Compile code
once, run faster !
Share More
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
OSGi and Multi-tenancy
Shared Code is critical to size reductions
– Key to sharing is correctly identifying exact same versions, shapes across multiple uses boundaries
Multi-tenancy use cases
– Single copy of code, with multiple copies of statics (these used to be called DLLs)
– Isolation of state within a single JVM
– Bundles have key properties that could help improve this usecase (Versions, Lifecycle)
OSGi as an enabler for converting modules to support various multi-tenant usage models ?
– Single copy of application code, private per tenant data
– Single copy or (master) middleware managing resource across multiple tenants
– Lifecycle phases to support master-initialize, tenant-initialize, tenant-stop, tenant-restart
– Module boundary for memory use, resource use, security
35
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Today: Isolating Statics Through Class Loaders
Isolation through the “usual” class loader tricks
– Every time you load a tenant, use a new class loader
– Statics are now no longer shared!
36
Class
Loader
Class
AClass
AClass
A
Tenant1
Class
Loader
Class
AClass
AClass
A
Tenant2
Class
Loader
Class
AClass
AClass
X
Master Tenant
Share More
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Today: Isolating Statics Through Class Loaders
Isolation through the usual class loader tricks
– Every time you load a tenant, stick it in a new class loader
– Statics are now no longer shared!
37
Class
Loader
Class
AClass
AClass
A
Tenant1
Class
Loader
Class
AClass
AClass
A
Tenant2
Class
Loader
Class
AClass
AClass
X
Master Tenant
Plenty of duplication!
– Class data
– JITted code
– Duplicated static variables, most of which are likely identical
Share More
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Solving the Data Isolation Challenge
38
We’ve enabled our JVM to understand isolation contexts and show each context a different
view of static variables
Using the @TenantScope annotation.
@TenantScope Semantics: Static variable values are stored per-tenant
Each tenant has their own LocaleSettings.defaultLocale
Now many tenants can share a single LocaleSettings class
…
LocaleSettings.setDefaultLocale(
LocaleSettings.UK );
…
Tenant1
Tenant2
…
LocaleSettings.setDefaultLocale(
LocaleSettings.USA );
…
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Can we support isolating statics with OSGi ?
Enhance OSGi to enable static state isolation
– Leverage JVM support for isolation of state
– Bundles with new sharing options ala @TenantScope ?
– New Lifecycle (attach / detach) to tenant ?
39
Statics for A
Tenant1
Class
Loader
Class
AClass
AClass
X
Master Tenant
No code duplication
– Single copy of class data
– Single copy of JITted code
– Optional shared state across bundles
Class
Loader
Class
AClass
AClass
A
Bundle
Statics for A
Tenant3
Statics for A
Tenant1
JVM Magic
JVM “isolates” - each
gets it’s own static
variables
Share More
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Dynamic Behavior
Dynamic memory resize, processor reallocation and app migration
– JVM will react in real time to resource events
– Integration across JVM/OS/HV for best performance
Hypervisor
OS OSOSOSOS
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
JVM
“Resize
LPAR”
Reallocate memory fast
“Migrate application”
“App migration 2x faster”
“reallocate CPUs ”
“Resize thread pool”
“JMX”
Cooperate
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
OSGi – Supporting more Dynamic Behaviour with Reconfiguration
Intelligent runtimes
– Automatically scale to the right resource levels and dynamically adjust for QoS needs
– Coordination across JVM, Hypervisors and Operating Systems
– OSGi already has the concept of lifecycle
• start, stop
– Extend lifecycle to support a new events common for Cloud
• Attache/Detach Tenant
• Memory resized by the OS or hypervisor
• vCPU allocation changes
• Application is being live migrated to new location
Dynamic Modular Profiles
– Modularity for right sized platforms, fast start, smaller footprint
– Self-install and configure just the right components
41
Intelligent Runtimes
Dynamic Modular Profiles
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
Java is a team sport
Java is still a community effort
– Eclipse, Apache and even OpenJDK
Java Innovations hand in hand with Eclipse and OSGi innovation
– Cloud: multi-tenancy, sharing, dealing with dynamic behaviour
– Compatibility: new use cases for leveraging semantic versioning
– Performance: Drive optimization benefits from explicit dependencies model
– Software Engineering discipline paying dividends
© 2012 IBM Corporation
EclipseCon Europe 2012 We can do better…
IBM.says(““““Thank you””””);
43
Cooperate ExploitShare More Use Less

More Related Content

What's hot

ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp
 
Migrating Legacy Code
Migrating Legacy CodeMigrating Legacy Code
Migrating Legacy Code
Siddhi
 
Introduction to the IBM AS/400
Introduction to the IBM AS/400Introduction to the IBM AS/400
Introduction to the IBM AS/400
tvlooy
 

What's hot (20)

ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
 
Migrating Legacy Code
Migrating Legacy CodeMigrating Legacy Code
Migrating Legacy Code
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVM
 
Concierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesConcierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded Devices
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
 
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
 
Websphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open SourceWebsphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open Source
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Automation framework design and implementation
Automation framework design and implementationAutomation framework design and implementation
Automation framework design and implementation
 
Java withrealworldtechnology
Java withrealworldtechnologyJava withrealworldtechnology
Java withrealworldtechnology
 
Introduction to the IBM AS/400
Introduction to the IBM AS/400Introduction to the IBM AS/400
Introduction to the IBM AS/400
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
QCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application DevelopmentQCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application Development
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Lec 3 01_aug13
Lec 3 01_aug13Lec 3 01_aug13
Lec 3 01_aug13
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and more
 
itft-Java evolution
itft-Java evolutionitft-Java evolution
itft-Java evolution
 

Similar to We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - John Duimovich

DOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M usersDOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M users
Yoav Avrahami
 

Similar to We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - John Duimovich (20)

javalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdfjavalightspeed-jakartatech-2023.pdf
javalightspeed-jakartatech-2023.pdf
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
 
Java8 - Under the hood
Java8 - Under the hoodJava8 - Under the hood
Java8 - Under the hood
 
SunMicroSystems
SunMicroSystemsSunMicroSystems
SunMicroSystems
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
Getting Started Developing with Platform as a Service
Getting Started Developing with Platform as a ServiceGetting Started Developing with Platform as a Service
Getting Started Developing with Platform as a Service
 
Sunstate
SunstateSunstate
Sunstate
 
Java, app servers and oracle application grid
Java, app servers and oracle application gridJava, app servers and oracle application grid
Java, app servers and oracle application grid
 
Transforming Mission Critical Applications
Transforming Mission Critical ApplicationsTransforming Mission Critical Applications
Transforming Mission Critical Applications
 
Minor
MinorMinor
Minor
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?
 
Emc sql server 2012 overview
Emc sql server 2012 overviewEmc sql server 2012 overview
Emc sql server 2012 overview
 
DOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M usersDOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M users
 
JavaOne 2015 Keynote Presentation
JavaOne 2015 Keynote PresentationJavaOne 2015 Keynote Presentation
JavaOne 2015 Keynote Presentation
 
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)Is Enterprise Java Still Relevant (JavaOne 2015 session)
Is Enterprise Java Still Relevant (JavaOne 2015 session)
 
Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...Microservices, Data Services and Containers for Cloud Native Architectures (D...
Microservices, Data Services and Containers for Cloud Native Architectures (D...
 
Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8
 
Enterprise java unit-1_chapter-1
Enterprise java unit-1_chapter-1Enterprise java unit-1_chapter-1
Enterprise java unit-1_chapter-1
 

More from mfrancis

Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - John Duimovich

  • 1. © 2012 IBM Corporation We can do better, IBM's vision for the next generation of Java runtimes John Duimovich IBM Distinguished Engineer Java CTO
  • 2. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… About me IBM Java CTO, responsible for all IBM Java runtimes 25 years experience developing virtual machines, runtimes, tools Developer of J9, IBM's high performance production JVM Eclipse Tools PMC lead john_duimovich@ca.ibm.com http://duimovich.blogspot.com
  • 3. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Proposed talk (the bait) Title: "We can do better - IBM's vision for the next generation of Java runtimes" Abstract: There is no question that the Java platform is successful. There are mature high performance runtimes, a rich ecosystem with extensive libraries, a tools ecosystem and broad innovative community supporting the platform. Even with all these great things, software development remains difficult, the reuse of components elusive and new runtime requirements for cloud, multicore, big data, and security are pushing the limits of these runtimes. Leveraging modularity and service architectures, coupled with runtime enhancements, we can enable continued innovation while maintaining compatibility, improving performance and making it easier to create, evolve and reuse software components. A technology perspective on what needs to change in Java to address the challenges of producing modular software in the future
  • 4. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Todays talk (the switch) 1. Assess – Java, OSGi and the ecosystem today 2. Mock (nicely) – If we’re so smart, why do we do stupid things ? 3. Hope – Opportunities for Java and modularity solving next generation problems 4. Profit ! – Exercise for the audience 4
  • 5. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java today Java is a mature ecosystem High performance and reliable runtimes Rich set of developer friendly tools, libraries Large developer friendly ecosystem – Eclipse, Apache, OSGi Java is perfect ! Perfect ? (@#$%^*)
  • 6. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java's not done Developers face big challenges – “Cloud” - virtualization, footprint/density, runtime dynamism – “Big*.*” - data, threads, memory, scale out, scale up – Security - critical to connected software and hard to get right – Compatibility – need to innovate and protect existing investment in code and tools – Plus … mobile , polyglot , development efficiency, simplicity, software lifecycle – Java needs to evolve and address the new reality of increased complexity • Eclipse and OSGi will play a large role in developing the solutions
  • 7. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java Platform Evolution – 2011 – Java 7 - Scripting (JSR 292), concurrency libraries, new “new I/O” –2013 – Java 8 – Lambda, Date/Time, – Smaller SE profiles (Full + Compact 1-2-3) –2015 –Java 9 – Modularity and ??? Too fast ? Too slow ? Innovation ?
  • 8. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java needs … Cloud, Big*.*, Security and retain Compatibility Plus the wish list – Runtime resource control {memory, sockets, files} scoped by {context, module} – Runtime capabilities use {locks, threads, finalization} scoped by {context, modules} – Language extensions for new primitive types (value types) and packed data formats – High performance memory model primitives for improved parallelism (no unsafe) – High performance Foreign Function Interface(FFI) and “Structs”, a better Java Native Interface (JNI) – Reified generics and true lambdas – Large arrays, restartable exceptions, read-only objects, unsigned ints – … and 200 other things You may argue the list at your leisure but we likely agree on: a module system for good software engineering support and functional enhancements 8
  • 9. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… What do I care about ? 9 Cloud ! SimplicityPerformance Software Engineering
  • 10. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… 10 Java for Cloud Some Innovation Required
  • 11. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… IBM HTTP Server WebSphere Application Server IBM HTTP Server WebSphere Application Server WebSphere Application Server WebSphere eXtreme Scale WebSphere eXtreme Scale DB2 LDAP Monitoring Life cycle management 11 The Patterns Approach: “exe for the Cloud” Workload Pattern Virtual Application Instance Load balancer WAS cluster configured with session replicationInitial instance = 3 Database Web Application Scaling Policy User Registry
  • 12. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java Application Java Runtime Operating System IBM Application Pattern for Java in the IBM PureApplication System Build • Dependencies for fit for purpose application • Templates to create your own PaaS • Dynamic profile for cloud environment • M Bean and Health Center monitoring • Pre-configured for a cloud environment • CPU, memory, storage and network monitoring Monitor Deploy
  • 13. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Driving High Density Java in the cloud Hardware OS Images Middleware Application Hardware OS Images Middleware Application Hardware OS Image Middleware Application Hardware OS Image Middleware (e.g. WAS) Application Share-nothing (maximum isolation) Shared hardware Shared OS Shared Process Hardware OS Image Middleware (e.g. WAS) Application Tenant Share-everything (maximum sharing) Isolation Density -Xshareclasses -Xshareclasses Isolate API Mission critical apps free apps 1+ GB / tenant 100’’’’s MB / tenant1+ GB / tenant 10’’’’s MB / tenant 10’’’’s KB / tenant Shared memory, shared CPU 13
  • 14. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Driving High Density Java in Virtualized Environments Modularity ? Cooperate ExploitShare More Use Less
  • 15. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… “Liberty” Profile – For Web, OSGi and Mobile Apps Developer First Focus • Fast easy setup • Simple server configuration • Integrated Eclipse AppDev tools • No restart required code changes Dynamic Modular Runtime • Dynamic configuration • “Right-sized” app profiles • Lifecycle support A highly composable, dynamic server profile Lightweight runtime for Cloud • Web profile server <50 MB zip • Small memory footprint < 50 MB • Fast server start times: < 2 secs WAS v8.5 Liberty Profile feature manager http transport app manager servlet-3.0 appSecurity -1.0 Jaxrs-1.0 restConnector- 1.0 jpa-2.0 Standards Based Modularity for Cloud • Java EE++ built on OSGi modules and services • Modularity now (Java SE 6 and up) Use Less
  • 16. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… How did we get where we are today ? 16 If we’re so smart, why do we * do stupid things ** ? *we == polite technical term for “the industry” ** example – insults in keynote
  • 17. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… OSGi is great technology Solves a really hard problem – Enhanced Java with enforced Modularity, a Service oriented architecture, and dynamic module Lifecycle management Modularity is goodness Decomposition of large software systems Modules as a software building component Provisioning and deployment Version and configuration management Explicit dependencies allow users to reason about modules Adopted by essentially all Enterprise Middleware Servers – Multiple implementations validate specification quality Supported by ecosystem of tools and runtime implementations – Eclipse, Netbeans, Apache, Bndtools and others Service Architecture to decouple dependencies, enable lifecycle – Service Registry decouples service consumers from service providers Evolving to distributed cloud services – OSGi Remote Services and Remote Service Admin ? OSGi is perfect ! 17 Perfect ? (@#$%^*)
  • 18. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… OSGi and Java OSGi provides advanced modularity built on infrastructure not optimized for modules Java has basic modularity (aka encapsulation) features – Classes, Packages and public/default/protected – No module groupings for deployment, visibility control is insufficient – No versioning information (serialVersionUID notwithstanding) OSGi has worked within the limits of the Java platform – Class loaders as the base mechanism to create a module system is powerful but complex – “User space” classloaders, result in performance issues, complex implementations, heavyweight – Fragile as implementations deal with corner cases (unspecified concurrency rules) OSGi is powerful and solves complex problems but suffers because of Java’s limitations – The JVM guy says “hey ! the JVM can help … “ Lets try to get modularity enhancements for OSGi into Java and the JVM… It’s time 18
  • 19. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… JVM support for modularity ? Imagine if you had JVM support for modularity implementations – “instant on” , shareable component, enhanced isolation, resource management, API evolution” – Enhancing security via layered additional control capabilities scoped by modularity – Plus a free unicorn with every runtime What do you need for this ? – Module brokered class loading with proper support and clear semantics for trouble spots • “Class.forName” and Thread context classloaders – Deterministic high performance JVM class resolution and load – If you run lots of Java code between the JVM and a class resolution at runtime you lose • Need to pursue a cacheable - predictable location for all resolved classes while still enabling dynamic runtime facilities like ByteCode Instrumentation (BCI) Do we need a new module system ? – No, but we could really use JVM support for building modular runtimes 19
  • 20. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Simplify ! (I have no concrete suggestions except OSGi implentations and Eclipse tools should address this) – In this case DON’T ASK A JVM GUY - JVM classloading, verify, and other errors also mystifying 20 Constraint violation for package 'bar' when resolving module 11.0 between existing import 8.0.bar BLAMED ON [[11.0] package; (&(package=bar)(version>=1.0.0)(!(version>=2.0.0)))] and uses constraint 10.0.bar BLAMED ON [[11.0] package; (&(package=foo)(version>=1.0.0)(!(version>=2.0.0))), [9.0] package; (&(package=boz)(version>=1.0.0)(!(version>=2.0.0)))] OSGi is powerful, deals with complex issues but needs to address simplicity – Some implementations of OSGi have error messages that are worse that C++ errors
  • 21. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Opportunities 21 Java and OSGi Solving next generation problems and driving adoption
  • 22. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Innovation and Java Innovation won’t wait for any particular technology – Rate and pace of innovation is accelerating and much of it outside of Java – Java and OSGi need to move faster for Cloud, Big *.* game changers – “What have you done lately” - key to staying relevant – OSGi, Eclipse, Apache are in a great position to solve big problems Blame “compatibility” or standards bodies speed or open source groups or IBM or Oracle – It’s a myth that “Java can’t change, because it’s too <insert favourite excuse> “ 22
  • 23. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Opportunities Compatibility – cripples innovation or innovation to solve compatibility ? Multi-tenancy – Critical to cost efficiency in cloud scenarios Optimized runtimes, fit for purpose and “instance on” runtimes – Performance is not optional Driving OSGi adoption on new Java profiles – Embracing Java 8 profiles Discussions @theBar 23
  • 24. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Compatibility: two edge sword Binary Compatibility has been a key strength of Java – Protect customer investment by “never” breaking code – Clean API specification ensures evolution of API within specification and TCK – Ridiculously old code will run unmodified Supporting “eternal” binary compatibility is difficult – JVM complexity – old code drives special use cases in JVM – Code bloat – deprecated is “just a suggestion” and code is loaded whether it’s used or not 24
  • 25. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Compatibility is hard ! 25
  • 26. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Versioning and Compatibility ? How can modularity and versioning help here ? – Meta information about the software and versions contain semantic intent declared by developer – So what ? Version information and explicit dependencies are critical to the solution Versions enable software to reason and use meta-facilities to assist in providing compatibility Dependencies render explicit what needs to work and what can be “dropped” Enables thought experiments and optimizations … What if they don’t use “X” ? What if all versions loaded > 2.0 ? 26
  • 27. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Imagine: Version a class or package API evolution ? – How about JVM supported field and method rename / rewrite on load ? – Selective visibility based on compile time versions – JVM assisted refactoring for complex cases – Tools help migrate to new version apply source refactoring automatically from metadata in binaries Serialization robustness ? – Class versions aware of prior versions and shapes and can provide conversions routines – Automatic “schema” migration via tools Optimized deployment ? – Java instances “strict latest version” mode to ensure up to date platform code from loading – Optimized instances that offer smaller, faster, efficient deployment – Unused components not loaded, corner cases removed • Thread.stop, Thread.suspend, Thread.resume 27
  • 28. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Technology to help address compatible class evolution ? public class Example V1.0 { public void a (); public void b (); public int badField; } 28 public class Example V2.0 { public void a (); public void b (); deprecated V1.0 public int badField; public int getField() public void setField(int); } public class Example V3.0 { public void a (); public void b (); public int getField() public void setField(int); deprecated V1.0-2.0 public int badField map(getField, setField); } Oops, don’t use badField Note: Imaginary Syntax
  • 29. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Versions to evolve class shapes 29 public class Example V3.0 { public void a (); public void b (); public int getField() public void setField(int); deprecated V1.0-2.0 public int badField map(getField, setField); } V1.0 client Example V 3.0 V2.0 V3.0 Recompile Run, no errors – binary compatibility ok Compiler Warning: badField deprecated Compiler Error: no member named badField Re-write rules corrects reference No mapping needed
  • 30. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java modularity landscape Java 8 – Lambda (Closures) are now main feature for Java 8 • Note Lambda includes functionality for API evolution in “defender methods” for interfaces Modularity moves to Java 9 – Jigsaw development continues with more time to “get it right” – OpenJDK JEP 161 has proposed Java SE profiles for smaller runtimes in the interim OSGi has more runway to influence the JVM support for modularity – Ensuring primitive operations (classloaders++) are supported to better support OSGi (Penrose) – Influence Jigsaw architecture to ensure separation of concerns for module system independence – Seamless OSGi on all JDKs with high performance now 30
  • 31. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Penrose Project Penrose's goal is to demonstrate interoperability between Jigsaw and OSGi Evolving the JVM to support modularity is the right technical approach – Getting JVM primitives right is the key to OSGi performance bliss – Imagine your favorite module system on an optimized JVM foundation – Collaborator Mailing list to enable discussion between modularity implementers and JVM types OSGi is established and will continue to be used – Opportunities to drive adoption, understanding use cases in Java community – Adoption with customers will drive the future direction 31
  • 32. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java SE 8 and Profiles JEP 161 @ OpenJDK is proposing three Java SE profiles execution environments Eclipse Java tools are already enabled to target a execution environment OSGi enables easy consumption of new profiles java.lang java.io java.nio java.text java.math java.net javax.net java.util java.util.logging java.security javax.crypto javax.security 32 java.sql javax.sql javax.xml org.w3c.dom org.xml.sax java.rmi javax.rmi javax.transaction java.lang.management javax.management javax.naming javax.sql.rowset javax.security.auth.kerberos org.ietf.jgss javax.script javax.xml.crypto java.util.prefs javax.security.sasl java.security.acl java.lang.instrument javax.annotation.processing javax.lang.model javax.lang.model.element javax.lang.model.type javax.lang.model.util javax.tools
  • 33. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Multi-tenancy JVMs evolution to support isolation within a single JVM – Single copy of code, multiple copy of static variables – Resource management within isolation context The drive to ultra light tenants – 10s of K vs MBs per tenant safely Tenants EE Applications Isolated Modules One copy of code, many tenants Tenant State Application Code JVM Tenant State Tenant State Tenant State Tenant State Tenant State Tenant State Share More
  • 34. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Sharing J9 JVMs using sharing to reduce costs – Shared classes cache for read-only shared artifacts (bytecodes) – Dynamic AOT - reuse JIT code from multiple JVMs – Reduce memory use by 20%, improve startup time 10-30 % Cloud ? – 100-500 JVMs starting up at the same time JVM JVM JVM JVM JVM Shared Classes Cache JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM AOT – Ahead Of Time (JIT code saved for next JVM) Verified bytecodes JVM shared index Compile code once, run faster ! Share More
  • 35. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… OSGi and Multi-tenancy Shared Code is critical to size reductions – Key to sharing is correctly identifying exact same versions, shapes across multiple uses boundaries Multi-tenancy use cases – Single copy of code, with multiple copies of statics (these used to be called DLLs) – Isolation of state within a single JVM – Bundles have key properties that could help improve this usecase (Versions, Lifecycle) OSGi as an enabler for converting modules to support various multi-tenant usage models ? – Single copy of application code, private per tenant data – Single copy or (master) middleware managing resource across multiple tenants – Lifecycle phases to support master-initialize, tenant-initialize, tenant-stop, tenant-restart – Module boundary for memory use, resource use, security 35
  • 36. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Today: Isolating Statics Through Class Loaders Isolation through the “usual” class loader tricks – Every time you load a tenant, use a new class loader – Statics are now no longer shared! 36 Class Loader Class AClass AClass A Tenant1 Class Loader Class AClass AClass A Tenant2 Class Loader Class AClass AClass X Master Tenant Share More
  • 37. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Today: Isolating Statics Through Class Loaders Isolation through the usual class loader tricks – Every time you load a tenant, stick it in a new class loader – Statics are now no longer shared! 37 Class Loader Class AClass AClass A Tenant1 Class Loader Class AClass AClass A Tenant2 Class Loader Class AClass AClass X Master Tenant Plenty of duplication! – Class data – JITted code – Duplicated static variables, most of which are likely identical Share More
  • 38. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Solving the Data Isolation Challenge 38 We’ve enabled our JVM to understand isolation contexts and show each context a different view of static variables Using the @TenantScope annotation. @TenantScope Semantics: Static variable values are stored per-tenant Each tenant has their own LocaleSettings.defaultLocale Now many tenants can share a single LocaleSettings class … LocaleSettings.setDefaultLocale( LocaleSettings.UK ); … Tenant1 Tenant2 … LocaleSettings.setDefaultLocale( LocaleSettings.USA ); …
  • 39. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Can we support isolating statics with OSGi ? Enhance OSGi to enable static state isolation – Leverage JVM support for isolation of state – Bundles with new sharing options ala @TenantScope ? – New Lifecycle (attach / detach) to tenant ? 39 Statics for A Tenant1 Class Loader Class AClass AClass X Master Tenant No code duplication – Single copy of class data – Single copy of JITted code – Optional shared state across bundles Class Loader Class AClass AClass A Bundle Statics for A Tenant3 Statics for A Tenant1 JVM Magic JVM “isolates” - each gets it’s own static variables Share More
  • 40. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Dynamic Behavior Dynamic memory resize, processor reallocation and app migration – JVM will react in real time to resource events – Integration across JVM/OS/HV for best performance Hypervisor OS OSOSOSOS JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM “Resize LPAR” Reallocate memory fast “Migrate application” “App migration 2x faster” “reallocate CPUs ” “Resize thread pool” “JMX” Cooperate
  • 41. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… OSGi – Supporting more Dynamic Behaviour with Reconfiguration Intelligent runtimes – Automatically scale to the right resource levels and dynamically adjust for QoS needs – Coordination across JVM, Hypervisors and Operating Systems – OSGi already has the concept of lifecycle • start, stop – Extend lifecycle to support a new events common for Cloud • Attache/Detach Tenant • Memory resized by the OS or hypervisor • vCPU allocation changes • Application is being live migrated to new location Dynamic Modular Profiles – Modularity for right sized platforms, fast start, smaller footprint – Self-install and configure just the right components 41 Intelligent Runtimes Dynamic Modular Profiles
  • 42. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… Java is a team sport Java is still a community effort – Eclipse, Apache and even OpenJDK Java Innovations hand in hand with Eclipse and OSGi innovation – Cloud: multi-tenancy, sharing, dealing with dynamic behaviour – Compatibility: new use cases for leveraging semantic versioning – Performance: Drive optimization benefits from explicit dependencies model – Software Engineering discipline paying dividends
  • 43. © 2012 IBM Corporation EclipseCon Europe 2012 We can do better… IBM.says(““““Thank you””””); 43 Cooperate ExploitShare More Use Less