SlideShare a Scribd company logo
1 of 32
Download to read offline
Component-based ontwikkelen met OSGi 
1 
van embedded tot enterprise 
Marcel Offermans
2 
Even voorstellen 
Marcel Offermans 
– Software architect bij 
luminis® 
– Committer bij 
Apache Felix 
e-mail: marcel.offermans@luminis.nl
3 
Agenda 
• OSGi 
– Geschiedenis 
– Het framework in vogelvlucht 
• Standaardisatie efforts rond OSGi 
– JSR 277 en JSR 294 
– JSR 291 
• Van embedded naar enterprise 
– Apache Harmony 
– Apache Directory Server 
– Cocoon, Spring, Eclipse, James
4 
Agenda 
• OSGi 
– Geschiedenis 
– Het framework in vogelvlucht 
• Standaardisatie efforts rond OSGi 
– JSR 277 en JSR 294 
– JSR 291 
• Van embedded naar enterprise 
– Apache Harmony 
– Apache Directory Server 
– Cocoon, Spring, Eclipse, James
5 
OSGi geschiedenis 
• Ontstaan als standaard embedded platform voor 
de “home gateway” 
• Aanvankelijk onder JCP als JSR-8 (1999) 
• OSGi alliance, bestaande uit een groot aantal 
vooraanstaande bedrijven, met als missie: 
– Beheren en publiceren de OSGi specificatie. 
– Certificeren van implementaties. 
– Organiseren van events. 
• Huidige versie: OSGi Release 4 (augustus 2005)
6 
OSGi Framework 
• Component gebaseerd framework 
• Componenten heten bundles 
• Framework: 
• security layer 
• module layer 
• life-cycle layer 
• service registry 
Service 
Life-cycle 
Module 
Security 
Bundle Bundle Bundle
7 
OSGi Security layer 
• Gebaseerd op Java 2 security model 
• Mogelijkheid om bundles te signen 
• Permission Admin service verzorgt dynamische 
configuratie 
Service 
Life-cycle 
Module 
Security 
Bundle Bundle Bundle
8 
OSGi Module layer 
• Eenheid van modularisatie is de bundle (JAR) 
• Bundle bevat Java packages (en resources) 
• Bundle bepaalt welke packages publiek 
toegankelijk zijn (geexporteerd 
worden) en welke niet: 
Service 
naam + versienummer 
• Bundle geeft ook aan 
Life-cycle 
welke externe packages 
Module 
nodig zijn (imports): 
naam + versie range Security 
Bundle Bundle Bundle
9 
OSGi Life-cycle layer 
• Beheert de life-cycle van bundles 
• BundleActivator start() en stop() hooks 
Service 
Life-cycle 
Module 
Security 
Bundle Bundle Bundle
10 
OSGi Service registry 
• Bundles kunnen services registreren: 
• op naam: net.luminis.DataStore 
• aangevuld met properties: { type=file, atomic=no } 
• Bundles kunnen services 
gebruiken: 
• via registratie van listener 
• met dependency injection 
• via declarative services 
Service 
Life-cycle 
Module 
Security 
Bundle Bundle Bundle
11 
OSGi frameworks & tools 
• Verschillende open source implementaties: 
– Apache Felix 
– Eclipse Equinox 
– Gatespace Telematics' Knopflerfish 
• Eclipse IDE project support 
– IDE/RCP is gebaseerd op OSGi 
– Bundles heten “plug-ins” 
• Maven 2 support 
– Nog volop in ontwikkeling, maar bruikbaar
12 
Agenda 
• OSGi 
– Geschiedenis 
– Het framework in vogelvlucht 
• Standaardisatie efforts rond OSGi 
– JSR 277 en JSR 294 
– JSR 291 
• Van embedded naar enterprise 
– Apache Harmony 
– Apache Directory Server 
– Cocoon, Spring, Eclipse, James
13 
JSR-277 Java Module System 
• Versioning 
– Hoe nummer je versies? 
– Hoe draai je meerdere versies parallel? 
• Distributie en packaging 
– JAR files? 
• Dynamische connectiviteit 
– Hoe resolve je modules? 
• Repositories 
– Lokale opslag 
– Beheer en security
14 
JSR-277 Java Module System (2) 
• Pluspunten 
– Goed om dit in standaard Java te regelen 
• Minpunten 
– Richt zich aanvankelijk alleen op J2SE 
– Onderdeel van Java 7 (pas in 2008)
15 
JSR-294 Improved Modularity Support 
• Richt zich op development (JSR-277 op 
deployment) 
• Information Hiding 
– Introductie van “superpackages” die beschrijven wat 
publiek is en wat private. 
• Module files 
– Meerdere versies kunnen tegelijk aanwezig zijn 
• Afzonderlijk compileren 
– Simpel gezegd, compileren met alleen de publieke 
interfaces beschikbaar
JSR-294 Improved Modularity Support (2) 
super package com.sun.myModule { 
export com.sun.myModule.myStuff.*; 
export com.sun.myModule.yourStuff.Interface; 
com.sun.myModule.myStuff; 
com.sun.myModule.yourStuff; 
com.sun.SomeOtherModule.theirStuff; 
org.someOpenSource.someCoolStuff; 
} 
16
17 
JSR-294 Improved Modularity Support (3) 
• Pluspunten 
– Wederom, dit is goed om te standaardiseren 
• Minpunten 
– Ten tijde van de JavaOne 2006 nog veel 
onbeantwoorde vragen
18 
JSR-291 Dynamic Component Support 
• Richt zich op alle Java SE versies (oud en nieuw) 
• Complementair met JSR-232, die 't zelfde doet 
voor Java ME (CDC profiel) 
• Dynamic Component Model 
• Life-cycle Management 
• Bouwt op de ervaringen van Apache, Eclipse en 
OSGi 
• Subset van OSGi R4 (geen service registry)
19 
JSR-291 Dynamic Component Support (2) 
• Pluspunten 
– Bouwt voort op ervaring 
– Voor alle Java versies 
• Minpunten 
– Risico op politieke weerstand van Sun
20 
Agenda 
• OSGi 
– Geschiedenis 
– Het framework in vogelvlucht 
• Standaardisatie efforts rond OSGi 
– JSR 277 en JSR 294 
– JSR 291 
• Van embedded naar enterprise 
– Apache Harmony 
– Apache Directory Server 
– Cocoon, Spring, Eclipse, James
21 
Apache Harmony 
• Doelstellingen: 
– Implementatie van Java 5 SE 
– Modulaire architectuur (VM en class libraries) 
– Beschermen van “intellectual property” 
• Project is een jaar oud 
• Donaties van onder andere Intel en IBM
22 
Apache Harmony (2) 
Architectuur in vogelvlucht:
23 
Apache Harmony (3) 
Modulaire Java API implementatie: 
Donatie van Intel 
bekendgemaakt op JavaOne
24 
Apache Directory Server 
• Server software met OSGi als basis, omdat: 
– Het tijdens ontwikkeling zorgt voor: 
• scheiding van verantwoordelijkheden. 
– Het run-time ervoor zorgt dat: 
• de server niet gestopt hoeft te worden voor updates; 
• third-party vendors eenvoudig nieuwe functionaliteit 
kunnen toevoegen;
25 
Spring Framework 
• Support voor OSGi in de roadmap voor 2.1 RC1 
(issue SPR-1802): 
– Spring zelf deployen als een set bundles. 
– Spring application context in een bundle. 
– Integratie van OSGi services en Spring's 
dependency injection, met proxy support. 
• Natuurlijke aanvulling op Spring, het brengt meer 
dynamica.
26 
Cocoon 
• Een jaar geleden 
begonnen met 
experimenteren met 
OSGi
27 
Eclipse 
• Plug-in = bundle 
• Basis van Eclipse en 
RCP is Equinox, een 
OSGi R4 implementatie 
• Uitgebreide support voor: 
– ontwikkelen van bundles 
– uitvoeren en debuggen 
– hot code replace
28 
Eclipse
Apache James Enterprise Mail Server 
!From: apache@bago.org 
!Subject: Re: ApacheCon EU OSGi panel 
!Date: June 14, 2006 18:53:14 GMT+02:00 
!To: !felix-dev@incubator.apache.org 
!Cc: server-dev@james.apache.org 
! 
I just want to add that also we, at Apache James project, discussed about 
removing our Avalon Phoenix dependency in favor of OSGi/Felix. 
I crosspost this to james server-dev list, to let James developers know of 
this message and eventually raise questions, and felix may be interested 
to know that also James like Directory, Harmony and Cocoon is 
monitoring Felix. 
29
Conclusies 
• Waar OSGi jaren geleden primair voor de 
embedded “home gateway” ontworpen is, zie je 
dat de problemen die het oplost ook voor desktop 
en server applicaties relevant zijn. 
• Er zijn een aantal standaarden in ontwikkeling om 
delen van de door OSGi geboden functionaliteit 
vast te leggen in het Java Community Proces, met 
momenteel nog redelijk wat overlap tussen 
verschillende standaards. 
30
31 
Vragen? 
http://www.luminis.nl/ 
marcel.offermans@luminis.nl
Meer weten? Links... 
• OSGi sites 
– http://osgi.org/ en http://bundles.osgi.org/ 
– http://incubator.apache.org/felix/ 
– http://www.knopflerfish.org/ 
– http://www.eclipse.org/osgi/ 
• Boeken 
Er zijn niet veel boeken over OSGi, dus ik raad een ieder aan om in elk geval op internet te 
zoeken naar informatie en de OSGi specificatie te lezen. 
– Eclipse Rich Client Platform : Designing, Coding, and Packaging Java(TM) Applications 
Goed boek waar ook een hoop instaat over OSGi ontwikkeling in het algemeen. 
– Programming Open Service Gateways with Java Embedded Server™ Technology 
Een oud boek, dus qua specificatie wel gedateerd, maar wel geschikt om de basisprincipes te leren. 
32

