How to Manage                          Software Complexity                               with OSGi                        ...
What is Complexity?donderdag 24 maart 2011
Complex?donderdag 24 maart 2011
The puzzle looks very simple,                     contrary to many other wire                    puzzles, that look scary ...
Complex?donderdag 24 maart 2011
Complex?                          Worlds Largest Jigsaw Puzzle                                24.000 pieces               ...
The Eye Of The                                Beholder                   • Complexity of a task is the energy you use     ...
The Eye Of The                                Beholder                   • Complexity of a task is the energy you use     ...
Energy?                   • Understanding the problem                   • Learning the solution                   • Accide...
Energy?                                          Subjective Complexity                   • Understanding the problem      ...
Energy?                                          Subjective Complexity                   • Understanding the problem      ...
What’s Modularity                   Got to do With Size???donderdag 24 maart 2011
Modularity                   •       Functions                          • local variables                   •       Object...
Modularity                   •       Functions                          • local variables                   •       Object...
Modularity               • Modularity is about                      creating a difference                      between an ...
Modularity               • Modularity is about                      creating a difference                      between an ...
Modularity               • modules have a private                      space and share a                      public space...
Modularity               • modules have a private                      space and share a                      public space...
Modularity               • modules have a private                      space and share a                      public space...
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
Entropy  E functionality                           Emodularizationdonderdag 24 maart 2011
#1 OSGi Complaint:                            Class Loaders!donderdag 24 maart 2011
Classloaders & Modularitydonderdag 24 maart 2011
Class Loading Revisited                   • Class.forName                   • Class path Scanning                   • Serv...
Class Loading Revisited               • Class loaders are used                      to provide extensibility              ...
Class Loading Revisited                             A              B                                   Publicdonderdag 24 ...
Class Loading Revisited                             A                B                                 C                  ...
Class Loading Revisited                             A                    B                                 C            I ...
Class Loading Revisited                             A                    B                                 C    X       I ...
Class Loading Revisited                             A                    B                                 C            P ...
Would be nice to mention        how µServices reduce surface        area of design                                        ...
#2 OSGi Complaint:                           Dependency Helldonderdag 24 maart 2011
Metadata Hell?donderdag 24 maart 2011
Transitive Hell?donderdag 24 maart 2011
Coupling               • Modules require other                      modules               •      Dependencies are        A...
Coupling               • Modules require other                      modules               •      Dependencies are        A...
Cohesion               • Fan out is a problem               • A does not transitively                      depend on D!   ...
Cohesion               • Fan out is a problem               • A does not transitively                      depend on D!   ...
Cohesion               • Refactoring can                      increase the cohesion                      and reduce coupli...
Cohesion               • Refactoring can                      increase the cohesion                      and reduce coupli...
Metadata Heaven?donderdag 24 maart 2011
Requires Toolsdonderdag 24 maart 2011
Tools              1   Request deployment of a                  component, e.g. a Bundle,                    WAR, WAB or E...
Tools              1   Request deployment of a                  component, e.g. a Bundle,                    WAR, WAB or E...
OSGi           OSGi            OSGi                      Build Tools   Runtime Tools   Cloud Tools                        ...
OSGi           OSGi            OSGi                      Build Tools   Runtime Tools   Cloud Tools                        ...
How to Manage                              Complexity?                   • Prepare to spend energy!                   • Ar...
Upcoming SlideShare
Loading in …5
×

How to manage software complexity with OSGi

1,846 views
1,737 views

Published on

EclipseCon presentation from David Savage (Paremus) and Peter Kriens (OSGi)

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

No Downloads
Views
Total views
1,846
On SlideShare
0
From Embeds
0
Number of Embeds
130
Actions
Shares
0
Downloads
121
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

