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.

Modular Java applications with OSGi on Apache Karaf

1,639 views

Published on

Java2Days conference presentation - demo code featuring how to develop modular Java applications on Apache Karaf

Published in: Software
  • Be the first to comment

Modular Java applications with OSGi on Apache Karaf

  1. 1. Modular Applications with OSGi on Apache Karaf Ioan Eugen Stan @ieugen222 stan.ieugen@gmail.com
  2. 2. About me ● IT Consultant (Java, Architecture) ● Open Source Hacker ● Web: http://ieugen.ro/ ● http://github.com/ieugen ● @ieugen222
  3. 3. Agenda ● Problem statement ● Short intro to OSGi ● Apache Karaf and OSGi universe ● Building an App https://github.com/ieugen/java2days-20 14-osgi-karaf
  4. 4. Modularity is a big issue ● Deals with software complexity over time ● Jigsaw - Java started from JDK-7 (start 2009) ● Has many aspects: deployment, management, runtime
  5. 5. Why modularity? ● Reduce complexity ● Allow parallel development ● Improve component re-usability ● Upgrade proof systems
  6. 6. When Applications can Roam Freely, P. Kriens - http://slideplayer.us/slide/732791/
  7. 7. A solution for Java modularity? Jigsaw was delayed again (does not address dynamism) Try OSGi – the de facto standard for Java modularity
  8. 8. OSGi – overview ● Modular system for Java/JVM ● Service platform ● Dynamic component model
  9. 9. http://www.slideshare.net/mfrancis/osgi-technology-value-proposition-december-2013
  10. 10. OSGi Benefits ● Reduced Complexity ● Promotes Reuse ● Real World – things appear/disappear ● Dynamic updates
  11. 11. OSGi Service Gateway Architecture Application / Bundles Services Service registry Life cycle Modules Java Virtual Machine Operating System Hardware Security http://en.wikipedia.org/wiki/OSGi
  12. 12. OSGi Architecture (2) Bundle 1 Bundle 2 Bundle n System Services e.g. Java ME CDC, SE, EE e.g. Windows, Linux VxWorks, QNX http://en.wikipedia.org/wiki/OSGi C/C++ OSGi Framework Java Runtime Environment Operating System Hardware Drivers Server Platform JNI
  13. 13. Apache Karaf Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed. http://karaf.apache.org/
  14. 14. Karaf Architecture
  15. 15. Features ● Hot deployment of bundles ● Dynamic configuration ● Provisioning of applications ● Native OS integration ● Remote Access (SSH, Web) ● ...
  16. 16. Projects ● OPS4j - https://github.com/ops4j ● OSGi JAX-RS Connector https://github.com/hstaudacher/osgi-j ax-rs-connector
  17. 17. Demo time
  18. 18. Thank you. Time for questions.

×