More Related Content

Similar to Component-based ontwikkelen met OSGi: van embedded tot enterprise

Fedora Op Klompen De Praktijk
Fedora Op Klompen   De PraktijkFedora Op Klompen   De Praktijk
Fedora Op Klompen De PraktijkFunc
 
Versiebeheer van database changes
Versiebeheer van database changesVersiebeheer van database changes
Versiebeheer van database changesArjen van Vliet
 
Mijn site beveiliging
Mijn site beveiligingMijn site beveiliging
Mijn site beveiligingMarko Heijnen
 
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)Avansa Mid- en Zuidwest
 
Oracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themOracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themMark Koreman
 
Drupaljam2015 logstash
Drupaljam2015 logstashDrupaljam2015 logstash
Drupaljam2015 logstashWebscale
 
Introductie robot framework
Introductie robot frameworkIntroductie robot framework
Introductie robot frameworkchristiantester
 
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en Ekkelenkamp
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en EkkelenkampDSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en Ekkelenkamp
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en EkkelenkampDeltares
 
2019 diy migration webinar gs nl
2019 diy migration webinar gs nl2019 diy migration webinar gs nl
2019 diy migration webinar gs nlEDB
 
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...Adlib_gebruikersgroep
 
Toegang tot digitale objecten - viewers en Resolver
Toegang tot digitale objecten - viewers en ResolverToegang tot digitale objecten - viewers en Resolver
Toegang tot digitale objecten - viewers en ResolverLIBIS
 
