Why OSGi?

10,441 views
10,294 views

Published on

Presentation by Peter Kriens and BJ Hargrave at JavaOne 2011.

Published in: Technology, Spiritual
2 Comments
22 Likes
Statistics
Notes
No Downloads
Views
Total views
10,441
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
552
Comments
2
Likes
22
Embeds 0
No embeds

No notes for slide

Why OSGi?

  1. 1. Why OSGi? BJ Hargrave, IBM Peter Kriens, aQute
  2. 2. Agenda• Why OSGi?• The Dream• Looking for Shoulders• Java & Packages• OSGi Bundles & Services• Conclusion
  3. 3. Why OSGi?
  4. 4. Why OSGi? Scriptorium
  5. 5. Why OSGi?… because there should be a better way to develop software ...
  6. 6. Why OSGi? 2010 2003 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 yearssource: http://users.jyu.fi/~koskinen/smcosts.htm
  7. 7. 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.htm
  8. 8. The Dream
  9. 9. The Dream• Adaptive• Flexible B C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  10. 10. The Dream• Adaptive• Flexible A B C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  11. 11. The Dream• Adaptive• Flexible A Ba B Bb C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  12. 12. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  13. 13. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  14. 14. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  15. 15. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H I• Distributed
  16. 16. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H• Distributed
  17. 17. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H• Distributed
  18. 18. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H• Distributed
  19. 19. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H• Distributed
  20. 20. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure• Evolution G H I v2.0• Distributed
  21. 21. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure S;1.1.0• Evolution G H I v2.0• Distributed
  22. 22. The Dream• Adaptive• Flexible A Ba Bb C• Contracts• Robust D E F• Secure S;1.1.0• Evolution G H I v2.0• Distributed
  23. 23. The Dream• Adaptive• Flexible A Ba Bb• Contracts• Robust D E F• Secure S;1.1.0• Evolution G H I v2.0• Distributed
  24. 24. Cambridge in the 50’s
  25. 25. Cambridge in the 50’s“As soon as we started programming, we found toour surprise that it wasnt as easy to get programsright as we had thought.”“… the realization came over me with full force thata good part of the remainder of my life was going tobe spent finding errors in my own programs.” Maurice Wilkes
  26. 26. Subroutines
  27. 27. Subroutines Subroutines
  28. 28. Subroutines• Subroutine: • Focus on what, not how • Encapsulate the implementation details • Formalized the input data (arguments) • Formalized the output (return values)
  29. 29. Subroutines• Abstraction • Easier to understand• Less Code • Fewer Errors• Sharing • Simpler Maintenance (depends …)
  30. 30. Subroutines
  31. 31. Functions
  32. 32. Functions Function
  33. 33. Functions Input(arguments) Function
  34. 34. Functions Input Output(arguments) (return) Function
  35. 35. Functions Private Input Output(arguments) (return) Function
  36. 36. Then Systems Grew
  37. 37. Then Systems Grew
  38. 38. Spaghetti Code
  39. 39. Pittsburg 70’s
  40. 40. Pittsburg 70’s“ … modularization as a mechanism for improvingthe flexibility and comprehensibility of a systemwhile allowing the shortening of its developmenttime.” David Parnas
  41. 41. Modules
  42. 42. Modules Module
  43. 43. Modules Private FunctionsImported ExportedFunctions Functions Module
  44. 44. Then Systems Grew
  45. 45. Then Systems Grew
  46. 46. Sharing Proved Hard
  47. 47. Sharing Proved Hard
  48. 48. Sharing Proved Hard
  49. 49. Palo Alto 80’s
  50. 50. Palo Alto 80’s“Objects support modularity - the functioning of anobject does not depend on the internal details ofanother object. The complexity of the system isreduced by this minimization of interdependenciesof system components.” Smalltalk Team
  51. 51. Objects
  52. 52. Objects Private MembersImported ExportedMembers Members Type
  53. 53. Objects• Objects/Classes => Modules + • Instantiation (private data per instance) • Inheritance • Polymorphism
  54. 54. Then Systems Grew
  55. 55. Then Systems Grew
  56. 56. C++
  57. 57. Menlo Park 90’s
  58. 58. Menlo Park 90’s
  59. 59. Packages“Chapter 7 describes the structure of a program,which is organized into packages similar to themodules of Modula.” Java Language Specification
  60. 60. Packages Private TypesImported Exported Types Types Packages
  61. 61. Then Systems Grew
  62. 62. Then Systems Grew
  63. 63. And Distributed
  64. 64. And Distributed
  65. 65. And Multiplied
  66. 66. And Multiplied
  67. 67. Small Java App ...
  68. 68. Worldwide 00’s
  69. 69. Worldwide 00’s
  70. 70. Worldwide 00’s
  71. 71. Next Level of Modularity
  72. 72. Next Level of Modularity Functions
  73. 73. Next Level of Modularity Classes/Objects Functions
  74. 74. Next Level of Modularity Packages Classes/Objects Functions
  75. 75. Next Level of Modularity Bundles Packages Classes/Objects Functions
  76. 76. Next Level of Modularity Bundles Packages Classes/Objects Functions
  77. 77. Bundles Private PackagesImported ExportedPackages Packages Bundle (JAR file)
  78. 78. Type Coupling
  79. 79. Type Coupling
  80. 80. Download the Internet
  81. 81. Type Coupling
  82. 82. Type Coupling substitutable packages = API
  83. 83. Instance CouplingConsumer Bundle Provider Bundle
  84. 84. Instance CouplingConsumer Bundle Provider Bundle API Bundle
  85. 85. Instance CouplingConsumer Bundle Provider Bundle need an instance ... API Bundle
  86. 86. Instance CouplingConsumer Bundle Provider Bundle X need an instance ... API Bundle
  87. 87. Instance Coupling
  88. 88. Instance CouplingConsumer Bundle Provider Bundle Service API Bundle
  89. 89. A Dream Come True A B C D E F G H I
  90. 90. Why OSGi?… because it is a better way to develop software ...
  91. 91. Conclusion2010 2003 2017 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htm
  92. 92. 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!
  93. 93. OSGi Alliance• The OSGi Alliance is a non-profit that has the vision to develop a Java component model to ease software development • Comprehensive framework specification • Service specifications • An active community • Repository • Tools
  94. 94. 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 levels
  95. 95. Q&A

×