Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OSGi Devcon 2009 Keynote

1,620 views

Published on

The OSGi DevCon 2009 keynote presentation

Published in: Business
  • Be the first to comment

OSGi Devcon 2009 Keynote

  1. 1. Europe vrijdag 26 juni 2009
  2. 2. vrijdag 26 juni 2009
  3. 3. Peter Kriens OSGi Evangelist Europe OSGi Next vrijdag 26 juni 2009
  4. 4. OSGi Service Platform Core Specification vrijdag 26 juni 2009
  5. 5. Planning 4.2 • Core released for approval June 10 • Working on the final draft for Compendium as we speak • Compendium : July 10 • Enterprise Release Autumn • Residential Release Spring 2010 vrijdag 26 juni 2009
  6. 6. Legend vrijdag 26 juni 2009
  7. 7. Legend Bundle A Bundle B vrijdag 26 juni 2009
  8. 8. Legend Bundle A Service Bundle B vrijdag 26 juni 2009
  9. 9. Legend Bundle A getService Service registerService Bundle B vrijdag 26 juni 2009
  10. 10. Legend Bundle A getService Bundle Service C registerService Bundle B vrijdag 26 juni 2009
  11. 11. Legend Bundle A getService Bundle Service addServiceListener C registerService Bundle B vrijdag 26 juni 2009
  12. 12. Legend Bundle A getService Call/Dependency Bundle Direction Service addServiceListener C registerService Bundle B vrijdag 26 juni 2009
  13. 13. Core • Launching • Bundle Tracker • Bundle-License Header • Service Hooks • Negative Permissions vrijdag 26 juni 2009
  14. 14. Launching • To be inside a framework … • Or outside a framework ... • That’s the question! vrijdag 26 juni 2009
  15. 15. Launching • Standardizes launching different frameworks • Will enable generic launchers • Allows you to embed a framework in your application! vrijdag 26 juni 2009
  16. 16. Launching Map<String,String> p = new HashMap<String,String>(); List<String> impls = getMetaInfServices( loader, FrameworkFactory.class.getName()); if (impls.size() != 1) throw new RuntimeException( "Too many frameworks: "+ impls); Class<?> clazz = loader.loadClass(impls.get(0)); FrameworkFactory factory = (FrameworkFactory) clazz .newInstance(); Framework fw = factory.newFramework(p); Bundle b = fw.installBundle( “http://.../load/…”); b.start(); vrijdag 26 juni 2009
  17. 17. Bundle Tracker • Simple tool a la Service Tracker to track bundles • Very useful for extenders • Bundles that provide additional functionality based on data in a bundle • Tracks a set of states • Handles all concurrency issues vrijdag 26 juni 2009
  18. 18. Service Hooks • FindHook • Intercept getServiceReference(s) • EventHook • Intercept Service Event delivery • ListenerHook • Find out who is listening to what vrijdag 26 juni 2009
  19. 19. Service Hooks Bundle A Bundle B vrijdag 26 juni 2009
  20. 20. Service Hooks Bundle A Proxy Bundle Bundle B vrijdag 26 juni 2009
  21. 21. Service Hooks Bundle A FindHook Proxy EventHook Bundle Bundle B vrijdag 26 juni 2009
  22. 22. Service Hooks Bundle A FindHook Proxy EventHook Bundle Bundle B vrijdag 26 juni 2009
  23. 23. Service Hooks Bundle A ListenerHook FindHook Proxy EventHook Bundle Bundle B vrijdag 26 juni 2009
  24. 24. Service Hooks Bundle A ListenerHook FindHook Proxy EventHook Bundle Bundle B vrijdag 26 juni 2009
  25. 25. Negative Permissions • Java 2 Permissions are only positive • That is, you grant a permission P • PackagePermission(com.acme,IMPORT) • Very hard to say, all permissions except P • Lack of deny permissions vrijdag 26 juni 2009
  26. 26. Negative Permissions DENY { [...BundleSignerCondition "cn=*, o=ACME" "!" ] (...PackagePermission "com.acme.secret.*" "import,exportonly" ) } ALLOW { (...PackagePermission "*" "*" ) } vrijdag 26 juni 2009
  27. 27. Compendium • Initial Provisioning • Bundle Tracker • Declarative Services • Remote Services • Blueprint Extender vrijdag 26 juni 2009
  28. 28. Remote Services • RFC 119 • Formerly Distributed OSGi • Distribution Software uses services to: • Maps a service to/from a remote system • Uses a service to abstract a communication endpoint vrijdag 26 juni 2009
  29. 29. Remote Services Distribution Distribution Provider Provider X’ Bundle B vrijdag 26 juni 2009
  30. 30. Remote Services Distribution Distribution X Provider Provider X’ Bundle B vrijdag 26 juni 2009
  31. 31. Remote Services Bundle A Distribution Distribution X Provider Provider X’ Bundle B vrijdag 26 juni 2009
  32. 32. Remote Services Bundle A Distribution Distribution X Provider Provider X’ Bundle B vrijdag 26 juni 2009
  33. 33. Remote Services Bundle A Distribution Distribution X Provider Provider X’ Bundle B vrijdag 26 juni 2009
  34. 34. Remote Services Bundle A Distribution Distribution X Provider Provider exports X’ Bundle B vrijdag 26 juni 2009
  35. 35. Remote Services Bundle A Distribution Distribution X Provider Provider exports X’ Bundle B vrijdag 26 juni 2009
  36. 36. Remote Services Bundle A Distribution Distribution X Provider Provider exports X’ Bundle B vrijdag 26 juni 2009
  37. 37. Remote Services Bundle A Distribution Distribution X Provider Provider exports X’ Bundle B vrijdag 26 juni 2009
  38. 38. Remote Services Bundle A Distribution Distribution X Provider Provider exports imports X’ Bundle B vrijdag 26 juni 2009
  39. 39. Remote Services Bundle A Distribution Distribution X Provider Provider exports imports X’ Bundle B vrijdag 26 juni 2009
  40. 40. Remote Services Bundle A Distribution Distribution X Provider Provider exports imports X’ Bundle B vrijdag 26 juni 2009
  41. 41. Remote Services Bundle A Distribution Distribution X Provider Provider exports imports X’ Bundle B vrijdag 26 juni 2009
  42. 42. Remote Services Bundle A Distribution Distribution X Provider Provider exports imports X’ Bundle B Framework 1 Framework 2 vrijdag 26 juni 2009
  43. 43. Remote Services • Service Properties define the interaction • Intents specify the required/provided capabilities • Filters used to match • Service Component Architecture (SCA) • Interaction specified, not mandated • Flexible configuration options vrijdag 26 juni 2009
  44. 44. Service Properties Distribution Provider <other properties> <other properties> service.exported.intents service.intents service.exported.intents service.exported.intents.extra service.imported service.exported.interfaces objectClass service.exported.configs service.imported.configs remote.intents.supported remote.configs.supported Framework 1 Framework 2 vrijdag 26 juni 2009
  45. 45. Service Properties Distribution Provider <other properties> <other properties> service.exported.intents service.intents service.exported.intents service.exported.intents.extra service.imported service.exported.interfaces objectClass service.exported.configs service.imported.configs remote.intents.supported remote.configs.supported Framework 1 Framework 2 vrijdag 26 juni 2009
  46. 46. Service Properties Distribution Provider <other properties> <other properties> service.exported.intents service.intents service.exported.intents service.exported.intents.extra service.imported service.exported.interfaces objectClass service.exported.configs service.imported.configs endpoint remote.intents.supported remote.configs.supported Framework 1 Framework 2 vrijdag 26 juni 2009
  47. 47. Service Properties Distribution Provider <other properties> <other properties> service.exported.intents service.intents service.exported.intents service.exported.intents.extra service.imported service.exported.interfaces objectClass service.exported.configs service.imported.configs endpoint remote.intents.supported remote.configs.supported Framework 1 Framework 2 vrijdag 26 juni 2009
  48. 48. Blueprint Extender • RFC 124 • Provides Spring DM Functionality • Blueprint Extender uses XML definitions in bundle to create & wire application objects • Namespace Handler services, not yet :-( • Provides damping • Proxies services vrijdag 26 juni 2009
  49. 49. Blueprint Extender XML vrijdag 26 juni 2009
  50. 50. Blueprint Extender Blueprint XML Container vrijdag 26 juni 2009
  51. 51. Blueprint Extender Blueprint XML Container vrijdag 26 juni 2009
  52. 52. Blueprint Extender Blueprint XML Container BeanMetadata ServiceMetadata Reference Metadata vrijdag 26 juni 2009
  53. 53. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Reference Metadata vrijdag 26 juni 2009
  54. 54. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata vrijdag 26 juni 2009
  55. 55. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata Reference vrijdag 26 juni 2009
  56. 56. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata Reference vrijdag 26 juni 2009
  57. 57. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata Reference vrijdag 26 juni 2009
  58. 58. Blueprint Extender Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata Reference vrijdag 26 juni 2009
  59. 59. Blueprint Extender Application Objects Blueprint XML Container BeanMetadata Bean ServiceMetadata Service Reference Metadata Reference vrijdag 26 juni 2009
  60. 60. Metadata Null NonNull Props Metadata Metadata Metadata IdRef Value Component Collection Map Metadata Metadata Metadata Metadata Metadata Ref Map Metadata Entry Service Bean Service Reference Target Metadata Metadata Metadata Ref Reference Bean Bean Collection Metadata Property Argument Metadata Registration Listener Listener vrijdag 26 juni 2009
  61. 61. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  62. 62. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  63. 63. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  64. 64. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  65. 65. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  66. 66. Damping Reference service object service App proxy object service object vrijdag 26 juni 2009
  67. 67. Damping Reference service object App proxy service object vrijdag 26 juni 2009
  68. 68. Damping Reference service object App proxy service object vrijdag 26 juni 2009
  69. 69. Damping Reference service object App proxy service object vrijdag 26 juni 2009
  70. 70. Damping Reference service object App proxy service object vrijdag 26 juni 2009
  71. 71. Damping Ref-list service proxy object service App List proxy object service proxy object vrijdag 26 juni 2009
  72. 72. Enterprise • Transactions • JDBC Database Access • JMX • JNDI • JPA • Connectors vrijdag 26 juni 2009
  73. 73. Experimental • TSL • Nested Frameworks • OBR vrijdag 26 juni 2009
  74. 74. TSL • A Tiny Script Language • Feels like a shell • Acts like a script language • Uses reflection, but simplifies syntax • No new commands • Will become Felix project vrijdag 26 juni 2009
  75. 75. TSL Telnet Console ... Shell Shell Shell OSGi Command Convert. Shell Converter ThreadIO Eclipse TSL Thread Convert. Impl IO * Felix osgi.command.name=xxx Convert. osgi.command.function=yyy Frame Basic ... Work Cmnds Cmnds Cmnds vrijdag 26 juni 2009
  76. 76. TSL $ echo Hello World Hello World $ echo <bundle 1> initial@reference:file:org.eclipse.osgi.util_3.1.200.v200 70605.jar/ [1] $ ls eclipse eclipse.ini load runner $ ls /Ws aQute felix-trunk osgi osgi-books vrijdag 26 juni 2009
  77. 77. TSL $ <bundle 6> headers Tool Bnd-0.0.169 Bundle-Activator aQute.fileinstall.FileInstall Export-Package aQute.fileinstall ... Created-By 1.6.0_01 (Sun Microsystems Inc.) Bnd-LastModified 1184160147361 Bundle-Version 1.3 Bundle-ManifestVersion2 Manifest-Version 1.0 Import-Package aQute.fileinstall, ... Bundle-Name biz.aQute.fileinstall Bundle-Description This bundle watches a .... Bundle-SymbolicName biz.aQute.fileinstall vrijdag 26 juni 2009
  78. 78. TSL $ help={each <<$it class> declaredmethods> {$it name }} aQute.shell.runtime.Closure@90a284 $ help <bundle 6> loadClass getResource ... checkLoader closeBundleLoader getLoaderProxy $ echo $exception E: java.lang.NullPointerException $ echo $exception java.lang.NullPointerException $ $exception printstacktrace $ // the output is temporarily on reall stderr ... vrijdag 26 juni 2009
  79. 79. Nested Frameworks • Application Server Vendors want scoping of applications … • Basic Idea OSGi is: • The Application == the set of installed bundles • Compromise: • All Frameworks to be nested vrijdag 26 juni 2009
  80. 80. Nested Frameworks System Bundle Framework P vrijdag 26 juni 2009
  81. 81. Nested Frameworks System Bundle Composite Bundle Framework P vrijdag 26 juni 2009
  82. 82. Nested Frameworks Framework C System Bundle Composite Bundle Framework P vrijdag 26 juni 2009
  83. 83. Nested Frameworks Framework C System Bundle System Bundle Composite Bundle Framework P vrijdag 26 juni 2009
  84. 84. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle Framework P vrijdag 26 juni 2009
  85. 85. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle Framework P vrijdag 26 juni 2009
  86. 86. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle A Framework P vrijdag 26 juni 2009
  87. 87. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle A Framework P vrijdag 26 juni 2009
  88. 88. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle A Framework P vrijdag 26 juni 2009
  89. 89. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle B App Bundle A Framework P vrijdag 26 juni 2009
  90. 90. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle B App Bundle A Framework P vrijdag 26 juni 2009
  91. 91. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle B App Bundle A Framework P vrijdag 26 juni 2009
  92. 92. Nested Frameworks Framework C System Bundle System Bundle Composite Surrogate Bundle Bundle App Bundle B App Bundle A Framework P vrijdag 26 juni 2009
  93. 93. Java Modularity vrijdag 26 juni 2009
  94. 94. Java Modularity 294 vrijdag 26 juni 2009
  95. 95. Java Modularity 294 vrijdag 26 juni 2009 7
  96. 96. Java Modularity 42 vrijdag 26 juni 2009
  97. 97. Java Modularity vrijdag 26 juni 2009
  98. 98. Java Modularity vrijdag 26 juni 2009
  99. 99. Java Modularity vrijdag 26 juni 2009
  100. 100. Java Modularity vrijdag 26 juni 2009
  101. 101. Java Modularity vrijdag 26 juni 2009
  102. 102. Java Modularity module vrijdag 26 juni 2009
  103. 103. Java Modularity module class Foo {} public class Bar { module int foo() {} } module interface Baz {} vrijdag 26 juni 2009
  104. 104. Java Modularity Visibility vs Accessibility vrijdag 26 juni 2009
  105. 105. Visibility Class Class S T vrijdag 26 juni 2009
  106. 106. Visibility Class Class S T vrijdag 26 juni 2009
  107. 107. Visibility Class Class S T vrijdag 26 juni 2009
  108. 108. Visibility Class Class S T vrijdag 26 juni 2009
  109. 109. Visibility Class Class S T vrijdag 26 juni 2009
  110. 110. Visibility Module System Class Class S T vrijdag 26 juni 2009
  111. 111. Accessibility public module package private vrijdag 26 juni 2009
  112. 112. Accessibility Class S vrijdag 26 juni 2009
  113. 113. Accessibility Class Class S T class vrijdag 26 juni 2009
  114. 114. Accessibility Class Class S T class Class U package vrijdag 26 juni 2009
  115. 115. Accessibility module Class V Class Class S T class Class U package vrijdag 26 juni 2009
  116. 116. Accessibility module Class V Class Class S T class Class U package vrijdag 26 juni 2009
  117. 117. Accessibility module Class V Class Class Class W S T class Class U package vrijdag 26 juni 2009
  118. 118. Is JSR 294 a Meta Module System? (Implemented by OSGi™, Jigsaw, Guice, …) vrijdag 26 juni 2009
  119. 119. Is JSR 294 a Meta Module System? (Implemented by OSGi™, Jigsaw, Guice, …) No Java™ Standard for vrijdag 26 juni 2009 Modules!
  120. 120. OSGi Modules: Bundle = Module Bundle module vrijdag 26 juni 2009
  121. 121. OSGi Modules: Bundle = Multiple Modules Bundle module A module B vrijdag 26 juni 2009
  122. 122. OSGi Modules: Modules Cross Bundles Bundle A Bundle B module vrijdag 26 juni 2009
  123. 123. OSGi Modules: Nested? Bundle module A module B vrijdag 26 juni 2009
  124. 124. Module Dependencies Bundle A Bundle B module A module B vrijdag 26 juni 2009
  125. 125. Module Dependencies Bundle A Bundle B module A module B requires provides permits vrijdag 26 juni 2009
  126. 126. Module Dependencies ? Bundle A Bundle B module A module B requires provides permits vrijdag 26 juni 2009
  127. 127. vrijdag 26 juni 2009
  128. 128. Europe vrijdag 26 juni 2009

×