SlideShare a Scribd company logo
1 of 27
OSGi
What is OSGi and What does OSGi?
Witted by YunChang.Lee
What is OSGi?
OSGi 프레임워크는 독립적인 자바/가상 머신 환경에서 제공하고 있
지 않는 세련되고, 완전하며 동적인 SOA(Service Oriented
Architecture) 기반의 컴포넌트 모델을 구현한다. 응용 프로그램 또
는 구성 요소(번들, Bundle)는 재시동 과정 없이 원격지를 통해 설치
(installed), 시작(started), 정지(stopped), 업데이트(updated) 그리고
제거(uninstalled)할 수 있다.
The OSGi (Open Service Gateway initiative) specification describes
a modular system and a service platform for the Java
programming language that implements a complete and dynamic
component model, something that does not exist in standalone
Java/VM environments. Applications or components, coming in
the form of bundles for deployment, can be remotely installed,
started, stopped, updated, and uninstalled without requiring a
reboot; management of Java packages/classes is specified in great
detail. Application life cycle management is implemented via APIs
that allow for remote downloading of management policies. The
service registry allows bundles to detect the addition of new
services, or the removal of services, and adapt accordingly.
What does OSGi?
Each plugin is a versioned artifact that has its own classloader.
Each plugin depends on both specific jars that it contains and
also other specific versioned plug-ins.
Because of the versioning and isolated classloaders, different
versions of the same artifact can be loaded at the same time. If
one component of your application relies on one version of a
plug-in and another depends on another version, they both can
be loaded at the same time.
With this, you can structure your application as a set of versioned
plugin artifacts that are loaded on demand. Each plugin is a
standalone component. Just as Maven helps you structure your build
so it is repeatable and defined by a set of specific versions of
artifacts it is created by, OSGi helps you do this at runtime.
OSGi Alliance
OSGi Alliance는 OSGi 관련 표준 선정 기구
OSGi Specifications
OSGi Release 6
OSGi Release 6 was first released in June
2014. Core was released in June 2014.
OSGi Framework implementations
Dead Project
OSGi Framework Architecture
 Bundles - Bundles are the OSGi components made by the developers.
 Services - The services layer connects bundles in a dynamic way by offering a publish-find-
bind model for plain old Java objects.
 Life-Cycle - The API to install, start, stop, update, and uninstall bundles.
 Modules - The layer that defines how a bundle can import and export code.
 Security - The layer that handles the security aspects.
 Execution Environment - Defines what methods and classes are available in a specific
