OSGi and Java Modularity
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

OSGi and Java Modularity

on

  • 862 views

A presentation about OSGi and Java modularity given on DevCon 2009. It lays out what is wrong with Java with respect to modularity and how OSGi fixes these flaws.

A presentation about OSGi and Java modularity given on DevCon 2009. It lays out what is wrong with Java with respect to modularity and how OSGi fixes these flaws.

Statistics

Views

Total Views
862
Views on SlideShare
862
Embed Views
0

Actions

Likes
3
Downloads
35
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

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

OSGi and Java Modularity Presentation Transcript

  • 1. OSGi & Java Modularity Jazoon 2009, Zürich by Peter Kriens donderdag 25 juni 2009
  • 2. donderdag 25 juni 2009
  • 3. donderdag 25 juni 2009
  • 4. donderdag 25 juni 2009
  • 5. Productivity Application Complexity donderdag 25 juni 2009
  • 6. Productivity Assembly Application Complexity donderdag 25 juni 2009
  • 7. Productivity Structured Programming Assembly Application Complexity donderdag 25 juni 2009
  • 8. Productivity Structured Object Oriented Programming Programming Assembly Application Complexity donderdag 25 juni 2009
  • 9. Productivity Service Oriented Programming? Structured Object Oriented Programming Programming Assembly Application Complexity donderdag 25 juni 2009
  • 10. donderdag 25 juni 2009
  • 11. Application donderdag 25 juni 2009
  • 12. Extensions Application Application Convenience Foundation Basic Something Core Java VM donderdag 25 juni 2009
  • 13. minilang party pos. product workeffort workflow … accounting assetmaint content Extensionsbi ebay ecommerce googlebase guiapp hhfacility manufact. marketing minerva oagis order Application Application layer common catalina base datafile entity widget … Application Convenience resolver rome serializer servlets tomcat xalan bsf mail mx4j naming jetty poi wsdl4j bsh Foundation Basic Something jenks jpos18 jython looks lucene xerces velocity jakarta jcl json jdbm jdom xmlapis ws-commons Core log4j barcode4j axis batik commons xmlrpc geronimo httpunit freemarker ezmorph fop derby xmlgraphics Libs.. Java VM Java VM rt jce jsse plugin sunjce_prov. dnsns .. donderdag 25 juni 2009
  • 14. minilang party pos. product workeffort workflow … accounting assetmaint content Extensionsbi ebay ecommerce googlebase guiapp hhfacility manufact. marketing minerva oagis order Application Application layer common catalina base datafile entity widget … Application Convenience resolver rome serializer servlets tomcat xalan bsf mail mx4j naming jetty poi wsdl4j bsh Foundation Basic Something jenks jpos18 jython looks lucene xerces velocity jakarta jcl json jdbm jdom xmlapis ws-commons Core log4j barcode4j axis batik commons xmlrpc geronimo httpunit freemarker ezmorph fop derby xmlgraphics Libs.. Java VM Java VM rt jce jsse plugin sunjce_prov. dnsns .. donderdag 25 juni 2009
  • 15. by Damoiselle de Pique donderdag 25 juni 2009
  • 16. Was Pollock an Early OO Programmer? by Damoiselle de Pique donderdag 25 juni 2009
  • 17. donderdag 25 juni 2009
  • 18. modularity donderdag 25 juni 2009
  • 19. donderdag 25 juni 2009
  • 20. donderdag 25 juni 2009
  • 21. donderdag 25 juni 2009
  • 22. donderdag 25 juni 2009
  • 23. donderdag 25 juni 2009
  • 24. low coupling, donderdag 25 juni 2009
  • 25. low coupling, high cohesion & donderdag 25 juni 2009
  • 26. low coupling, high cohesion & encapsulation donderdag 25 juni 2009
  • 27. donderdag 25 juni 2009
  • 28. How Do We Handle This Complexity in Java? donderdag 25 juni 2009
  • 29. donderdag 25 juni 2009
  • 30. Visibility vs Accessibility donderdag 25 juni 2009
  • 31. Visibility Class Class S T donderdag 25 juni 2009
  • 32. Visibility Class Class S T donderdag 25 juni 2009
  • 33. Visibility Class Class S T donderdag 25 juni 2009
  • 34. Visibility Class Class S T donderdag 25 juni 2009
  • 35. Visibility Module System Class Class S T donderdag 25 juni 2009
  • 36. Hierarchical Class Loaders boot ext app app cust donderdag 25 juni 2009
  • 37. Hierarchical Class Loaders boot ext app app visibility cust donderdag 25 juni 2009
  • 38. Context Class Loaders boot X {} ext app app Y {} cust donderdag 25 juni 2009
  • 39. Context Class Loaders boot X {} ext Thread -> Context ClassLoader app app Y {} cust donderdag 25 juni 2009
  • 40. Context Class Loaders boot X {} ext Thread -> Context ClassLoader app app Y {} cust donderdag 25 juni 2009
  • 41. Accessibility public module package private donderdag 25 juni 2009
  • 42. Accessibility Class module V Class Class Class W S T class Class U package donderdag 25 juni 2009
  • 43. Java VM party common resolver axis xerces Begin rt assetmaint catalina mail ezmorph xmlapis jce hhfacility base jenks servlets xmlrpc Here jsse pos. datafile jakarta jetty xmlgraphics plugin content entity log4j looks sunjce_prov. manufact. widget httpunit jdbm dnsns product … mx4j bsf .. bi rome batik bsh marketing workflow jpos18 fop velocity workeffort ecommerce jcl tomcat ws-commons ebay oagis barcode4j poi geronimo minerva … freemarker lucene .. minilang googlebase serializer jdom json accounting order naming commons xalan guiapp ofbiz jython derby wsdl4j donderdag 25 juni 2009
  • 44. Java VM party common resolver axis xerces Begin rt assetmaint catalina mail ezmorph xmlapis jce hhfacility base jenks servlets xmlrpc Here jsse pos. datafile jakarta jetty xmlgraphics plugin content entity log4j looks sunjce_prov. manufact. widget httpunit jdbm dnsns product … mx4j bsf .. bi rome batik bsh Class marketing workflow jpos18 fop velocity Not workeffort ecommerce jcl tomcat ws-commons Found ebay oagis barcode4j poi geronimo Exception minerva … freemarker lucene .. minilang googlebase serializer jdom json accounting order naming commons xalan guiapp ofbiz jython derby wsdl4j donderdag 25 juni 2009
  • 45. Split Packages JARs A 2 B C import private export donderdag 25 juni 2009
  • 46. Split Packages package com.foo: X, Y JARs A package com.foo: X, Y, Z 2 B package com.foo: X, Y, Z C import private export donderdag 25 juni 2009
  • 47. Split Packages package com.foo: X, Y JARs A package com.foo: X, Y, Z 2 B package com.foo: X, Y, Z C import private export donderdag 25 juni 2009
  • 48. Split Packages package com.foo: X, Y JARs A package com.foo: X, Y, Z 2 B package com.foo: X, Y, Z C import private export donderdag 25 juni 2009
  • 49. Versioning JARs package com.foo: X, Y A package com.foo: X, Z 2 B package com.foo: X, Y, Z C import private export donderdag 25 juni 2009
  • 50. Versioning JARs package com.foo: X, Y A package com.bar: A,B,C;1.0 package com.foo: X, Z 2 B package com.bar: A;2.0 package com.foo: X, Y, Z C package com.bar: A,B,C;2.0 import private export donderdag 25 juni 2009
  • 51. Versioning JARs package com.foo: X, Y A package com.bar: A,B,C;1.0 package com.foo: X, Z 2 B package com.bar: A;2.0 package com.foo: X, Y, Z C package com.bar: A,B,C;2.0 import private export donderdag 25 juni 2009
  • 52. Private Packages package com.foo: X, Y JARs A package com.bar: A,B,C;1.0 package com.foo: X, Z 2 B package com.bar: A;2.0 package com.foo: X, Y, Z C package com.bar: A,B,C;2.0 import private export donderdag 25 juni 2009
  • 53. Private Packages package com.foo: X, Y JARs A package com.bar: A,B,C;1.0 package com.foo: X, Z 2 B package com.bar: A;2.0 package com.private: G package com.foo: X, Y, Z C package com.bar: A,B,C;2.0 package com.private: G,H,I import private export donderdag 25 juni 2009
  • 54. Private Packages package com.foo: X, Y JARs A package com.bar: A,B,C;1.0 package com.foo: X, Z 2 B package com.bar: A;2.0 package com.private: G package com.foo: X, Y, Z C package com.bar: A,B,C;2.0 package com.private: G,H,I import private export donderdag 25 juni 2009
  • 55. How Do We Handle This Complexity in Java? donderdag 25 juni 2009
  • 56. We Don’t ... donderdag 25 juni 2009
  • 57. donderdag 25 juni 2009
  • 58. donderdag 25 juni 2009
  • 59. Applications S (bundles) E Service C U Life Cycle R I Module T Y Execution Environment OS + Hardware donderdag 25 juni 2009
  • 60. Execution Environment donderdag 25 juni 2009
  • 61. donderdag 25 juni 2009
  • 62. CLDC/ MIDP OSGi Min. J2SE 1.3, 1.4, 5, 6, ... CDC/FP donderdag 25 juni 2009
  • 63. Kim Scarborough donderdag 25 juni 2009
  • 64. Module Layer donderdag 25 juni 2009
  • 65. Import, Export, Private Bundle A Bundle B p p q-1.4 q-[1.2,1.8) Bundle A r r . import private export donderdag 25 juni 2009
  • 66. Import, Export, Private Bundle A Bundle B imports p p q-1.4 q-[1.2,1.8) Bundle A r r . import private export donderdag 25 juni 2009
  • 67. Import, Export, Private Bundle A Bundle B imports p p exports q-1.4 q-[1.2,1.8) Bundle A r r . import private export donderdag 25 juni 2009
  • 68. donderdag 25 juni 2009
  • 69. donderdag 25 juni 2009
  • 70. Uses Constraints Bundle A Bundle B r;1.0 r;2.0 p p q-1.4 q-[1.2,1.8) Bundle C Bundle D r;1.0 r;2.0 import private export donderdag 25 juni 2009
  • 71. Uses Constraints Bundle A Bundle B r;1.0 r;2.0 imports p p q-1.4 q-[1.2,1.8) Bundle C Bundle D r;1.0 r;2.0 import private export donderdag 25 juni 2009
  • 72. Uses Constraints Bundle A Bundle B r;1.0 r;2.0 imports p p exports q-1.4 q-[1.2,1.8) Bundle C Bundle D r;1.0 r;2.0 import private export donderdag 25 juni 2009
  • 73. Uses Constraints Bundle A Bundle B r;1.0 r;2.0 imports p p exports q-1.4 q-[1.2,1.8) Bundle C Bundle D r;1.0 r;2.0 import private export donderdag 25 juni 2009
  • 74. System Loader Extension Loader Application B Loader Custom Loader donderdag 25 juni 2009
  • 75. System Loader Extension Loader Application B OSGi Loader Custom Loader donderdag 25 juni 2009
  • 76. System Loader Bundle A Extension Bundle G Bundle B Loader OSGi Bundle C Application B Framework Loader Loader Bundle F Bundle D Custom Loader Bundle E donderdag 25 juni 2009
  • 77. donderdag 25 juni 2009
  • 78. Life Cycle Layer donderdag 25 juni 2009
  • 79. INSTALLED STARTING RESOLVED ACTIVE UNINSTALLED STOPPING donderdag 25 juni 2009
  • 80. MANAGE- System MENT bundle BUNDLE Bundle X-v2 X Bundle Bundle B A donderdag 25 juni 2009
  • 81. Service Layer donderdag 25 juni 2009
  • 82. donderdag 25 juni 2009
  • 83. donderdag 25 juni 2009
  • 84. donderdag 25 juni 2009
  • 85. donderdag 25 juni 2009
  • 86. Services defined in interface/class Bundle register get Bundle A B notify donderdag 25 juni 2009
  • 87. Services interface Foo { void foo(); } void foo() { … … s.foo() } … donderdag 25 juni 2009
  • 88. donderdag 25 juni 2009
  • 89. donderdag 25 juni 2009
  • 90. donderdag 25 juni 2009
  • 91. donderdag 25 juni 2009
  • 92. donderdag 25 juni 2009
  • 93. Services Solve Class Loader Problems! donderdag 25 juni 2009
  • 94. donderdag 25 juni 2009
  • 95. Security donderdag 25 juni 2009
  • 96. donderdag 25 juni 2009
  • 97. Real Code! donderdag 25 juni 2009
  • 98. donderdag 25 juni 2009
  • 99. package com.acme; import org.osgi.framework.*; public class HelloWorld extends BundleActivator { public void start(BundleContext context) { System.out.println(“Hello World”); } public void stop(BundleContext context) { System.out.println(“Goodbye World”); } } --------------------------------------------- Manifest: 1.0 Bundle-Activator: com.acme.HelloWorld Import-Package: org.osgi.framework;version=1.3 donderdag 25 juni 2009
  • 100. Bundles are active entities in runtime donderdag 25 juni 2009
  • 101. donderdag 25 juni 2009
  • 102. 294 donderdag 25 juni 2009
  • 103. 294 7 donderdag 25 juni 2009
  • 104. donderdag 25 juni 2009
  • 105. donderdag 25 juni 2009
  • 106. Is JSR 294 a Meta Module System? (Implemented by OSGi™, Jigsaw, Guice, …) donderdag 25 juni 2009
  • 107. Is JSR 294 a Meta Module System? (Implemented by OSGi™, Jigsaw, Guice, …) No Java™ Standard for donderdag 25 juni 2009 Modules!
  • 108. donderdag 25 juni 2009
  • 109. donderdag 25 juni 2009
  • 110. donderdag 25 juni 2009
  • 111. Legacy donderdag 25 juni 2009
  • 112. Class .forName donderdag 25 juni 2009
  • 113. Class .forName donderdag 25 juni 2009
  • 114. donderdag 25 juni 2009
  • 115. Bloat? donderdag 25 juni 2009
  • 116. Accidental Complexity donderdag 25 juni 2009
  • 117. ‘97 ‘98 ‘99 ‘00 ‘01 ‘02 ‘03 ‘04 ‘05 ‘06 ‘07 ‘08 ‘09 ‘10 donderdag 25 juni 2009
  • 118. ‘97 ‘98 ‘99 ‘00 ‘01 ‘02 ‘03 ‘04 ‘05 ‘06 ‘07 ‘08 ‘09 ‘10 donderdag 25 juni 2009
  • 119. donderdag 25 juni 2009
  • 120. donderdag 25 juni 2009
  • 121. bundle A-1.2 c b bundle C-1.0 bundle a B-4.1 donderdag 25 juni 2009
  • 122. donderdag 25 juni 2009
  • 123. donderdag 25 juni 2009
  • 124. The Component Framework donderdag 25 juni 2009
  • 125. donderdag 25 juni 2009
  • 126. Q&A donderdag 25 juni 2009
  • 127. Thanks! donderdag 25 juni 2009