Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

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

on

  • 4,845 views

 

Statistics

Views

Total Views
4,845
Views on SlideShare
1,301
Embed Views
3,544

Actions

Likes
3
Downloads
9
Comments
0

46 Embeds 3,544

http://arhipov.blogspot.com 2174
http://arhipov.blogspot.in 245
http://arhipov.blogspot.de 129
http://arhipov.blogspot.ru 124
http://arhipov.blogspot.co.uk 114
http://feeds.feedburner.com 70
http://arhipov.blogspot.com.au 69
http://arhipov.blogspot.ca 67
http://arhipov.blogspot.fr 66
http://arhipov.blogspot.it 43
http://arhipov.blogspot.cz 34
http://arhipov.blogspot.com.br 32
http://arhipov.blogspot.se 31
http://arhipov.blogspot.co.il 29
http://arhipov.blogspot.be 29
http://arhipov.blogspot.com.es 29
http://arhipov.blogspot.ch 28
http://arhipov.blogspot.nl 27
http://arhipov.blogspot.co.at 21
http://arhipov.blogspot.no 15
http://arhipov.blogspot.ro 14
http://arhipov.blogspot.mx 13
http://arhipov.blogspot.sg 12
http://arhipov.blogspot.com.ar 11
http://arhipov.blogspot.ie 11
http://arhipov.blogspot.jp 11
http://arhipov.blogspot.fi 10
http://arhipov.blogspot.tw 10
http://arhipov.blogspot.dk 10
http://arhipov.blogspot.hu 9
http://arhipov.blogspot.hk 8
http://arhipov.blogspot.pt 8
http://arhipov.blogspot.sk 8
http://arhipov.blogspot.kr 8
http://arhipov.blogspot.co.nz 5
http://arhipov.blogspot.com.tr 4
http://arhipov.blogspot.gr 4
http://webcache.googleusercontent.com 2
http://www.hanrss.com 2
http://www.arhipov.blogspot.com 2
http://www.arhipov.blogspot.ru 1
http://reader.aol.com 1
http://cloud.feedly.com 1
http://www.verious.com 1
http://localhost 1
https://twitter.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Vendors make money on production => 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?
  • Jetty has support for any app layout, but docs are missing. Maven Jetty plugin is the only workable application of this functionality.RAD & 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
  • Externalized ~= PHP, Database, memcachedetcTemporary ~= StatelessJava frameworks/servers often have too much derivative state and it takes too long to createSerializing helps when it can§
  • If you want to preserve the state, this is what you have to do.
  • 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
  • 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
  • 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)

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

  • 1. Why Doesn’t Java HaveInstant Turnaround?Anton Arhipov | ZeroTurnaround
  • 2. whoamiAnton ArhipovJRebelZeroTurnaround http://arhipov.blogspot.com @antonarhipov @javarebel
  • 3. Turnaround Cycle Check Make a the change change Build, de ploy, wai t
  • 4. Diversity
  • 5. VendorsStandards Operations dev << PROD
  • 6. Turnaround Cycle Check Make a the change change Build, de ploy, wai t
  • 7. Turnaround Time Sink Navigation OOMApplication deployment Container startup time
  • 8. Container Startup Timehttp://dow.ngra.de/2010/12/14/jee-oss-container-startup-times-apples-vs-oranges/
  • 9. http://zeroturnaround.com/java-ee-productivity-report-2011/
  • 10. http://zeroturnaround.com/java-ee-productivity-report-2011/
  • 11. Build Check Make a the change change Build, deploy, wait
  • 12. Build Resolve dependencies Copy static resources Compile classes Package modules into JARs Package everything into WAR/EAR
  • 13. Exploded Directory Deployment
  • 14. Jetty Launcherpublic 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(); }}
  • 15. “…I know about JRebel, but I cannotpay for it, so I tried Maven…” - Stackoverflow
  • 16. This works:mvn jetty:run others?
  • 17. getResource(“hello.html”) read(“src/main/.../hello.html”)
  • 18. Build Resolve dependencies Copy static resources Compile classes Package modules into JARs Package everything into WAR/EAR
  • 19. Build Resolve dependencies Copy static resources Compile classes Package modules into JARs Package everything into WAR/EAR
  • 20. Why Code Reloading is Hard?
  • 21. Why Code Reloading is Hard? Externalized Temporary State Serializable Derivative
  • 22. How To Reload a Class? OldClassLoader NewClassLoader MyObject.class MyObject.class Recreate object MyObject MyObject
  • 23. Serialize/deserialize init() Session Session Sevlet New SevletClasses Classes App App New StateLibraries State Libraries OldClassLoader NewClassLoader
  • 24. Session Session Sevlet New SevletClasses Classes App App New State State Libraries OldClassLoader NewClassLoader
  • 25. Component State New NewClass Object Class Object Old Component New Component ClassLoader ClassLoader
  • 26. HotSwap Make changes in IDE OldClassLoader MyObject.class New HotSwap Code code Debugger 111000100 101000101 101010010 100010010 New code 111000100 101010010 MyObject
  • 27. JRebel vs HotSwap 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
  • 28. JRebel Make changes in IDE OldClassLoaderFramework MyObject.class Code 101000101 New code JRebel 100010010 111000100 101010010 MyObject Configuration (XML, annotations,..)
  • 29. in action
  • 30. Oh ...The Acid is Kicking In Questions?
  • 31. Remoting BETA
  • 32. http://arhipov.blogspot.com @antonarhipov @javarebel