SlideShare a Scribd company logo
Why Doesn’t Java Have
Instant Turnaround?
Anton Arhipov | ZeroTurnaround
whoami

Anton Arhipov
JRebel
ZeroTurnaround


         http://arhipov.blogspot.com
                      @antonarhipov
                          @javarebel
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Turnaround Cycle


                            Check
      Make a
                             the
      change
                           change

               Build, de
               ploy, wai
                   t
Diversity
Vendors
Standards




            Operations




      dev <<    PROD
Turnaround Cycle


                            Check
      Make a
                             the
      change
                           change

               Build, de
               ploy, wai
                   t
Turnaround Time Sink

                          Navigation

                 OOMApplication
                       deployment

       Container startup time
Container Startup Time
http://dow.ngra.de/2010/12/14/jee-oss-container-startup-times-apples-vs-oranges/
http://zeroturnaround.com/java-ee-productivity-report-2011/
http://zeroturnaround.com/java-ee-productivity-report-2011/
Build


                            Check
        Make a
                             the
        change
                           change

                  Build,
                 deploy,
                   wait
Build
             Resolve dependencies

             Copy static resources

                Compile classes

           Package modules into JARs

        Package everything into WAR/EAR
Exploded Directory Deployment
Jetty Launcher
public class Launcher {

    public static void main(String[] args) {

        Server server = new Server();

        SelectChannelConnector connector
                             = new SelectChannelConnector();
        connector.setPort(8080);
        server.addConnector(connector);

        WebAppContext context = new WebAppContext("war", "/");
        server.setHandler(context);
        server.start();

    }

}
“…I know about JRebel, but I cannot
pay for it, so I tried Maven…”
                          - Stackoverflow
This works:
mvn jetty:run
  others?
getResource(“hello.html”)   read(“src/main/.../hello.html”)
Build

             Resolve dependencies

             Copy static resources

                Compile classes

           Package modules into JARs

        Package everything into WAR/EAR
Build

             Resolve dependencies

             Copy static resources

             Compile classes
           Package modules into JARs

        Package everything into WAR/EAR
Why Code Reloading is Hard?
Why Code Reloading is Hard?


 Externalized       Temporary

              State

  Serializable        Derivative
How To Reload a Class?

           OldClassLoader         NewClassLoader




      MyObject.class                     MyObject.class




                       Recreate object
     MyObject                                    MyObject
Serialize/deserialize


                                               init()
       Session                       Session

             Sevlet            New         Sevlet
Classes
                              Classes
                 App                           App
                                New            State
Libraries        State
                              Libraries

   OldClassLoader                NewClassLoader
Session                  Session

           Sevlet       New         Sevlet
Classes
                       Classes
               App                      App
                         New            State
               State
                       Libraries

  OldClassLoader         NewClassLoader
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Component State


                   New        New
Class     Object
                   Class     Object


 Old Component      New Component
  ClassLoader        ClassLoader
HotSwap
                                           Make changes in IDE


        OldClassLoader




    MyObject.class
     New
                         HotSwap
     Code code
                                                Debugger
     111000100
     101000101
     101010010
     100010010                 New code
                               111000100
                               101010010



  MyObject
JRebel vs HotSwap
                               HotSwap   JRebel
Changing method bodies           +         +
Adding/removing methods          -         +
Adding/removing constructors     -         +
Adding/removing fields           -         +
Adding/removing classes          -         +
Adding/removing annotations      -         +
Replacing superclass             -         -
Adding/removing implemented      -         -
interfaces
JRebel
                                               Make changes in IDE


                  OldClassLoader
Framework



              MyObject.class
               Code
               101000101
                                   New code
                                                  JRebel
               100010010
                                   111000100
                                   101010010



            MyObject
                                      Configuration
                                   (XML, annotations,..)
in action
Oh ...
The Acid is Kicking In




      Questions?
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Remoting BETA
http://arhipov.blogspot.com
             @antonarhipov
                 @javarebel

More Related Content