platform.
OSGi System Layering
Services are dynamic. This means that a bundle can decide to withdraw its
service from the registry while other bundles are still using this service.
Bundles using such a service must then ensure that they no longer use the
service object and drop any references. We know, this sounds like a
significant complexity but it turns out that helper classes like the Service
Tracker and frameworks like iPOJO, Spring, and Declarative Services can make
the pain minimal while the advantages are quite large.
OSGi 프레임워크는 크게 번들 실행주기(설치/
시작/제거/업데이트), OSGi 기본 실행단위인
번들과 서비스에 대한 운영 관리 및 리소스와
서비스 레지스트리를 담당 한다. 복수 개의 클
래스 로더에 의해 각각 서로 다른 OSGi 어플리
케이션이 독립성을 가지고 실행되지만,
OSGi Framework Service Registry에 등록된
Sharing Code와 주소에 의해 서로 다른 번들간
의 리소스 공유와 연동/통합으로
무수한 서비스들을 생성하고 실행한다.
Bundle Life Cycle
Bundle State Description
INSTALLED The bundle has been successfully installed.
RESOLVED
All Java classes that the bundle needs are available. This state indicates that the bundle is either re
ady to be started or has stopped.
STARTING
The bundle is being started, the BundleActivator.start method will be called, and this method has
not yet returned. When the bundle has an activation policy, the bundle will remain in the STARTIN
G state until the bundle is activated according to its activation policy.
ACTIVE
The bundle has been successfully activated and is running; its Bundle Activator start method has b
een called and returned.
STOPPING
The bundle is being stopped. The BundleActivator.stop method has been called but the stop meth
od has not yet returned.
UNINSTALLED The bundle has been uninstalled. It cannot move into another state.
Karaf Console
Service
The OSGi service registry enables a bundle to publish objects to a shared registry,
advertised via a given set of Java interfaces.
Published services also have service properties associated with them in the registry.
The registry is a crucial feature of OSGi, facilitating decoupling between bundles by
promoting a dynamic collaborative model based on a service-oriented paradigm
(publish/find/bind).
Blueprint integrates tightly with the service registry, allowing clients to publish, find
and bind services in a POJO-friendly manner, without coupling themselves to the
OSGi API.
Benefits of Using OSGi
Benefits
Reduced Complexity Fast
Reuse Lazy
Real World Secure
Easy Deployment Humble
Dynamic Updates Non Intrusive
Transparency Runs Everywhere
Versioning Widely Used
Simple Supported by Key
Companies
Small
Standard Services : OSGi System Services
System Services Description
Logging
The logging of information, warnings, debug information or errors is handled through the Log Ser
vice. It receives log entries and then dispatches these entries to other bundles that subscribed to t
his information.
Configuration Admi
n
This service allows an operator to set and get the configuration information of deployed bundles
Device Access
Facilitates the coordination of automatic detection and attachment of existing devices. This is used
for Plug and Play scenarios.
User Admin
This service uses a database with user information (private and public) for authentication and auth
orization purposes.
IO Connector
The IO Connector Service implements the CDC/CLDC javax.microedition.io package as a service. T
his service allows bundles to provide new and alternative protocol schemes.
Preferences
Offers an alternative, more OSGi-friendly mechanism to using Java’s default Properties for storing
preferences.
Component Runtime
The dynamic nature of services—they can come and go at any time—makes writing software hard
er. The Component Runtime specification can simplify handling these dynamic aspects by providin
g an XML based declaration of the dependencies.
Deployment Admin Standardizes access to some of the responsibilities of the management agent.
Event Admin Provides an inter-bundle communication mechanism based on a publish-and-subscribe model.
Application Admin
Simplifies the management of an environment with many different types of applications that are si
multaneously available.
Standard Services : OSGi Protocol Services
Protocol Services Description
HTTP Service Allows information to be sent and received from OSGi using HTTP.
UPnP Device Service
Specifies how OSGi bundles can be developed to interoperate wit
h Universal Plug and Play (UPnP) devices.
DMT Admin
Defines an API for managing a device using concepts from the Op
en Mobile Alliance (OMA) device management specifications.
Standard Services : OSGi Miscellaneous
Miscellaneous Services Description
Wire Admin
Allows the connection between a Producer service and a Consumer
service.
XML Parser
The XML Parser service allows a bundle to locate a parser with desir
ed properties and compatibility with JAXP.
Measurement and State
The Measurement and State service allows and simplifies the correct
handling of measurements in an OSGi service platform.
iPOJO
iPOJO is a service component runtime aiming to simplify OSGi
application development. It natively supports ALL the dynamism
of OSGi. iPOJO is made to run modern applications exhibiting
modularity and requiring runtime adaption and autonomic
behavior.
Main features
 Components are developed as POJOs - no dependencies or complex API
 Use annotations, XML or a fluent API to declare your components and
instances
 Require and provide services without requiring code, while being amazingly
powerful
 iPOJO applications are natively resilient to dynamism
 Extensible and customizable, develop your own component model
 iPOJO applications are supporting dynamic adaptation, and exhibit
