2. About me
● IT Consultant (Java, Architecture)
● Open Source Hacker
● Web: http://ieugen.ro/
● http://github.com/ieugen
● @ieugen222
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. 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. Why modularity?
● Reduce complexity
● Allow parallel development
● Improve component re-usability
● Upgrade proof systems
10. OSGi Benefits
● Reduced Complexity
● Promotes Reuse
● Real World – things appear/disappear
● Dynamic updates
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. 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. 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/
15. Features
● Hot deployment of bundles
● Dynamic configuration
● Provisioning of applications
● Native OS integration
● Remote Access (SSH, Web)
● ...