PPTX
Mastering Java Bytecode - JAX.de 2012
KEY
Mashups with Drupal and QueryPath
PPTX
Mastering java bytecode with ASM - GeeCON 2012
PPTX
Java Bytecode For Discriminating Developers - GeeCON 2011
PDF
Using Java from Ruby with JRuby IRB
PDF
Connecting the Worlds of Java and Ruby with JRuby
PPTX
JRuby in Java Projects
KEY
JavaOne 2011 - JVM Bytecode for Dummies
Mastering Java Bytecode - JAX.de 2012
Mashups with Drupal and QueryPath
Mastering java bytecode with ASM - GeeCON 2012
Java Bytecode For Discriminating Developers - GeeCON 2011
Using Java from Ruby with JRuby IRB
Connecting the Worlds of Java and Ruby with JRuby
JRuby in Java Projects
JavaOne 2011 - JVM Bytecode for Dummies

What's hot (20)

PDF
JRuby and You
PPTX
Mastering Java Bytecode With ASM - 33rd degree, 2012
PPT
Building a java tracer
PPT
55 New Features in Java 7
PDF
Spring into rails
PDF
JVM for Dummies - OSCON 2011
PDF
JavaScript Library Overview
PDF
Oredev 2015 - Taming Java Agents
PDF
What to expect from Java 9
PDF
Beyond JVM - YOW! Sydney 2013
PDF
Code lifecycle in the jvm - TopConf Linz
PPTX
Java 7 Whats New(), Whats Next() from Oredev
PDF
Inside the JVM - Follow the white rabbit!
PDF
Productive Programming in Java 8 - with Lambdas and Streams
PDF
Smart Migration to JDK 8
PPTX
Ahead-Of-Time Compilation of Java Applications
PDF
Soft-Shake 2016 : Jigsaw est prêt à tuer le classpath
ODP
Open Source Compiler Construction for the JVM
PDF
Modern Programming in Java 8 - Lambdas, Streams and Date Time API
PDF
Introduction to the Java bytecode - So@t - 20130924
JRuby and You
Mastering Java Bytecode With ASM - 33rd degree, 2012
Building a java tracer
55 New Features in Java 7
Spring into rails
JVM for Dummies - OSCON 2011
JavaScript Library Overview
Oredev 2015 - Taming Java Agents
What to expect from Java 9
Beyond JVM - YOW! Sydney 2013
Code lifecycle in the jvm - TopConf Linz
Java 7 Whats New(), Whats Next() from Oredev
Inside the JVM - Follow the white rabbit!
Productive Programming in Java 8 - with Lambdas and Streams
Smart Migration to JDK 8
Ahead-Of-Time Compilation of Java Applications
Soft-Shake 2016 : Jigsaw est prêt à tuer le classpath
Open Source Compiler Construction for the JVM
Modern Programming in Java 8 - Lambdas, Streams and Date Time API
Introduction to the Java bytecode - So@t - 20130924
Ad

Viewers also liked (8)

PPS
Turnaround Professional Body
PPTX
BHP presentationFailure to Turnaround
PDF
Реструктуризация и реформирование проблемных предприятий
PPTX
Proactive Turnaround Management
PDF
Turnaround Management
PPTX
Turnaround Strategy
PPTX
Business Turnaround Strategy
PPTX
Turnaround management
Turnaround Professional Body
BHP presentationFailure to Turnaround
Реструктуризация и реформирование проблемных предприятий
Proactive Turnaround Management
Turnaround Management
Turnaround Strategy
Business Turnaround Strategy
Turnaround management
Ad

Similar to Why Doesn't Java Has Instant Turnaround - Con-FESS 2012 (20)

PPTX
Rapid java application development @ JUG.ru 25.02.2012
PDF
Wdjhit javaone-2011-aa
DOCX
Java J2EE Training in Chennai, Tambaram
PDF
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
PDF
Aop clustering
KEY
Ruby on Rails survival guide of an aged Java developer
PDF
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
PDF
Building Concurrent WebObjects applications with Scala
PDF
JDT Fundamentals 2010
PDF
EclipseCon 2010 - JDT Fundamentals
DOCX
Selenium short
PPTX
Cis 274 intro
PDF
JavaFX for Business Application Developers
DOCX
Best Selenium Online Training
PPT
Gnizr Architecture (for developers)
PDF
Owner - Java properties reinvented.
PDF
The Java Content Repository
ODP
Javaee6 Overview
PDF
Build Java Web Application Using Apache Struts
ODP
Refactoring to Scala DSLs and LiftOff 2009 Recap
Rapid java application development @ JUG.ru 25.02.2012
Wdjhit javaone-2011-aa
Java J2EE Training in Chennai, Tambaram
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Aop clustering
Ruby on Rails survival guide of an aged Java developer
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Building Concurrent WebObjects applications with Scala
JDT Fundamentals 2010
EclipseCon 2010 - JDT Fundamentals
Selenium short
Cis 274 intro
JavaFX for Business Application Developers
Best Selenium Online Training
Gnizr Architecture (for developers)
Owner - Java properties reinvented.
The Java Content Repository
Javaee6 Overview
Build Java Web Application Using Apache Struts
Refactoring to Scala DSLs and LiftOff 2009 Recap

