Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
10 Reasons to use OSGi for your next cloud app
Search
Paul Bakker
June 24, 2015
Programming
320
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
800
RFC 193: OSGi CDI
paulbakker
2
550
Modularity in the Cloud: A PulseOn case study
paulbakker
0
240
Other Decks in Programming
See All in Programming
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
140
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
220
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
190
Kotlinの15年とServer-Side Kotlin
n_takehata
1
190
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
280
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
400
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
340
Seven New Principles of Software Engineering
yegor256
0
440
No More NoSuchMethodError
exoego
1
120
GraphQL の onError と Nullability のこれから
quramy
0
200
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.5k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Building an army of robots
kneath
307
47k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
350
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
870
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
470
Discover your Explorer Soul
emna__ayadi
2
1.3k
Mobile First: as difficult as doing things right
swwweet
225
10k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
570
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Automating Front-end Workflow
addyosmani
1370
210k
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