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.
dynamic
        deployment
         with OSGi


Angelo van der Sijpt
angelo.vandersijpt@luminis.nl
how about modules?
Partitioning software

• modular, componentized, ...
• minimize dependencies
• consider rate of change
• minimize complexi...
Reuse: copy/paste




• no clearly defined interface
• maintenance nightmare
Reuse: Object Oriented




• objects tend to work badly when
  taken out of context
Reuse: Components




• components are black boxes
• clear “interfaces” with their
>)=9)%)%                                                    A(..0=9




               28"=4?
                            ...
>)=9)%)%                                                                  A(..0=9
                %)=9)%)%                ...
%)=9)%)%                                                                     #(..0=9
                >)=9)%)%             ...
OSGi technology is the dynamic module system for
Java™
OSGi technology is Universal Middleware.
OSGi technology provides a...
!"#$%"&'($)&%*+,-./'0                                          !"#$%"&'($)&%*+,-./'0
1/'&%"2&)$.$),-$/3                   ...
L3 -   Provides a publish/find/
SERVICE MODEL   bind service model to decouple
                bundles

                L2 ...
Module Layer
                                                                                              Module
        ...
Life-cycle Layer
                                                                                   Life-cycle
           ...
Service Layer

• OSGi framework
                                                                                     Servi...
OSGi compendium
User Admin    Initial Provisioning    Wire Admin
 XML         Log              Device Access
             ...
Now we have components,
     hurrah! Right?
“What version do you
 have?”
 “Can you look in the ‘about’
 box?”

Now we install 037B.17.zip
 “Did you have components,
 ...
how about configuration
Dynamic Deployment


• who uses what?
• what’s the history of a system?
• what’s the impact of this bug?
• integrate into ...
!"#$"%&%'()   !"#$%&'(


!"#$"%&%'(*   !"#$%&')


!"#$"%&%'(!   !"#$%&'*
!"#$"%&%'()                !"#$%&'(


!"#$"%&%'(*   !"#$%&'"()   !"#$%&')


!"#$"%&%'(!                !"#$%&'*
now
!"#$"%&%'()   !"#$%&'(


!"#$"%&%'(*   !"#$%&')


!"#$"%&%'(!   !"#$%&'*
last year
         !"#$"%&%'()   +,-.&'()
                             last month
      !"#$"%&%'()
         !"#$"%&%'(*  ...
!"#$%!
                                   0"&"$%0%&!.
                                      "$%&!


                      ...
!"#"$!"$%&'
                 !"#,-&("$+
()$)*"("$+



          .""!/)%0
