Practical Performance: Understand the Performance of Your Application - Chris Bailey (IBM)

430 views

Published on

Presented at JAX London 2013

When you write and run Java code, the JVM makes several allocations on your behalf, but do you have an understanding of how much that is? This session provides insight into the memory usage of Java code, covering the memory overhead of putting int into an integer object and the cost of object delegation and the memory efficiency of the different collection types. It also gives you an understanding of the off-Java (native) heap memory usage of some types of Java objects, such as threads and sockets.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
430
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • “Architecture” connotes up-front design and enforcement. Retrofitting means working as much as possible with the code as it is, discovering natural structures and boundaries, and then making minimal changes to the implementation in order to fit this “discovered” structure. Our goal is to reorganize the mass of code we have, into a shape that is much easier to understand and evolve.Depending on your start point it may not be what you would ideally have created, but it will be infinitely better than the BBOM you have now.As Brian said yesterday, BBOMs have made millionaires, but very rarely, for the most part they wreck projects, and make developers miserable.
  • Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.
  • How does this transfer to software?
  • Ward Cunningham
  • Too complex to understandNo encapsulation so no constraints on what uses what, no sheltering from change.
  • You KNOW when you see a class if it is too complex
  • Assuming each of the packages is within Compositional Complexity thresholdAnd this packaging needs further composition…Another aspect to the structure at this levelAs long as it looks something like this…
  • Levelized
  • Strongly connected componentsDrives coupling up dramatically, CCD
  • Think of tangles as canceling CCCoupling
  • A structured codebase is a great milestoneMuch easier to work withMeasurable– keep it structuredEasy to strengthen modularity, define architecture
  • Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.
  • Pull structure out of mudApply modularity to the structureProactively define, communicate and enforce an architectureALL WITHOUT MODIFYING CODE (ish)Reduction of entropy requires the input of energy, but much of the structure is already there, it just needs finding, so the effort may not be as great as you thought.
  • Practical Performance: Understand the Performance of Your Application - Chris Bailey (IBM)

    1. 1. From Big Ball of Mud to Modularity Chris Chedgey Structure101 Jax London October 29, 2013
    2. 2. What you have… 1. Implementation • • • • Thousands of source files Countless interdependencies Impossible to understand & control Works
    3. 3. What you have… 2. Physical organization • Folders, targets, packages, jars, … • Helps find files • Helps understand & control?
    4. 4. What you have… 2. Physical organization • Folders, targets, packages, jars, … • Helps find files • Helps understand & control?
    5. 5. What you have… 2. Physical organization • Folders, targets, packages, jars, … • Helps find files • Helps understand & control? • Hopelessly tangled – NO
    6. 6. What you have… 1. Unstructured sea of classes 2. Tangled physical organization Big Ball of Mud
    7. 7. What you need… 3. Modular structure • Low coupling • Defines layering visibility • Communicated • Maps to code • Evolves with codebase
    8. 8. What you need… 3. Modular structure • • Defines layering visibility • Communicated • Conform Low coupling Maps to code • Evolves with codebase Align
    9. 9. What you need… Discover and Define
    10. 10. 3. Modularity • Refactor, Align 2. Architecture • Interfaces, definition 1. Structure • Encapsulation, levelization, cohesion 0. Mud • Unstructured implementation
    11. 11. Encapsulation
    12. 12. Levelization
    13. 13. Dependencies
    14. 14. Cumulative Component Dependency (CCD)
    15. 15. “Tangles”
    16. 16. Cohesion
    17. 17. Cohesion
    18. 18. Cohesion
    19. 19. 3. Modularity • Refactor, Align 2. Architecture • Interfaces, definition 1. Structure • Encapsulation, levelization, cohesion 0. Mud • Unstructured implementation
    20. 20. Interfaces, Definition
    21. 21. Refactoring, Alignment
    22. 22. 3. Modularity • Refactor, Align 2. Architecture • Interfaces, definition 1. Structure • Encapsulation, levelization, cohesion 0. Mud • Unstructured implementation Thank you! @chedgey chris@structure101.com
    23. 23. Cost of the status quo… Miserable developers Cost per feature increases Unexpected impacts of change Unreliable schedules Test cycles increase Reuse less Value of your code base declines

    ×