autonomic behavior
Apache Felix iPOJO
Blueprint Service
Enterprise Modules Project (Gemini)
The Blueprint Service specification defines a
dependency injection framework, specifically for
OSGi bundles, that understands the unique
dynamic nature of services. It provides an OSGi
bundle programming model with minimal
implementation dependencies and virtually no
accidental complexity in the Java code. Bundles in
this programming model contain a number of XML
definition resources which are used to wire the
application together and start it when the bundle is
active.
This Blueprint Service specification is derived from
the Spring Dynamic Modules project.
There are currently two open source
implementations of the Blueprint:
Dependency injection framework
Dependency inj
ection
Declarative Servi
ces
Blueprint iPOJO
Callback injectio
n
Yes Yes (public meth
od only)
Yes
Constructor inje
ction
No Yes Yes
Field injection No No Yes
Setter injection Yes Yes Yes
Proxy injection No Yes Yes
List injection No Yes Yes
Nullable injectio
n
No No Yes
Dependency injection framework
Lifecycle
Declarative Servi
ces
Blueprint iPOJO
Callbacks (activa
te/deactivate)
Yes Yes Yes
Factory pattern Yes Yes Yes
Lazy initializatio
n
Yes Yes Yes
Damping No Yes Yes
Field synchroniz
ation
No No Yes
Component lifec
ycle control
Yes Partial Yes
Service lifecycle
control
No No Yes
Dependency injection framework
Configuration
Declarative Servi
ces
Blueprint iPOJO
Property config
uration
No Yes Yes
Field configurati
on
No No Yes
Configuration A
dmin
Yes No Yes
Dependency injection framework
Services
Declarative Servi
ces
Blueprint iPOJO
Custom attribut
e type
No Yes Yes
Lazy initializatio
n
Yes Yes Yes
Composite servi
ces
No No Yes
Dependency injection framework
Component des
cription
Declarative Servi
ces
Blueprint iPOJO
XML Yes Yes Yes
Java annotations No No Yes
API No No Yes
Dependency injection framework
Nonfunctional
Declarative Servi
ces
Blueprint iPOJO
Multiple provide
rs
Yes Yes No
How to use Blueprint Service
Bundle
Start 필요
How to use Blueprint Service
Apache Karaf
Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components
and applications can be deployed.
Here is a short list of features supported by the Karaf:
•Hot deployment: Karaf supports hot deployment of OSGi bundles by monitoring jar files inside
the [home]/deploydirectory. Each time a jar is copied in this folder, it will be installed inside the runtime. You can then
update or delete it and changes will be handled automatically. In addition, the Karaf also supports exploded bundles
and custom deployers (blueprint and spring ones are included by default).
•Dynamic configuration: Services are usually configured through the ConfigurationAdmin OSGi service. Such
configuration can be defined in Karaf using property files inside the [home]/etc directory. These configurations are
monitored and changes on the properties files will be propagated to the services.
•Logging System: using a centralized logging back end supported by Log4J, Karaf supports a number of different
APIs (JDK 1.4, JCL, SLF4J, Avalon, Tomcat, OSGi)
•Provisioning: Provisioning of libraries or applications can be done through a number of different ways, by which
they will be downloaded locally, installed and started.
•Native OS integration: Karaf can be integrated into your own Operating System as a service so that the lifecycle
will be bound to your Operating System.
•Extensible Shell console: Karaf features a nice text console where you can manage the services, install new
applications or libraries and manage their state. This shell is easily extensible by deploying new commands
dynamically along with new features or applications.
•Remote access: use any SSH client to connect to Karaf and issue commands in the console
•Security framework based on JAAS
•Managing instances: Karaf provides simple commands for managing multiple instances. You can easily create,
delete, start and stop instances of Karaf through the console.
ServiceMix
Apache ServiceMix is a flexible, open-
source integration container that unifies
the features and functionality of
Apache ActiveMQ, Camel, CXF,
andKaraf into a powerful runtime
platform you can use to build your own
integrations solutions. It provides a
complete, enterprise ready ESB
exclusively powered by OSGi.
JBoss FUSE
JBoss Fuse is an open source Enterprise
Service Bus (ESB) with an elastic footprint
that supports integration beyond the data
center. The ability to deploy JBoss Fuse in
several different configurations enables
intelligent integration to all facets of your
business – on premise or in the Cloud.

More Related Content

What's hot

2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0mnriem
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's Howmrdon
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinsonmfrancis
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overviewbettlebrox
 
Taming Beastly Web Applications with Server-Side OSGi
Taming Beastly Web Applications with Server-Side OSGiTaming Beastly Web Applications with Server-Side OSGi
Taming Beastly Web Applications with Server-Side OSGimrdon
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
 