How to manage software complexity with OSGi

  1. 1. How to Manage Software Complexity with OSGi Peter Kriens & David Savagedonderdag 24 maart 2011
  2. 2. What is Complexity?donderdag 24 maart 2011
  3. 3. Complex?donderdag 24 maart 2011
  4. 4. The puzzle looks very simple, contrary to many other wire puzzles, that look scary and complex right from the start. Nevertheless, its looks are deceiving, as it can prove to be frustratingly difficult to solve.donderdag 24 maart 2011
  5. 5. Complex?donderdag 24 maart 2011
  6. 6. Complex? Worlds Largest Jigsaw Puzzle 24.000 pieces (4.28m x 1.57m)donderdag 24 maart 2011
  7. 7. The Eye Of The Beholder • Complexity of a task is the energy you use to complete that task c = √E/mdonderdag 24 maart 2011
  8. 8. The Eye Of The Beholder • Complexity of a task is the energy you use to complete that task c = √E/mdonderdag 24 maart 2011
  9. 9. Energy? • Understanding the problem • Learning the solution • Accidental complexity • Size matters!donderdag 24 maart 2011
  10. 10. Energy? Subjective Complexity • Understanding the problem • Learning the solution • Accidental complexity • Size matters!donderdag 24 maart 2011
  11. 11. Energy? Subjective Complexity • Understanding the problem • Learning the solution • Accidental complexity • Size matters! Absolute Complexity size relateddonderdag 24 maart 2011
  12. 12. What’s Modularity Got to do With Size???donderdag 24 maart 2011
  13. 13. Modularity • Functions • local variables • Object Oriented • fields, methods, inheritance, polymorphism • instances • Bundles • implementations, services • componentsdonderdag 24 maart 2011
  14. 14. Modularity • Functions • local variables • Object Oriented • fields, methods, inheritance, polymorphism • instances • Bundles • implementations, services • componentsdonderdag 24 maart 2011
  15. 15. Modularity • Modularity is about creating a difference between an inside and an A B outside AB CD • Chunking - having an anchor for an aggregation C D • Visibility - is reduced, reducing the scope to attend for changesdonderdag 24 maart 2011
  16. 16. Modularity • Modularity is about creating a difference between an inside and an A B outside • Chunking - having an anchor for an aggregation C AB CD D • Visibility - is reduced, reducing the scope to attend for changesdonderdag 24 maart 2011
  17. 17. Modularity • modules have a private space and share a public space A B • modules limit their visibility and exposure C D • Reduces geometric to linear complexitydonderdag 24 maart 2011
  18. 18. Modularity • modules have a private space and share a public space A B • modules limit their Pub visibility and exposure C D • Reduces geometric to linear complexitydonderdag 24 maart 2011
  19. 19. Modularity • modules have a private space and share a public space A B • modules limit their Pub visibility and exposure C D • Reduces geometric to linear complexitydonderdag 24 maart 2011
  20. 20. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  21. 21. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  22. 22. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  23. 23. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  24. 24. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  25. 25. Entropy E functionality Emodularizationdonderdag 24 maart 2011
  26. 26. #1 OSGi Complaint: Class Loaders!donderdag 24 maart 2011
  27. 27. Classloaders & Modularitydonderdag 24 maart 2011
  28. 28. Class Loading Revisited • Class.forName • Class path Scanning • Service Loader • Thread Context Class Loaders • Factory, and FactoryBuildersdonderdag 24 maart 2011
  29. 29. Class Loading Revisited • Class loaders are used to provide extensibility and decoupling A B • They were not Pub designed for this purpose, C D • And class loaders break module boundariesdonderdag 24 maart 2011
  30. 30. Class Loading Revisited A B Publicdonderdag 24 maart 2011
  31. 31. Class Loading Revisited A B C Publicdonderdag 24 maart 2011
  32. 32. Class Loading Revisited A B C I Publicdonderdag 24 maart 2011
  33. 33. Class Loading Revisited A B C X I Publicdonderdag 24 maart 2011
  34. 34. Class Loading Revisited A B C P I Publicdonderdag 24 maart 2011
  35. 35. Would be nice to mention how µServices reduce surface area of design µServices efficiency of packet based approaches? but cost of packet based system is congestion - leads into dependency hell?donderdag 24 maart 2011
  36. 36. #2 OSGi Complaint: Dependency Helldonderdag 24 maart 2011
  37. 37. Metadata Hell?donderdag 24 maart 2011
  38. 38. Transitive Hell?donderdag 24 maart 2011
  39. 39. Coupling • Modules require other modules • Dependencies are A B transitive Pub • A→C→D C Ddonderdag 24 maart 2011
  40. 40. Coupling • Modules require other modules • Dependencies are A B transitive Pub • A→C→D C Ddonderdag 24 maart 2011
  41. 41. Cohesion • Fan out is a problem • A does not transitively depend on D! A B • The dependency is caused by C D (unnecessarily) packing 1 and 2 in the same moduledonderdag 24 maart 2011
  42. 42. Cohesion • Fan out is a problem • A does not transitively depend on D! A A B • The dependency is caused by 1 2 D (unnecessarily) packing C 1 and 2 in the same moduledonderdag 24 maart 2011
  43. 43. Cohesion • Refactoring can increase the cohesion and reduce coupling A B • But now A depends on C1 and B depends on C2 C 1 C 2 D • Package dependencies C are more robust to changesdonderdag 24 maart 2011
  44. 44. Cohesion • Refactoring can increase the cohesion and reduce coupling A B • But now A depends on C1 and B depends on C2 C 1 C 2 D • Package dependencies are more robust to changesdonderdag 24 maart 2011
  45. 45. Metadata Heaven?donderdag 24 maart 2011
  46. 46. Requires Toolsdonderdag 24 maart 2011
  47. 47. Tools 1 Request deployment of a component, e.g. a Bundle, WAR, WAB or EAR 2 Refer to Application Policy Resolver App Policy 3 Resolve Dependencies 4 Provision according to component and Policy dependencies Repository Nimbledonderdag 24 maart 2011
  48. 48. Tools 1 Request deployment of a component, e.g. a Bundle, WAR, WAB or EAR 2 Refer to Application Policy Resolver App Policy 3 Resolve Dependencies 4 Provision according to component and Policy dependencies Repository Nimbledonderdag 24 maart 2011
  49. 49. OSGi OSGi OSGi Build Tools Runtime Tools Cloud Tools ...donderdag 24 maart 2011
  50. 50. OSGi OSGi OSGi Build Tools Runtime Tools Cloud Tools ...donderdag 24 maart 2011
  51. 51. How to Manage Complexity? • Prepare to spend energy! • Architecture = µservice model • Use tools to manage Metadata and Dependencies • Small increments • One test is worth a thousand opinions.donderdag 24 maart 2011

×