Wdjhit javaone-2011-aa

of 33/33
Why Doesn’t Java Have Instant Turnaround? Anton Arhipov @antonarhipov Product Lead at ZeroTurnaround
  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of Wdjhit javaone-2011-aa

  • 1.Why Doesnt JavaHave Instant Turnaround?Anton Arhipov @antonarhipovProduct Lead at ZeroTurnaround

2. twitter.com/ekabanov 3. Turnaround cycle CheckMake a thechange changeBuild, deploy, waittwitter.com/ekabanov 4. What about others? twitter.com/ekabanov 5. Why Java is heavier than others?Vendors Standards OperationsDev 2011Help!is downloading the internets! twitter.com/ekabanov 11. 2008 => 2011 this works:mvn jetty:run others?twitter.com/ekabanov 12. App Server WorkspacegetResource(hello.html) read(src/main/.../hello.html)twitter.com/ekabanov 13. A typical web application build Resolve dependenciesCopy static resources Compile classes Package modules in JARsPackage everything in a WAR/EARtwitter.com/ekabanov 14. Why code reloading is so hard? ExternalizedTemporaryState Serializable Derivative twitter.com/ekabanov 15. Reloading an Object OldClassLoader NewClassLoaderMyObject.class MyObject.class Recreate the objectMyObjectMyObject twitter.com/ekabanov 16. Web Deployment Serialize/deserialize init() Session Session Sevlet NewSevlet Classes Classes App AppNewState Libraries StateLibrariesOldClassLoaderNewClassLoader twitter.com/ekabanov 17. Twin ClassLoader IssuesClasses ClassesObjects Objects and Codeand Code LibrariesLibraries OutOfMemoryErrorClassCastExceptionOldClassLoaderNewClassLoaderJVMtwitter.com/ekabanov 18. 2008 => 2011 twitter.com/ekabanov 19. Frameworks twitter.com/ekabanov 20. 2008 => 2011 twitter.com/ekabanov 21. Component State NewNewClass Object Class Object Old Component New ComponentClassLoader ClassLoader twitter.com/ekabanov 22. JVM Languages Class-based languages have same limitations as Java Groovy Jython Non-class based languages can have better support JRuby Clojure twitter.com/ekabanov 23. HotSwap User saves class from IDE OldClassLoaderMyObject.classNew CodeCodeHotSwap111000100101000101Debugger101010010100010010New Code 111000100 101010010MyObject twitter.com/ekabanov 24. JRebel Class Reloading HotSwap JRebelChanging method bodies + +Adding/removing methods- +Adding/removing constructors - +Adding/removing fields - +Adding/removing classes- +Adding/removing annotations- +Replacing superclass - -Adding/removing- -implemented interfaces twitter.com/ekabanov 25. JRebel MyObject.class fileOldClassLoader changed MyObject.class New Code Code JRebel 111000100 101000101agent 101010010 100010010 New Code 111000100 101010010 MyObject twitter.com/ekabanov 26. JRebel MyObject.class file Configuration changed OldClassLoaderchangedFrameworkMyObject.class ClassesNew CodeCodeJRebel111000100101000101101010010100010010 New Code agent111000100101010010MyObject Configuration(XML, annotations, )twitter.com/ekabanov 27. JRebel IntegrationIDEs Containers Frameworks Build Tools twitter.com/ekabanov 28. Who is already using JRebel?Banking & FSI WebITTelco Air / Auto HealthcareConsultingFashion/Entertain menttwitter.com/ekabanov 29. (how awesome is that?) Over 40 million builds, redeploys & restarts prevented for 20,000+ Java developerstwitter.com/ekabanov 30. Oracle Weblogic FastSwaptrue weblogic-application.xml twitter.com/ekabanov 31. Q: Why Doesnt Java HaveInstant Turnaround? A1: Other languages/platforms arent much better! A2: Reloading code is easy, preserving state is hard! A3: Its better than it used to be! A4: Play!, Tapestry 5 and Grails do that! A5: But what about JRebel? twitter.com/ekabanov 32. Q? twitter.com/ekabanov 33. And alsoInstant, online rollout and rollback ofchanges to production Java EE appsfor any deployment size.twitter.com/ekabanov