Portlet Framework: the Liferay way
Portlet Framework: the Liferay wayPortlet Framework: the Liferay way
Portlet Framework: the Liferay wayriround
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaTakashi Ito
 
The Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksThe Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksClarence Ho
 
Liferay DevCon 2014: Lliferay Platform - A new and exciting vision
Liferay DevCon 2014: Lliferay Platform - A new and exciting visionLiferay DevCon 2014: Lliferay Platform - A new and exciting vision
Liferay DevCon 2014: Lliferay Platform - A new and exciting visionJorge Ferrer
 
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay ScreensLiferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay ScreensDenis Signoretto
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot trainingMallikarjuna G D
 
Spring framework
Spring frameworkSpring framework
Spring frameworkKani Selvam
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsVirtual Nuggets
 

What's hot (20)

Modularization in java 8
Modularization in java 8Modularization in java 8
Modularization in java 8
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
 
Taming Beastly Web Applications with Server-Side OSGi
Taming Beastly Web Applications with Server-Side OSGiTaming Beastly Web Applications with Server-Side OSGi
Taming Beastly Web Applications with Server-Side OSGi
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
 
Portlet Framework: the Liferay way
Portlet Framework: the Liferay wayPortlet Framework: the Liferay way
Portlet Framework: the Liferay way
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
 
The Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksThe Power of Enterprise Java Frameworks
The Power of Enterprise Java Frameworks
 
Modules or microservices?
Modules or microservices?Modules or microservices?
Modules or microservices?
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Liferay DevCon 2014: Lliferay Platform - A new and exciting vision
Liferay DevCon 2014: Lliferay Platform - A new and exciting visionLiferay DevCon 2014: Lliferay Platform - A new and exciting vision
Liferay DevCon 2014: Lliferay Platform - A new and exciting vision
 
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay ScreensLiferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Liferay with xebia
Liferay with xebiaLiferay with xebia
Liferay with xebia
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot training
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 

Similar to OSGi: Modular Java Framework for Dynamic Applications

OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC MetropjhInovex
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1pjhInovex
 
Enterprise Integration with WSO2 ESB
Enterprise Integration with WSO2 ESBEnterprise Integration with WSO2 ESB
Enterprise Integration with WSO2 ESBWSO2
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaArun Gupta
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OpenBlend society
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsJasmine Conseil
 
Liferay Module Framework
Liferay Module FrameworkLiferay Module Framework
Liferay Module FrameworkMiguel Pastor
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 
Carbon Webinar
Carbon WebinarCarbon Webinar
Carbon WebinarWSO2
 
Getting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viGetting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viAmit Sharma
 
Liberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham ChartersLiberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham Chartersmfrancis
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Peter R. Egli
 

Similar to OSGi: Modular Java Framework for Dynamic Applications (20)

OSGi
OSGiOSGi
OSGi
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC Metro
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1
 
OSGi tech session
OSGi tech sessionOSGi tech session
OSGi tech session
 
Enterprise Integration with WSO2 ESB
Enterprise Integration with WSO2 ESBEnterprise Integration with WSO2 ESB
Enterprise Integration with WSO2 ESB
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
 
Osgi
OsgiOsgi
Osgi
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
 
Liferay Module Framework
Liferay Module FrameworkLiferay Module Framework
Liferay Module Framework
 
GlassFish v3 - Architecture
GlassFish v3 - ArchitectureGlassFish v3 - Architecture
GlassFish v3 - Architecture
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 
Carbon Webinar
Carbon WebinarCarbon Webinar
Carbon Webinar
 
Getting started-with-oracle-so a-vi
Getting started-with-oracle-so a-viGetting started-with-oracle-so a-vi
Getting started-with-oracle-so a-vi
 
OSGi
OSGiOSGi
OSGi
 
Liberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham ChartersLiberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham Charters
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)
 
White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