',*-&'(    )&*(+"%(                 !"#$"%&%'(
              2       1"#$"%&%'/0   !"#$"%&%'()
              3       1"#$"...
!"#$%!
                                      0"&"$%0%&!.
                                         "$%&!


                ...
!"#$%!
    *#(+,-,(&,&$.                                          /"&"$%/%&!.
                                            ...
Management Agent

• manages life cycle of
 bundles

• controls package sharing
 policies

• controls starting/stopping   !...
!"#"$%!%#&'"$%#&

 *'.#"/0#,        '('.#


"#10)-2#$34
                (/"!340)6
   3(*5


!"#$%&'(%)$     "!*')+#,-
Management Agent
                                  !"#"$%!%#&'"$%#&

                              *'.#"/0#,        '('.#
...
Deployment Admin
•   versioned set of artifacts
•   transactional install/update
•   fix packages provide deltas
•   signin...
demo
Angelo van der Sijpt
software engineer at Luminis / Apache ACE
committer
angelo.vandersijpt@luminis.nl
@_angelos
Further reading


• www.luminis-technologies.com
• cwiki.apache.org/ACE/
• cwiki.apache.org/FELIX/


• Or ask me:
  angelo...
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Dynamic Deployment   Oredev 2009
Upcoming SlideShare
Loading in …5
×

Dynamic Deployment Oredev 2009

1,985 views

Published on

At Oredev 2009, I presented 'dynamic deployment with OSGi': how can you leverage OSGi as a module system to make your development cycle more complete, including deployment and customer support?

Be sure to check the slide notes; this presentation is intended as a background for me talking, so the slides themselves might not give you all information.

Published in: Technology
  • Be the first to comment

Dynamic Deployment Oredev 2009

  1. 1. dynamic deployment with OSGi Angelo van der Sijpt angelo.vandersijpt@luminis.nl
  2. 2. how about modules?
  3. 3. Partitioning software • modular, componentized, ... • minimize dependencies • consider rate of change • minimize complexity • maximize architected flexibility • testability • reuse
  4. 4. Reuse: copy/paste • no clearly defined interface • maintenance nightmare
  5. 5. Reuse: Object Oriented • objects tend to work badly when taken out of context
  6. 6. Reuse: Components • components are black boxes • clear “interfaces” with their
  7. 7. >)=9)%)% A(..0=9 28"=4? C- (,)= 203) =)8 #0=302 @07(;' &<0,) -.,(%')% *+,(%')% 4%0,< 2:;0%) #"%#6) '%"0=46) 234 /0#)1(($ !"#$% A(=54;%0B(= @(4 &'(%) *3)=' #(=54 6(44)% 56)272'). 8)1903 )3)='
  8. 8. >)=9)%)% A(..0=9 %)=9)%)% #(..0=9 28"=4? C- (,)= 203) =)8 #0=302 28"=4D#0=302 28"=4D;" 28"=4D#.9D(,)= 28"=4D#.9D203) 28"=4D#.9D=)8 28"=4D#(='%(62 @07(;' &<0,) -.,(%')% *+,(%')% 607(;' 2<0,) ".,(%')% )+,(%')% 4%0,< 2:;0%) #"%#6) '%"0=46) 234 /0#)1(($ !"#$% 607(;'D4%0,< 2<0,)D2:;0%) 2<0,)D#"%#6) 2<0,)D'%"0=46) ".,D234 )+,DE(($ ".,D!"#$% A(=54;%0B(= @(4 &'(%) *3)=' (24"D#0 (24"D6(4 2'(%) (24"D)3)=' #(=54 6(44)% 56)272'). 8)1903 )3)=' /)6"+D#0 /)6"+D6(4 2'(%)D/2 2'(%)D8)1903 /)6"+D)3)='
  9. 9. %)=9)%)% #(..0=9 >)=9)%)% A(..0=9 %)=9)%)% #(..0=9 ;" #(..0=92 28"=4? C- (,)= 203) =)8 #0=302 28"=4D#0=302 28"=4D;" 28"=4D#.9D(,)= 28"=4D#.9D203) 28"=4D#.9D=)8 28"=4D#(='%(62 9%08"=4 &<0,) 0,"D"( @07(;' -.,(%')% *+,(%')% 607(;' 2<0,) ".,(%')% )+,(%')% 4%0,< 2<0,)2 234 )+,(%')%2 4%0,< 2:;0%) #"%#6) '%"0=46) 234 /0#)1(($ !"#$% 607(;'D4%0,< 2<0,)D2:;0%) 2<0,)D#"%#6) 2<0,)D'%"0=46) ".,D234 )+,DE(($ ".,D!"#$% 0,"D(24" A(=54;%0B(= @(4 &'(%) *3)=' (24"D#0 (24"D6(4 2'(%) (24"D)3)=' #(=5409."= 6(4 56)2'(%) 8)1903 )3)=' #(=54 6(44)% 56)272'). 8)1903 )3)=' /)6"+D#0 /)6"+D6(4 2'(%)D/2 2'(%)D8)1903 /)6"+D)3)='
  10. 10. OSGi technology is the dynamic module system for Java™ OSGi technology is Universal Middleware. OSGi technology provides a service-oriented, component- based environment for developers and offers standardized ways to manage the software lifecycle. These capabilities greatly increase the value of a wide range of computers and devices that use the Java™ platform.
  11. 11. !"#$%"&'($)&%*+,-./'0 !"#$%"&'($)&%*+,-./'0 1/'&%"2&)$.$),-$/3 "&'($)&%1/02&34$50 45&%!"#$%6++$,3)& 67&%!"#$%8++$,3)& 7&+&,8&%9:%;&'8$/3%9<= 9&+&,:&%;<%=&':$/3%;>? 62'$+%>??@ 82'$+%@AAB Digitally signed by Digitally OSGi OSGi Alliance DN: cn=OSGi Alliance, c=US Date: signed by 2007.02.22 OSGi OSGi Alliance DN: cn=OSGi Alliance, c=US Signatu Alliance 14:44:10 + 01'00' re Not Alliance Date: Verified 2007.02.22 Signatur 14:45:47 + e Not 01'00' Verified
  12. 12. L3 - Provides a publish/find/ SERVICE MODEL bind service model to decouple bundles L2 - Manages the life cycle of a bundle in a framework LIFECYCLE without requiring the vm to be restarted L1 - Creates the concept of a module (aka. bundle) that use MODULE classes from each other in a controlled way according to system and bundle constraints L0 - Execution OSGi Minimum Execution Environment Environment CDC/Foundation JavaSE
  13. 13. Module Layer Module Bundle Bundle Bundle Bundle imports exports imports exports exports exports • unit of deployment org.apache.utils 1.0 org.apache.db 1.4 is the bundle i.e., a JAR org.apache.log 2.3 org.apache.utils 1.1 • share only your “interface” packages • automatic wiring based on version ranges Module
  14. 14. Life-cycle Layer Life-cycle install installed start start starting resolved active • Managed life cycle end uninstall uninstalled stopping stop • States for each bundle; • Allows updates of existing bundles. • Dynamically install, start, update, and uninstall Life-cycle Module
  15. 15. Service Layer • OSGi framework Service promotes service Log Database Prefs publish publish use oriented interaction publish use use Bundle Bundle Bundle Bundle pattern among bundles Service Registry publish find Service Life-cycle Service Service Provider Requeste Module interact
  16. 16. OSGi compendium User Admin Initial Provisioning Wire Admin XML Log Device Access Measurement and Parser State UPnP™ Preferences Device Configuration Admin Position Metatype Event Service Tracker Admin HTTP IO Connector Execution Environment Spec Declarative Services
  17. 17. Now we have components, hurrah! Right?
  18. 18. “What version do you have?” “Can you look in the ‘about’ box?” Now we install 037B.17.zip “Did you have components, we sent you?” hurrah! Right? What is the version of the product, anyway?
  19. 19. how about configuration
  20. 20. Dynamic Deployment • who uses what? • what’s the history of a system? • what’s the impact of this bug? • integrate into build/test/QA cycle • extensions, like (re)install and license management
  21. 21. !"#$"%&%'() !"#$%&'( !"#$"%&%'(* !"#$%&') !"#$"%&%'(! !"#$%&'*
  22. 22. !"#$"%&%'() !"#$%&'( !"#$"%&%'(* !"#$%&'"() !"#$%&') !"#$"%&%'(! !"#$%&'*
  23. 23. now !"#$"%&%'() !"#$%&'( !"#$"%&%'(* !"#$%&') !"#$"%&%'(! !"#$%&'*
  24. 24. last year !"#$"%&%'() +,-.&'() last month !"#$"%&%'() !"#$"%&%'(* +,-.&'() last week !"#$"%&%'() !"#$"%&%'(* !"#$%&'( +,-.&'(! +,-.&'(* now !"#$"%&%'() !"#$%&'( !"#$"%&%'(* !"#$%&') +,-.&'(! !"#$"%&%'(* !"#$"%&%'(! !"#$%&') !"#$%&'* !"#$"%&%'(! !"#$%&'*
  25. 25. !"#$%! 0"&"$%0%&!. "$%&! !"#$%! /2,%&! *#(+,-,(&,&$. 0"&"$%0%&!. &%!'(#) -%#+%# "$%&! !"#$%! 0"&"$%0%&!. "$%&! /(0*(&%&!. #%*(-,!(#1
  26. 26. !"#"$!"$%&' !"#,-&("$+ ()$)*"("$+ .""!/)%0
  27. 27. ',*-&'( )&*(+"%( !"#$"%&%'( 2 1"#$"%&%'/0 !"#$"%&%'() 3 1"#$"%&%'/0 !"#$"%&%'() !"#$"%&%'(! .,*-&'/0 4 1"#$"%&%'/0 !"#$"%&%'(! !"#$"%&%'(* 5 1"#$"%&%'/1 !"#$"%&%'(* 2 1"#$"%&%'/6 !"#$"%&%'(* .,*-&'/6 3 1"#$"%&%'/0 !"#$"%&%'() !"#$"%&%'(*
  28. 28. !"#$%! 0"&"$%0%&!. "$%&! !"#$%! /2,%&! *#(+,-,(&,&$. 0"&"$%0%&!. &%!'(#) -%#+%# "$%&! !"#$%! 0"&"$%0%&!. "$%&! /(0*(&%&!. #%*(-,!(#1 • server only stores metadata, so no IP in these repositories • allows integration with different repositories • OBR, Maven (anything with a URL)
  29. 29. !"#$%! *#(+,-,(&,&$. /"&"$%/%&!. &%!'(#) -%#+%# "$%&! 012,!. 012,!. 3($ 3($ !=#".%@A*?B*-%45(%23-'+*,C%151*%4521- $"#$E%;21-<*%$"%,+533*- !:#". !D#".!"#$"%&'()*+%,+'(+*- $"#$9 !"#$"%&'()*+%,+'(+*- $E#".!"#$.%/+'(01)%23-'+*%4(56%7*(,851%9%+5%: $"#.9 !"#$.%/+'(01)%23-'+*%4(56%7*(,851%9%+5%: $!#".!"#$.%;21-<*%"=%23-'+*- E$#$$ !"#$.%;21-<*%"=%23-'+*- !"#$9%>3-'+*%+5%7*(,851%:%,2??**-*- E9#$$ !"#$9%>3-'+*%+5%7*(,851%:%,2??**-*- !.#$9%&'()*+%,+533*- !.#$9%&'()*+%,+533*-
  30. 30. Management Agent • manages life cycle of bundles • controls package sharing policies • controls starting/stopping !"#$%"&'($)&%*+,-./'0 1/'&%"2&)$.$),-$/3 45&%!"#$%6++$,3)& order 7&+&,8&%9:%;&'8$/3%9<= >?3&%=@@A • implements a security
  31. 31. !"#"$%!%#&'"$%#& *'.#"/0#, '('.# "#10)-2#$34 (/"!340)6 3(*5 !"#$%&'(%)$ "!*')+#,-
  32. 32. Management Agent !"#"$%!%#&'"$%#& *'.#"/0#, '('.# "#10)-2#$34 (/"!340)6 3(*5 !"#$%&'(%)$ "!*')+#,- • identification, uniquely identifies a target • discovery, provides mechanism to find server • scheduler, periodically triggers updates
  33. 33. Deployment Admin • versioned set of artifacts • transactional install/update • fix packages provide deltas • signing makes them secure • extensible through resource processors !"#$%! 0"&"$%0%&!. "$%&! !"#$%! /2,%&! *#(+,-,(&,&$. 0"&"$%0%&!. &%!'(#) -%#+%# "$%&! !"#$%! 0"&"$%0%&!. "$%&! /(0*(&%&!. #%*(-,!(#1
  34. 34. demo
  35. 35. Angelo van der Sijpt software engineer at Luminis / Apache ACE committer angelo.vandersijpt@luminis.nl @_angelos
  36. 36. Further reading • www.luminis-technologies.com • cwiki.apache.org/ACE/ • cwiki.apache.org/FELIX/ • Or ask me: angelo.vandersijpt@luminis.nl

×