The Brick Wall of                           Modularity                          (or what µServices can mean for you)      ...
Agenda                    •    Why OSGi                    •    Modularity Maturity Model                    •    The Bric...
Why OSGi?                                   2010           2003                                                  1996 1989...
Why OSGi?                 2010    2003                         1996 1989                                                  ...
The Dreamvrijdag 25 november 11
The Dream                    •    Adaptive                    •    Flexible                                            B  ...
The Dream                    •    Adaptive                    •    Flexible                                        A   B  ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
The Dream                    •    Adaptive                    •    Flexible                                        A   Ba ...
Modularity Maturity                              Model                    •    1 Ad Hoc                    •    2 Managed ...
Modularity Maturity                              Modelvrijdag 25 november 11
1. Ad Hoc                    •    Flat, manual class path                    •    Single name space                    •  ...
1. Ad Hoc                    •    Flat, manual class path                    •    Single name space                       ...
2. Managed                    •    Treat JARs as a module                    •    JAR Identity                         •  ...
2. Managed                                                           a d                    •    Treat JARs as a module   ...
3. Contracts                    •    Interface based design,                         POJOs                    •    Provide...
3. Contracts                    •                                                          d e r                          ...
4. Fences                    •    Explicitly Import/Export                         packages                    •    Explic...
4. Fences                    •    Explicitly Import/Export                         packages                    •    Explic...
5. Optimize                    •    Exploit concepts for                         modules and contracts                    ...
5. Optimize                    •    Exploit concepts for                         modules and contracts                    ...
Today                                      1.                                    Ad Hoc                           2.      ...
Today                                                1.                                              Ad Hoc            Ent...
Today                                                1.                                              Ad Hoc            Ent...
Today                                                1.                                              Ad Hoc            Ent...
vrijdag 25 november 11
vrijdag 25 november 11
Class.forName(String)vrijdag 25 november 11
Class Space                         package                         classvrijdag 25 november 11
Class Space                         package                         classvrijdag 25 november 11
Class Space                         package                         classvrijdag 25 november 11
Class Space                               V1      V2vrijdag 25 november 11
Class Space                               V1      V2vrijdag 25 november 11
Class Space                                         V1   V2                         Class.forNamevrijdag 25 november 11
Class Space                                                 V1   V2                         x                   x         ...
Class Space                                                 V1   V2                         x                   x         ...
Why Class.forName?vrijdag 25 november 11
Why Class.forName?                                                                 ! ! !                                  ...
vrijdag 25 november 11
1. Type Couplingvrijdag 25 november 11
1. Type Coupling                         2. Instance Couplingvrijdag 25 november 11
Coupling                                modular    not Example                                          modular           ...
Type Coupling                         class Client {}   class FooImpl{}vrijdag 25 november 11
Type Coupling                         class Client {}   class FooImpl{}vrijdag 25 november 11
Type Coupling                         class Client {}                     class FooImpl{}                                 ...
Type Coupling                         class Client {}                     class FooImpl{}                                 ...
Type Coupling                         class Client {}                     class FooImpl{}                                 ...
Type Coupling                         class Client {}                     class FooImpl{}                                 ...
Instance Coupling                    •    New                    •    Factory                    •    Inversion of Control...
Instance Coupling                                                client   container   impl                    •    New    ...
Instance Coupling                                                client   container   impl                    •    New    ...
Instance Coupling                                                client   container   impl                    •    New    ...
Instance Coupling                                                client   container   impl                    •    New    ...
Instance Coupling                                                client   container   impl                    •    New    ...
Instance Coupling                                              t                                             o ?          ...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern     public interface S {                                       ...
µServices Primitive                                            package com.acme.foo;                    •    Broker Patter...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                    •    Contr...
µServices Primitive                    •    Broker Pattern                    •    Direction                hook          ...
µServices Primitive                    •    Broker Pattern                    •    Direction                hook          ...
µServices Primitive                                                           ??                    •    Broker Pattern   ...
µServices Primitive                    •    Broker Pattern                    •    Direction                hook          ...
µServices Primitive                    •    Broker Pattern                    •    Direction                hook          ...
Instance Coupling                                 Patterns                    •    Factory                    •    Listene...
Back to the Brick Wallvrijdag 25 november 11
Migration                         A   B   C                         D   E   F                         G   H   Ivrijdag 25 ...
Migration                         A   B   C                         D   E   F                         G   H   Ivrijdag 25 ...
Migration                         A   B   C                         D   E   F                         G   H   Ivrijdag 25 ...
Migration                         A   B   C                         D   E   F                         G   H   Ivrijdag 25 ...
Migration                         A   B   C                         D   E   F                         G   H   Ivrijdag 25 ...
POJOSR                    • Developed by Karl Pauls                    • JavaOne presentation 24811                    • h...
Good Fences                         Make Good Neighborsvrijdag 25 november 11
Good Fences                                     od ul es                         Make Good Neighbors                      ...
Conclusion                  2010   2003                                                                       2017        ...
OSGi                    •    Legacy and backward compatibility is important                    •    Modularizing is hard  ...
Join!                    • Help us to achieve our vision to make                         software simpler to develop      ...
Q&Avrijdag 25 november 11
Upcoming SlideShare
Loading in …5
×

The Brick Wall of Modularity

788
-1

Published on

Or what µServices can mean for you.

Peter Kriens, OSGi Fellow, aQute

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

  • Be the first to like this

No Downloads
Views
Total Views
788
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The Brick Wall of Modularity

  1. 1. The Brick Wall of Modularity (or what µServices can mean for you) Peter Kriens (aQute)vrijdag 25 november 11
  2. 2. Agenda • Why OSGi • Modularity Maturity Model • The Brick Wall • Type & Instance Coupling • µServices • The Brick Wall Revisited • Conclusionvrijdag 25 november 11
  3. 3. Why OSGi? 2010 2003 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htmvrijdag 25 november 11
  4. 4. Why OSGi? 2010 2003 1996 1989 2017 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htmvrijdag 25 november 11
  5. 5. The Dreamvrijdag 25 november 11
  6. 6. The Dream • Adaptive • Flexible B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  7. 7. The Dream • Adaptive • Flexible A B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  8. 8. The Dream • Adaptive • Flexible A Ba B Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  9. 9. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  10. 10. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  11. 11. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  12. 12. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
  13. 13. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
  14. 14. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
  15. 15. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
  16. 16. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
  17. 17. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I v2.0 • Distributedvrijdag 25 november 11
  18. 18. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributedvrijdag 25 november 11
  19. 19. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributedvrijdag 25 november 11
  20. 20. The Dream • Adaptive • Flexible A Ba Bb • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributedvrijdag 25 november 11
  21. 21. Modularity Maturity Model • 1 Ad Hoc • 2 Managed • 3 Contracts • 4 Fences Page 2 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011 21.09.2011 • Inspired by Graham Charters’ excellent OSGi Community Event 2011 5 Optimize presentation @ http://slidesha.re/q8EHFpvrijdag 25 november 11
  22. 22. Modularity Maturity Modelvrijdag 25 november 11
  23. 23. 1. Ad Hoc • Flat, manual class path • Single name space • Full visibility and normal accessibility • Monolithic • Highly coupled • Split Packages • Add/Shuffle JARs until it worksvrijdag 25 november 11
  24. 24. 1. Ad Hoc • Flat, manual class path • Single name space e l l H • Full visibility and normal accessibility • Monolithic AR • • Highly coupled Split Packages J • Add/Shuffle JARs until it worksvrijdag 25 november 11
  25. 25. 2. Managed • Treat JARs as a module • JAR Identity • Naming • Versioning • Dependencies • Repositoriesvrijdag 25 november 11
  26. 26. 2. Managed a d • Treat JARs as a module n l o w he t • JAR Identity • Naming D o t • Versioning r n e • Dependencies n t e • Repositories ivrijdag 25 november 11
  27. 27. 3. Contracts • Interface based design, POJOs • Provide contracts for each connection between JARs • Implementation details inside the JAR • Versioning on contractsvrijdag 25 november 11
  28. 28. 3. Contracts • d e r a Interface based design, o POJOs • Provide contracts for l s s k s c a a each connection l h between JARs • Implementation details inside the JAR c • Versioning on contractsvrijdag 25 november 11
  29. 29. 4. Fences • Explicitly Import/Export packages • Explicitly specify requirements and capabilities • Enforce the module boundaries • Semantic Versioning • Side-by-side versioning supportedvrijdag 25 november 11
  30. 30. 4. Fences • Explicitly Import/Export packages • Explicitly specify requirements and capabilities o d! • • Enforce the module boundaries Semantic Versioning Go • Side-by-side versioning supportedvrijdag 25 november 11
  31. 31. 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeatvrijdag 25 november 11
  32. 32. 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeatvrijdag 25 november 11
  33. 33. Today 1. Ad Hoc 2. 3. Managed Contracts 4. Fences 5. Optimizevrijdag 25 november 11
  34. 34. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r saw sp jig 4. Fences 5. Optimizevrijdag 25 november 11
  35. 35. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r OSGi saw s p jig 4. Fences 5. Optimizevrijdag 25 november 11
  36. 36. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r OSGi saw s p jig 4. Fences 5. Optimizevrijdag 25 november 11
  37. 37. vrijdag 25 november 11
  38. 38. vrijdag 25 november 11
  39. 39. Class.forName(String)vrijdag 25 november 11
  40. 40. Class Space package classvrijdag 25 november 11
  41. 41. Class Space package classvrijdag 25 november 11
  42. 42. Class Space package classvrijdag 25 november 11
  43. 43. Class Space V1 V2vrijdag 25 november 11
  44. 44. Class Space V1 V2vrijdag 25 november 11
  45. 45. Class Space V1 V2 Class.forNamevrijdag 25 november 11
  46. 46. Class Space V1 V2 x x Class.forNamevrijdag 25 november 11
  47. 47. Class Space V1 V2 x x Class.forNamevrijdag 25 november 11
  48. 48. Why Class.forName?vrijdag 25 november 11
  49. 49. Why Class.forName? ! ! ! ! ! ! ! ! ! ! ! ! N G! P LI C OUvrijdag 25 november 11
  50. 50. vrijdag 25 november 11
  51. 51. 1. Type Couplingvrijdag 25 november 11
  52. 52. 1. Type Coupling 2. Instance Couplingvrijdag 25 november 11
  53. 53. Coupling modular not Example modular type FooImpl foo; Foo foo = (Foo) instance Class.forName(“FooImpl”) .newInstance();vrijdag 25 november 11
  54. 54. Type Coupling class Client {} class FooImpl{}vrijdag 25 november 11
  55. 55. Type Coupling class Client {} class FooImpl{}vrijdag 25 november 11
  56. 56. Type Coupling class Client {} class FooImpl{} interface Foo{}vrijdag 25 november 11
  57. 57. Type Coupling class Client {} class FooImpl{} interface Foo{} uses implementsvrijdag 25 november 11
  58. 58. Type Coupling class Client {} class FooImpl{} interface Foo{} uses implements get instancevrijdag 25 november 11
  59. 59. Type Coupling class Client {} class FooImpl{} o r ?l o ut s n einterface Foo{} C s uses implements Is get instancevrijdag 25 november 11
  60. 60. Instance Coupling • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  61. 61. Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  62. 62. Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  63. 63. Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  64. 64. Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  65. 65. Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
  66. 66. Instance Coupling t o ? n ? g ?? client container impl • i n r New • • Factory S ur a p l Inversion of Control • Broker o d Mvrijdag 25 november 11
  67. 67. µServices Primitive • Broker Pattern • Direction • Contract • Publish • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  68. 68. µServices Primitive • Broker Pattern • Direction • Contract • Publish A S B • Find • Bind • Who’s listening? • Cardinalityvrijdag 25 november 11
  69. 69. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  70. 70. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind dependency • Who’s Listening? • Cardinalityvrijdag 25 november 11
  71. 71. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  72. 72. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  73. 73. µServices Primitive • Broker Pattern public interface S { void foo(); • Direction } • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  74. 74. µServices Primitive package com.acme.foo; • Broker Pattern public interface S { void foo(); • Direction } • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  75. 75. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  76. 76. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  77. 77. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  78. 78. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  79. 79. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  80. 80. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  81. 81. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  82. 82. µServices Primitive • Broker Pattern • Direction • Contract • Publish S !! register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  83. 83. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind !! • Who’s Listening? • Cardinalityvrijdag 25 november 11
  84. 84. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  85. 85. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  86. 86. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  87. 87. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  88. 88. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  89. 89. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  90. 90. µServices Primitive • Broker Pattern • Direction hook • Contract ?? • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  91. 91. µServices Primitive ?? • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  92. 92. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  93. 93. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
  94. 94. Instance Coupling Patterns • Factory • Listener • Discovery • Distributionvrijdag 25 november 11
  95. 95. Back to the Brick Wallvrijdag 25 november 11
  96. 96. Migration A B C D E F G H Ivrijdag 25 november 11
  97. 97. Migration A B C D E F G H Ivrijdag 25 november 11
  98. 98. Migration A B C D E F G H Ivrijdag 25 november 11
  99. 99. Migration A B C D E F G H Ivrijdag 25 november 11
  100. 100. Migration A B C D E F G H Ivrijdag 25 november 11
  101. 101. POJOSR • Developed by Karl Pauls • JavaOne presentation 24811 • http://pojosr.googlecode.com • Based on Apache Felixvrijdag 25 november 11
  102. 102. Good Fences Make Good Neighborsvrijdag 25 november 11
  103. 103. Good Fences od ul es Make Good Neighbors mvrijdag 25 november 11
  104. 104. Conclusion 2010 2003 2017 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htmvrijdag 25 november 11
  105. 105. OSGi • Legacy and backward compatibility is important • Modularizing is hard • Many popular Java patterns are fundamentally not modular • In the next 7 years, we double the amount of software • Investment in modularity has a great ROI!vrijdag 25 november 11
  106. 106. Join! • Help us to achieve our vision to make software simpler to develop • Provide Requirements • Develop specifications • Help the community • OSGi Alliance restructured to provide lower-cost membership levelsvrijdag 25 november 11
  107. 107. Q&Avrijdag 25 november 11

×