OSGi: Modular Java Framework for Dynamic Applications

  • 1. OSGi What is OSGi and What does OSGi? Witted by YunChang.Lee
  • 2. What is OSGi? OSGi 프레임워크는 독립적인 자바/가상 머신 환경에서 제공하고 있 지 않는 세련되고, 완전하며 동적인 SOA(Service Oriented Architecture) 기반의 컴포넌트 모델을 구현한다. 응용 프로그램 또 는 구성 요소(번들, Bundle)는 재시동 과정 없이 원격지를 통해 설치 (installed), 시작(started), 정지(stopped), 업데이트(updated) 그리고 제거(uninstalled)할 수 있다. The OSGi (Open Service Gateway initiative) specification describes a modular system and a service platform for the Java programming language that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. Applications or components, coming in the form of bundles for deployment, can be remotely installed, started, stopped, updated, and uninstalled without requiring a reboot; management of Java packages/classes is specified in great detail. Application life cycle management is implemented via APIs that allow for remote downloading of management policies. The service registry allows bundles to detect the addition of new services, or the removal of services, and adapt accordingly.
  • 3. What does OSGi? Each plugin is a versioned artifact that has its own classloader. Each plugin depends on both specific jars that it contains and also other specific versioned plug-ins. Because of the versioning and isolated classloaders, different versions of the same artifact can be loaded at the same time. If one component of your application relies on one version of a plug-in and another depends on another version, they both can be loaded at the same time. With this, you can structure your application as a set of versioned plugin artifacts that are loaded on demand. Each plugin is a standalone component. Just as Maven helps you structure your build so it is repeatable and defined by a set of specific versions of artifacts it is created by, OSGi helps you do this at runtime.
  • 4. OSGi Alliance OSGi Alliance는 OSGi 관련 표준 선정 기구
  • 5. OSGi Specifications OSGi Release 6 OSGi Release 6 was first released in June 2014. Core was released in June 2014.
  • 7. OSGi Framework Architecture  Bundles - Bundles are the OSGi components made by the developers.  Services - The services layer connects bundles in a dynamic way by offering a publish-find- bind model for plain old Java objects.  Life-Cycle - The API to install, start, stop, update, and uninstall bundles.  Modules - The layer that defines how a bundle can import and export code.  Security - The layer that handles the security aspects.  Execution Environment - Defines what methods and classes are available in a specific platform.
  • 8. OSGi System Layering Services are dynamic. This means that a bundle can decide to withdraw its service from the registry while other bundles are still using this service. Bundles using such a service must then ensure that they no longer use the service object and drop any references. We know, this sounds like a significant complexity but it turns out that helper classes like the Service Tracker and frameworks like iPOJO, Spring, and Declarative Services can make the pain minimal while the advantages are quite large. OSGi 프레임워크는 크게 번들 실행주기(설치/ 시작/제거/업데이트), OSGi 기본 실행단위인 번들과 서비스에 대한 운영 관리 및 리소스와 서비스 레지스트리를 담당 한다. 복수 개의 클 래스 로더에 의해 각각 서로 다른 OSGi 어플리 케이션이 독립성을 가지고 실행되지만, OSGi Framework Service Registry에 등록된 Sharing Code와 주소에 의해 서로 다른 번들간 의 리소스 공유와 연동/통합으로 무수한 서비스들을 생성하고 실행한다.
  • 9. Bundle Life Cycle Bundle State Description INSTALLED The bundle has been successfully installed. RESOLVED All Java classes that the bundle needs are available. This state indicates that the bundle is either re ady to be started or has stopped. STARTING The bundle is being started, the BundleActivator.start method will be called, and this method has not yet returned. When the bundle has an activation policy, the bundle will remain in the STARTIN G state until the bundle is activated according to its activation policy. ACTIVE The bundle has been successfully activated and is running; its Bundle Activator start method has b een called and returned. STOPPING The bundle is being stopped. The BundleActivator.stop method has been called but the stop meth od has not yet returned. UNINSTALLED The bundle has been uninstalled. It cannot move into another state. Karaf Console
  • 10. Service The OSGi service registry enables a bundle to publish objects to a shared registry, advertised via a given set of Java interfaces. Published services also have service properties associated with them in the registry. The registry is a crucial feature of OSGi, facilitating decoupling between bundles by promoting a dynamic collaborative model based on a service-oriented paradigm (publish/find/bind). Blueprint integrates tightly with the service registry, allowing clients to publish, find and bind services in a POJO-friendly manner, without coupling themselves to the OSGi API.
  • 11. Benefits of Using OSGi Benefits Reduced Complexity Fast Reuse Lazy Real World Secure Easy Deployment Humble Dynamic Updates Non Intrusive Transparency Runs Everywhere Versioning Widely Used Simple Supported by Key Companies Small
  • 12. Standard Services : OSGi System Services System Services Description Logging The logging of information, warnings, debug information or errors is handled through the Log Ser vice. It receives log entries and then dispatches these entries to other bundles that subscribed to t his information. Configuration Admi n This service allows an operator to set and get the configuration information of deployed bundles Device Access Facilitates the coordination of automatic detection and attachment of existing devices. This is used for Plug and Play scenarios. User Admin This service uses a database with user information (private and public) for authentication and auth orization purposes. IO Connector The IO Connector Service implements the CDC/CLDC javax.microedition.io package as a service. T his service allows bundles to provide new and alternative protocol schemes. Preferences Offers an alternative, more OSGi-friendly mechanism to using Java’s default Properties for storing preferences. Component Runtime The dynamic nature of services—they can come and go at any time—makes writing software hard er. The Component Runtime specification can simplify handling these dynamic aspects by providin g an XML based declaration of the dependencies. Deployment Admin Standardizes access to some of the responsibilities of the management agent. Event Admin Provides an inter-bundle communication mechanism based on a publish-and-subscribe model. Application Admin Simplifies the management of an environment with many different types of applications that are si multaneously available.
  • 13. Standard Services : OSGi Protocol Services Protocol Services Description HTTP Service Allows information to be sent and received from OSGi using HTTP. UPnP Device Service Specifies how OSGi bundles can be developed to interoperate wit h Universal Plug and Play (UPnP) devices. DMT Admin Defines an API for managing a device using concepts from the Op en Mobile Alliance (OMA) device management specifications.
  • 14. Standard Services : OSGi Miscellaneous Miscellaneous Services Description Wire Admin Allows the connection between a Producer service and a Consumer service. XML Parser The XML Parser service allows a bundle to locate a parser with desir ed properties and compatibility with JAXP. Measurement and State The Measurement and State service allows and simplifies the correct handling of measurements in an OSGi service platform.
  • 15. iPOJO iPOJO is a service component runtime aiming to simplify OSGi application development. It natively supports ALL the dynamism of OSGi. iPOJO is made to run modern applications exhibiting modularity and requiring runtime adaption and autonomic behavior. Main features  Components are developed as POJOs - no dependencies or complex API  Use annotations, XML or a fluent API to declare your components and instances  Require and provide services without requiring code, while being amazingly powerful  iPOJO applications are natively resilient to dynamism  Extensible and customizable, develop your own component model  iPOJO applications are supporting dynamic adaptation, and exhibit autonomic behavior Apache Felix iPOJO
  • 16. Blueprint Service Enterprise Modules Project (Gemini) The Blueprint Service specification defines a dependency injection framework, specifically for OSGi bundles, that understands the unique dynamic nature of services. It provides an OSGi bundle programming model with minimal implementation dependencies and virtually no accidental complexity in the Java code. Bundles in this programming model contain a number of XML definition resources which are used to wire the application together and start it when the bundle is active. This Blueprint Service specification is derived from the Spring Dynamic Modules project. There are currently two open source implementations of the Blueprint:
  • 17. Dependency injection framework Dependency inj ection Declarative Servi ces Blueprint iPOJO Callback injectio n Yes Yes (public meth od only) Yes Constructor inje ction No Yes Yes Field injection No No Yes Setter injection Yes Yes Yes Proxy injection No Yes Yes List injection No Yes Yes Nullable injectio n No No Yes
  • 18. Dependency injection framework Lifecycle Declarative Servi ces Blueprint iPOJO Callbacks (activa te/deactivate) Yes Yes Yes Factory pattern Yes Yes Yes Lazy initializatio n Yes Yes Yes Damping No Yes Yes Field synchroniz ation No No Yes Component lifec ycle control Yes Partial Yes Service lifecycle control No No Yes
  • 19. Dependency injection framework Configuration Declarative Servi ces Blueprint iPOJO Property config uration No Yes Yes Field configurati on No No Yes Configuration A dmin Yes No Yes
  • 20. Dependency injection framework Services Declarative Servi ces Blueprint iPOJO Custom attribut e type No Yes Yes Lazy initializatio n Yes Yes Yes Composite servi ces No No Yes
  • 21. Dependency injection framework Component des cription Declarative Servi ces Blueprint iPOJO XML Yes Yes Yes Java annotations No No Yes API No No Yes
  • 22. Dependency injection framework Nonfunctional Declarative Servi ces Blueprint iPOJO Multiple provide rs Yes Yes No
  • 23. How to use Blueprint Service Bundle Start 필요
  • 24. How to use Blueprint Service
  • 25. Apache Karaf Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed. Here is a short list of features supported by the Karaf: •Hot deployment: Karaf supports hot deployment of OSGi bundles by monitoring jar files inside the [home]/deploydirectory. Each time a jar is copied in this folder, it will be installed inside the runtime. You can then update or delete it and changes will be handled automatically. In addition, the Karaf also supports exploded bundles and custom deployers (blueprint and spring ones are included by default). •Dynamic configuration: Services are usually configured through the ConfigurationAdmin OSGi service. Such configuration can be defined in Karaf using property files inside the [home]/etc directory. These configurations are monitored and changes on the properties files will be propagated to the services. •Logging System: using a centralized logging back end supported by Log4J, Karaf supports a number of different APIs (JDK 1.4, JCL, SLF4J, Avalon, Tomcat, OSGi) •Provisioning: Provisioning of libraries or applications can be done through a number of different ways, by which they will be downloaded locally, installed and started. •Native OS integration: Karaf can be integrated into your own Operating System as a service so that the lifecycle will be bound to your Operating System. •Extensible Shell console: Karaf features a nice text console where you can manage the services, install new applications or libraries and manage their state. This shell is easily extensible by deploying new commands dynamically along with new features or applications. •Remote access: use any SSH client to connect to Karaf and issue commands in the console •Security framework based on JAAS •Managing instances: Karaf provides simple commands for managing multiple instances. You can easily create, delete, start and stop instances of Karaf through the console.
  • 26. ServiceMix Apache ServiceMix is a flexible, open- source integration container that unifies the features and functionality of Apache ActiveMQ, Camel, CXF, andKaraf into a powerful runtime platform you can use to build your own integrations solutions. It provides a complete, enterprise ready ESB exclusively powered by OSGi.
  • 27. JBoss FUSE JBoss Fuse is an open source Enterprise Service Bus (ESB) with an elastic footprint that supports integration beyond the data center. The ability to deploy JBoss Fuse in several different configurations enables intelligent integration to all facets of your business – on premise or in the Cloud.

Editor's Notes

  1. iPOJO is a service component runtime aiming to simplify OSGi application development. It natively supports ALL the dynamism of OSGi. Based on the concept of POJO, application logic is developed easily. Non-functional properties are just injected in the component at runtime. iPOJO strength points are : components are developed as POJO, nothing else is required ! the component model is extensible, so feel free to adapt it to your needs the standard component model manages service providing and service dependencies, and so can require any other OSGi services iPOJO manages the component instance lifecycle and the environment dynamics as it has never been possible iPOJO provides a powerful composition system to create highly dynamic applications iPOJO supports annotations, XML or Java-based API to define the componen
  2. The Blueprint Service specification defines a dependency injection framework, specifically for OSGi bundles, that understands the unique dynamic nature of services. It provides an OSGi bundle programming model with minimal implementation dependencies and virtually no accidental complexity in the Java code. Bundles in this programming model contain a number of XML definition resources which are used to wire the application together and start it when the bundle is active. This Blueprint Service specification is derived from the Spring Dynamic Modules project. There are currently two open source implementations of the Blueprint: Apache Aries Eclipse Gemini