Liferay 6.2 Roadmap 28 Jan 2013
Liferay 6.2 Roadmap 28 Jan 2013Liferay 6.2 Roadmap 28 Jan 2013
Liferay 6.2 Roadmap 28 Jan 2013Ruud Kluivers
 
Lucius Drupal Development Cursus
Lucius Drupal Development CursusLucius Drupal Development Cursus
Lucius Drupal Development CursusLuciuswebsystems
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)dpc
 
Techdays 2013 NL - Serious Request met Windows Azure
Techdays 2013 NL - Serious Request met Windows AzureTechdays 2013 NL - Serious Request met Windows Azure
Techdays 2013 NL - Serious Request met Windows AzureMichaël Hompus
 
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - Long
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - LongInuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - Long
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - LongSURFconext
 
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012MediaMosa
 
Introductie Drupal development
Introductie Drupal developmentIntroductie Drupal development
Introductie Drupal developmentBart Hanssens
 
Cloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionCloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionJan Penninkhof
 

Similar to Component-based ontwikkelen met OSGi: van embedded tot enterprise (20)

Fedora Op Klompen De Praktijk
Fedora Op Klompen   De PraktijkFedora Op Klompen   De Praktijk
Fedora Op Klompen De Praktijk
 
Versiebeheer van database changes
Versiebeheer van database changesVersiebeheer van database changes
Versiebeheer van database changes
 
