Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
10 Reasons to use OSGi for your next cloud app
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Paul Bakker
June 24, 2015
Programming
310
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
10 Reasons to use OSGi for your next cloud app
Learn why OSGi is a super productive technology to build modern (web) applications.
Paul Bakker
June 24, 2015
More Decks by Paul Bakker
See All by Paul Bakker
Kubernetes - Beyond the Basics
paulbakker
3
790
RFC 193: OSGi CDI
paulbakker
2
530
Modularity in the Cloud: A PulseOn case study
paulbakker
0
220
Other Decks in Programming
See All in Programming
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
770
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
630
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
680
Agentic UI
manfredsteyer
PRO
0
160
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
AIで効率化できた業務・日常
ochtum
0
140
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.1k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
350
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
230
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
560
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
220
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
The Curious Case for Waylosing
cassininazir
1
390
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
My Coaching Mixtape
mlcsv
0
150
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
How to build a perfect <img>
jonoalderson
1
5.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
Transcript
Ten reasons to use OSGi for your next cloud app
@pbakker
Paul Bakker @pbakker
Reason nr Developer Productivity 1
Code Maven build full project Deploy to app server Re-initialize
full app Typical Java development workflow…
Typical OSGi development workflow… “Like working with a scripting language”
None
How does it work? Class loader per bundle OSGi supports
updating a bundle On compile, bundle is rebuild and re-installed
Reason nr No more ClassNotFoundException 2
Imports / Exports OSGi bundles define explicitly what classes they
import Imports must be exported by some bundle Imports are calculated from your byte code
Example code z
Import packages are generated Import-‐Package: org.apache.felix.dm;version=“[4.0,5)", org.osgi.framework;version="[1.3,2)"
The framework tells you what’s missing Unable to resolve 1.0:
missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.dm) (version>=4.0.0)(!(version>=5.0.0))) Forgot to install Dependency Manager bundle…
API versioning Deploy multiple versions of an API Import a
specific version range Semantic Versioning
Reason nr Great for Cloud Deployment 3
Great for (Cloud) deployment No application server Executable JAR file
Very small memory footprint Perfect for building Docker containers
Building a binary gradle build export java -‐jar MyApp.jar
Dockerfile FROM jeanblanchard/busybox-‐java:8 COPY release/myapp.jar /app/myapp.jar WORKDIR /app
EXPOSE 8080 CMD java -‐jar myapp.jar
Great commercial support RTI Kubernetes based clusters Logging and Monitoring
for OSGi Automated Blue/Green deployments
Reason nr Maintainable architecture 4
Maintainable architecture Implementation hiding Enforce module boundaries Modules during development,
build and runtime
Bundles and services Only APIs are exported, the bundle’s contract
Services provide functionality True decoupling Service Registry Bundle registering a service Bundle using a service Publish MyInterface Lookup MyInterface
Data Business UI Big ball of mud Big ball of
mud Big ball of mud
Data Business UI
Rooms Resource AngularJS Client Rooms Service RabbitMQ Service STOMP AMQP
RabbitMQ Chat Log Mongose Jongo REST Personalized Ad Generator Word Counter Product Service MySQL
Rooms Resource AngularJS Client Rooms Service RabbitMQ Service STOMP AMQP
RabbitMQ Chat Log Mongo Jongo REST Personalized Ad Generator Word Counter Product Service MySQL Each part is a separate OSGi bundle
Reason nr Dependency Injection 5 @ServiceDependency
Register Demo component Inject dependency Lifecycle methods
Reason nr The road to Micro Services 6
Best preparation for Micro Services OSGi services are micro services
within a VM Easy to migrate to remote services when needed Perfect balance between “Monolith First” and Micro Services from te get go
OSGi Remote Services OSGi spec for remote service discovery and
invocation Pluggable discovery and transport No code changes required!
Client Server
Reason nr All the libraries you need 7
REST Scheduling Mongo JPA Web Resources Blob Stores Remote Services
Security Email Config Components No core framework or half a zillion dependencies!
Amdatu REST example
Amdatu Mongo example Amdatu Mongo Service Setup Object Mapper Execute
query
Reason nr Plugin systems 8 Plugin Registry Plugin Plugin Plugin
core.jar myplugin.jar Install plugin by installing a bundle
Real world examples Amdatu Bootstrap (even directly from Git repos)
Spring Roo Eclipse Glassfish …
Reason nr Integration testing 9
Integration testing Looks like plain JUnit Runs in an OSGi
framework
Reason nr Great resources to get you started 10
Don’t be afraid to ask! http://amdatu.org @pbakker