More from Anton Arhipov (20)

PDF
JavaZone 2022 - Building Kotlin DSL.pdf
PDF
Idiomatic kotlin
PDF
TechTrain 2019 - (Не)адекватное техническое интервью
PDF
Build pipelines with TeamCity
PDF
Build pipelines with TeamCity
PDF
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
PDF
GeeCON Prague 2018 - Kotlin DSL in under an hour
PDF
Build pipelines with TeamCity and Kotlin DSL
PDF
Build pipelines with TeamCity
PDF
JavaDay Kiev 2017 - Integration testing with TestContainers
PDF
GeeCON Prague 2017 - TestContainers
PDF
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
PDF
JavaOne 2017 - TestContainers: integration testing without the hassle
PDF
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
PDF
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
PDF
JUG.ua 20170225 - Java bytecode instrumentation
PDF
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
PDF
GeeCON 2017 - TestContainers. Integration testing without the hassle
PDF
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
PDF
JEEConf 2017 - Having fun with Javassist
JavaZone 2022 - Building Kotlin DSL.pdf
Idiomatic kotlin
TechTrain 2019 - (Не)адекватное техническое интервью
Build pipelines with TeamCity
Build pipelines with TeamCity
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hour
Build pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity
JavaDay Kiev 2017 - Integration testing with TestContainers
GeeCON Prague 2017 - TestContainers
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JUG.ua 20170225 - Java bytecode instrumentation
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
GeeCON 2017 - TestContainers. Integration testing without the hassle
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - Having fun with Javassist

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Group 1 Presentation -Planning and Decision Making .pptx
Spectroscopy.pptx food analysis technology
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Accuracy of neural networks in brain wave diagnosis of schizophrenia
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf

Why Doesn't Java Has Instant Turnaround - Con-FESS 2012

Editor's Notes

  • #7: Vendors make money on production =&gt; development is secondaryOperations rule development, best practices are heavily influenced by production needsMultiple participants in the standard working groups means a choice between reducing scope of the standard or reducing its qualityStory: when we tried pitching JRebel to a large Java app server vendor the answer was: why bother?
  • #18: Jetty has support for any app layout, but docs are missing. Maven Jetty plugin is the only workable application of this functionality.RAD &amp; Websphere have decent integration that tries to copy the minimal amount of files possible. Copying isn’t a great idea, though.Weblogic has the split directory structure functionality which is powerful on paperEclipse, NetBeans and IntelliJ IDEA have support for publishing applications from the IDE, which varies from decent to awful.SpringSource has fairly decent integration between tooling and server, but only for tc Server.Jboss used to run Ant on every update in Eclipse, Netbeans still does that
  • #23: Externalized ~= PHP, Database, memcachedetcTemporary ~= StatelessJava frameworks/servers often have too much derivative state and it takes too long to createSerializing helps when it can§
  • #24: If you want to preserve the state, this is what you have to do.
  • #25: Class loader scopeEvery deployed application gets a dedicated class loaderState recreationApplication state is recovered by reinitializationSession state is (optionally) serialized and deserialized in the new class loaderReloading timeApplication reinitialization time, typically around one minuteProblemsLeaks memoryLazy caches need to be warmed up every time
  • #26: Class loader scopeEvery deployed application gets a dedicated class loaderState recreationApplication state is recovered by reinitializationSession state is (optionally) serialized and deserialized in the new class loaderReloading timeApplication reinitialization time, typically around one minuteProblemsLeaks memoryLazy caches need to be warmed up every time
  • #29: Class loader scopeClass loader per component/serviceState recreationState restored by framework (component/service recreated)Reloading time(Almost) InstantProblemsOnly managed components can be reloadedManaged components referring unmanaged code can be a problem (twin class issues)