Mijn site beveiliging
Mijn site beveiligingMijn site beveiliging
Mijn site beveiliging
 
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)
Digipinguins: containers en virtualisatie (Ghlen Nagels - youngsource.be)
 
Oracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themOracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage them
 
Drupaljam2015 logstash
Drupaljam2015 logstashDrupaljam2015 logstash
Drupaljam2015 logstash
 
Introductie robot framework
Introductie robot frameworkIntroductie robot framework
Introductie robot framework
 
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en Ekkelenkamp
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en EkkelenkampDSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en Ekkelenkamp
DSD-NL 2021 Delft-FEWS in de cloud - Schotmeijer en Ekkelenkamp
 
2019 diy migration webinar gs nl
2019 diy migration webinar gs nl2019 diy migration webinar gs nl
2019 diy migration webinar gs nl
 
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...
Adlib gebruikersgroep - najaarsbijeenkomst 2018 - Mededelingen van Axiell ALM...
 
Toegang tot digitale objecten - viewers en Resolver
Toegang tot digitale objecten - viewers en ResolverToegang tot digitale objecten - viewers en Resolver
Toegang tot digitale objecten - viewers en Resolver
 
Liferay 6.2 Roadmap 28 Jan 2013
Liferay 6.2 Roadmap 28 Jan 2013Liferay 6.2 Roadmap 28 Jan 2013
Liferay 6.2 Roadmap 28 Jan 2013
 
Lucius Drupal Development Cursus
Lucius Drupal Development CursusLucius Drupal Development Cursus
Lucius Drupal Development Cursus
 
Symfony (Dutch PHP Conference)
Symfony (Dutch PHP Conference)Symfony (Dutch PHP Conference)
Symfony (Dutch PHP Conference)
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)
 
Techdays 2013 NL - Serious Request met Windows Azure
Techdays 2013 NL - Serious Request met Windows AzureTechdays 2013 NL - Serious Request met Windows Azure
Techdays 2013 NL - Serious Request met Windows Azure
 
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - Long
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - LongInuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - Long
Inuits en RUG - MediaSalsa - Video Vendor Event 19 juni 2012 - Long
 
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012
MediaSalsa - Inuits and RUG - Video Vendor Event - 19 juni 2012
 
Introductie Drupal development
Introductie Drupal developmentIntroductie Drupal development
Introductie Drupal development
 
Cloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionCloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolution
 

More from Marcel Offermans

Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi ApplicationsMarcel Offermans
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixMarcel Offermans
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesMarcel Offermans
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro ServicesMarcel Offermans
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureMarcel Offermans
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixMarcel Offermans
 

More from Marcel Offermans (7)

De leukste Bug
De leukste BugDe leukste Bug
De leukste Bug
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi Applications
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache Felix
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependencies
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro Services
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the future
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache Felix
 

Component-based ontwikkelen met OSGi: van embedded tot enterprise

  • 1. Component-based ontwikkelen met OSGi 1 van embedded tot enterprise Marcel Offermans
  • 2. 2 Even voorstellen Marcel Offermans – Software architect bij luminis® – Committer bij Apache Felix e-mail: marcel.offermans@luminis.nl
  • 3. 3 Agenda • OSGi – Geschiedenis – Het framework in vogelvlucht • Standaardisatie efforts rond OSGi – JSR 277 en JSR 294 – JSR 291 • Van embedded naar enterprise – Apache Harmony – Apache Directory Server – Cocoon, Spring, Eclipse, James
  • 4. 4 Agenda • OSGi – Geschiedenis – Het framework in vogelvlucht • Standaardisatie efforts rond OSGi – JSR 277 en JSR 294 – JSR 291 • Van embedded naar enterprise – Apache Harmony – Apache Directory Server – Cocoon, Spring, Eclipse, James
  • 5. 5 OSGi geschiedenis • Ontstaan als standaard embedded platform voor de “home gateway” • Aanvankelijk onder JCP als JSR-8 (1999) • OSGi alliance, bestaande uit een groot aantal vooraanstaande bedrijven, met als missie: – Beheren en publiceren de OSGi specificatie. – Certificeren van implementaties. – Organiseren van events. • Huidige versie: OSGi Release 4 (augustus 2005)
  • 6. 6 OSGi Framework • Component gebaseerd framework • Componenten heten bundles • Framework: • security layer • module layer • life-cycle layer • service registry Service Life-cycle Module Security Bundle Bundle Bundle
  • 7. 7 OSGi Security layer • Gebaseerd op Java 2 security model • Mogelijkheid om bundles te signen • Permission Admin service verzorgt dynamische configuratie Service Life-cycle Module Security Bundle Bundle Bundle
  • 8. 8 OSGi Module layer • Eenheid van modularisatie is de bundle (JAR) • Bundle bevat Java packages (en resources) • Bundle bepaalt welke packages publiek toegankelijk zijn (geexporteerd worden) en welke niet: Service naam + versienummer • Bundle geeft ook aan Life-cycle welke externe packages Module nodig zijn (imports): naam + versie range Security Bundle Bundle Bundle
  • 9. 9 OSGi Life-cycle layer • Beheert de life-cycle van bundles • BundleActivator start() en stop() hooks Service Life-cycle Module Security Bundle Bundle Bundle
  • 10. 10 OSGi Service registry • Bundles kunnen services registreren: • op naam: net.luminis.DataStore • aangevuld met properties: { type=file, atomic=no } • Bundles kunnen services gebruiken: • via registratie van listener • met dependency injection • via declarative services Service Life-cycle Module Security Bundle Bundle Bundle
  • 11. 11 OSGi frameworks & tools • Verschillende open source implementaties: – Apache Felix – Eclipse Equinox – Gatespace Telematics' Knopflerfish • Eclipse IDE project support – IDE/RCP is gebaseerd op OSGi – Bundles heten “plug-ins” • Maven 2 support – Nog volop in ontwikkeling, maar bruikbaar
  • 12. 12 Agenda • OSGi – Geschiedenis – Het framework in vogelvlucht • Standaardisatie efforts rond OSGi – JSR 277 en JSR 294 – JSR 291 • Van embedded naar enterprise – Apache Harmony – Apache Directory Server – Cocoon, Spring, Eclipse, James
  • 13. 13 JSR-277 Java Module System • Versioning – Hoe nummer je versies? – Hoe draai je meerdere versies parallel? • Distributie en packaging – JAR files? • Dynamische connectiviteit – Hoe resolve je modules? • Repositories – Lokale opslag – Beheer en security
  • 14. 14 JSR-277 Java Module System (2) • Pluspunten – Goed om dit in standaard Java te regelen • Minpunten – Richt zich aanvankelijk alleen op J2SE – Onderdeel van Java 7 (pas in 2008)
  • 15. 15 JSR-294 Improved Modularity Support • Richt zich op development (JSR-277 op deployment) • Information Hiding – Introductie van “superpackages” die beschrijven wat publiek is en wat private. • Module files – Meerdere versies kunnen tegelijk aanwezig zijn • Afzonderlijk compileren – Simpel gezegd, compileren met alleen de publieke interfaces beschikbaar
  • 16. JSR-294 Improved Modularity Support (2) super package com.sun.myModule { export com.sun.myModule.myStuff.*; export com.sun.myModule.yourStuff.Interface; com.sun.myModule.myStuff; com.sun.myModule.yourStuff; com.sun.SomeOtherModule.theirStuff; org.someOpenSource.someCoolStuff; } 16
  • 17. 17 JSR-294 Improved Modularity Support (3) • Pluspunten – Wederom, dit is goed om te standaardiseren • Minpunten – Ten tijde van de JavaOne 2006 nog veel onbeantwoorde vragen
  • 18. 18 JSR-291 Dynamic Component Support • Richt zich op alle Java SE versies (oud en nieuw) • Complementair met JSR-232, die 't zelfde doet voor Java ME (CDC profiel) • Dynamic Component Model • Life-cycle Management • Bouwt op de ervaringen van Apache, Eclipse en OSGi • Subset van OSGi R4 (geen service registry)
  • 19. 19 JSR-291 Dynamic Component Support (2) • Pluspunten – Bouwt voort op ervaring – Voor alle Java versies • Minpunten – Risico op politieke weerstand van Sun
  • 20. 20 Agenda • OSGi – Geschiedenis – Het framework in vogelvlucht • Standaardisatie efforts rond OSGi – JSR 277 en JSR 294 – JSR 291 • Van embedded naar enterprise – Apache Harmony – Apache Directory Server – Cocoon, Spring, Eclipse, James
  • 21. 21 Apache Harmony • Doelstellingen: – Implementatie van Java 5 SE – Modulaire architectuur (VM en class libraries) – Beschermen van “intellectual property” • Project is een jaar oud • Donaties van onder andere Intel en IBM
  • 22. 22 Apache Harmony (2) Architectuur in vogelvlucht:
  • 23. 23 Apache Harmony (3) Modulaire Java API implementatie: Donatie van Intel bekendgemaakt op JavaOne
  • 24. 24 Apache Directory Server • Server software met OSGi als basis, omdat: – Het tijdens ontwikkeling zorgt voor: • scheiding van verantwoordelijkheden. – Het run-time ervoor zorgt dat: • de server niet gestopt hoeft te worden voor updates; • third-party vendors eenvoudig nieuwe functionaliteit kunnen toevoegen;
  • 25. 25 Spring Framework • Support voor OSGi in de roadmap voor 2.1 RC1 (issue SPR-1802): – Spring zelf deployen als een set bundles. – Spring application context in een bundle. – Integratie van OSGi services en Spring's dependency injection, met proxy support. • Natuurlijke aanvulling op Spring, het brengt meer dynamica.
  • 26. 26 Cocoon • Een jaar geleden begonnen met experimenteren met OSGi
  • 27. 27 Eclipse • Plug-in = bundle • Basis van Eclipse en RCP is Equinox, een OSGi R4 implementatie • Uitgebreide support voor: – ontwikkelen van bundles – uitvoeren en debuggen – hot code replace
  • 29. Apache James Enterprise Mail Server !From: apache@bago.org !Subject: Re: ApacheCon EU OSGi panel !Date: June 14, 2006 18:53:14 GMT+02:00 !To: !felix-dev@incubator.apache.org !Cc: server-dev@james.apache.org ! I just want to add that also we, at Apache James project, discussed about removing our Avalon Phoenix dependency in favor of OSGi/Felix. I crosspost this to james server-dev list, to let James developers know of this message and eventually raise questions, and felix may be interested to know that also James like Directory, Harmony and Cocoon is monitoring Felix. 29
  • 30. Conclusies • Waar OSGi jaren geleden primair voor de embedded “home gateway” ontworpen is, zie je dat de problemen die het oplost ook voor desktop en server applicaties relevant zijn. • Er zijn een aantal standaarden in ontwikkeling om delen van de door OSGi geboden functionaliteit vast te leggen in het Java Community Proces, met momenteel nog redelijk wat overlap tussen verschillende standaards. 30
  • 31. 31 Vragen? http://www.luminis.nl/ marcel.offermans@luminis.nl
  • 32. Meer weten? Links... • OSGi sites – http://osgi.org/ en http://bundles.osgi.org/ – http://incubator.apache.org/felix/ – http://www.knopflerfish.org/ – http://www.eclipse.org/osgi/ • Boeken Er zijn niet veel boeken over OSGi, dus ik raad een ieder aan om in elk geval op internet te zoeken naar informatie en de OSGi specificatie te lezen. – Eclipse Rich Client Platform : Designing, Coding, and Packaging Java(TM) Applications Goed boek waar ook een hoop instaat over OSGi ontwikkeling in het algemeen. – Programming Open Service Gateways with Java Embedded Server™ Technology Een oud boek, dus qua specificatie wel gedateerd, maar wel geschikt om de basisprincipes te leren. 32