SlideShare a Scribd company logo
1 of 37
Download to read offline
OSGi ecosystems
compared
on Apache Karaf
Christian Schneider
Talend
Goals
● Introduce Declarative Services and Blueprint
● Model a simple enterprise application in both frameworks regarding
○ Configuration
○ JPA and Transactions
○ Rest and SOAP
● Packaging / Deployment for Apache Karaf
● Eclipse without PDE
● Recommendations
● Future enhancements
Sample Application Tasklist
Persistence
JPA
TaskServiceImpl
Model
Task Entity
TaskService interface
OSGi
service
UI
Servlet
UI
Angular JS
http
Service Endpoint
REST
github.com/cschneider/Karaf-Tutorial
Examples tasklist-ds and tasklist-
blueprint-cdi
Declarative Services (DS)
● Component <-> Class <-> XML descriptor
● Annotations -> XML at build time
● Dynamic Lifecycle
Pro
● Annotations standardized
● Very small at runtime (Just one bundle)
Con
● No support for interceptors
● No extension model
DS Component Lifecycle
Component A Service B
Component A Service B
Will activate when all
dependencies are present
Component A Service B
Will deactivate when any
mandatory dependency goes
away
DS Example
@Component
public class InitHelper {
TaskService taskService;
@Activate
public void addDemoTasks() {
Task task = new Task(1, "Just a sample task", "Some more info");
taskService.addTask(task);
}
@Reference
public void setTaskService(TaskService taskService) {
this.taskService = taskService;
}
}
Create OSGi Service
Called on start of component
Mandatory OSGi service reference
(Aries) Blueprint
● Beans described in a XML Context
● Annotations -> XML at build time
● Config per Context, injected into properties
Pro
● Extension model using Namespaces
● Many Extensions (Aries JPA, Aries Transaction, CXF, Camel, Authz)
● Supports internal wiring (DI)
● Supports interceptors (e.g. for transactions)
Con
● No standard blueprint annotations
● Lifecycle per Context
● Service damping
Blueprint Lifecycle
Context A Service B
Context A Service B
Will activate when all mandatory
dependencies are present
Context A Service B
Will block if mandatory service
goes away
Graceperiod when mandatory
services missing
Permanent failure after timeout
Blueprint Example
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean id="initHelper" class="net.lr.tasklist.persistence.impl.InitHelper" init-
method="addDemoTasks">
<property name="taskService" ref="taskService"/>
</bean>
<reference id="taskService" interface="net.lr.tasklist.model.TaskService"/>
</blueprint>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" >
<bean id="taskServiceImpl" class="net.lr.tasklist.persistence.impl.
TaskServiceImpl" ext:field-injection="true"/>
<service ref="taskServiceImpl" interface="net.lr.tasklist.model.TaskService"/>
</blueprint>
Create bean
Inject another bean
Mandatory OSGi service reference
Publish bean as OSGi service
Called on start of bean
Blueprint from CDI annotations
blueprint-maven-plugin
CDI + JEE + pax-cdi Annotations
blueprint xml
● Uses subset of CDI
● Aims for compatibility with real CDI runtime
Blueprint from CDI annotations Example
@OsgiServiceProvider(classes = {TaskService.class})
@Singleton
public class TaskServiceImpl implements TaskService {
}
@Singleton
public class InitHelper {
@OsgiService @Inject TaskService taskService;
@PostConstruct
public void addDemoTasks() {
Task task = new Task(1, "Just a sample task", "Some more info");
taskService.addTask(task);
}
}
Create bean
Inject OSGi Service
Publish as OSGi service
Inject another bean
Called on start of context
Configuration
Goals
● Configure objects from config admin configurations
● Support configuration changes at runtime
● Ideally support type safety and config validation (meta type spec)
Configuration in DS (1.3)
@ObjectClassDefinition(name = "Server Configuration")
@interface ServerConfig {
String host() default "0.0.0.0";
int port() default 8080;
boolean enableSSL() default false;
}
@Component
@Designate(ocd = ServerConfig.class)
public class ServerComponent {
@Activate
public void activate(ServerConfig cfg) {
ServerSocket sock = new ServerSocket();
sock.bind(new InetSocketAddress(cfg.host(), cfg.port()));
}
}
Meta type definition
Type safe configuration
called when config changes
link with config metadata
Example from http://njbartlett.name/2015/08/17/osgir6-declarative-services.html
Configuration in blueprint
<cm:property-placeholder persistent-id="com.example.config" update-strategy="reload">
<cm:default-properties>
<cm:property name="host" value="0.0.0.0" />
<cm:property name="port" value="8080" />
</cm:default-properties>
</cm:property-placeholder>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" >
<bean id="taskServiceImpl" class="net.lr.tasklist.persistence.impl.TaskServiceImpl">
<property name=”host” value=”${host}”/>
<property name=”port” value=”${port}”/>
</bean>
</blueprint>
Default value
In Apache Karaf config would be in
/etc/com.example.config.cfg
Blueprint context restarted on
config change
Inject into property with
automatic type conversion
No real meta type support
JPA and Transactions - Persistence Unit
Bundle A
Meta-Persistence:
META-INF/persistence.xml
Aries JPA
Scans for bundles with
persistence units
DataSource ServiceDataSource name
EntityManagerFactory
EntityManager
JpaTemplate
Creates services in
the name of Bundle A
Persistence Provider name
PersistenceProvider Service
Hibernate
Aries JPA Container implements the OSGi JPA Service Specification.
Closure based transactions for DS or Blueprint
@Component
public class TaskServiceImpl implements TaskService {
private JpaTemplate jpa;
public Task getTask(Integer id) {
return jpa.txExpr(TransactionType.Supports, em -> em.find(Task.class, id));
}
public void updateTask(Task task) {
jpa.tx(em -> em.persist(task));
}
@Reference(target = "(osgi.unit.name=tasklist)")
public void setJpaTemplate(JpaTemplate jpa) {
this.jpa = jpa;
}
}
Declarative transactions for Blueprint
@Singleton
@Transactional
public class TaskServiceImpl implements TaskService {
@PersistenceContext(unitName = "tasklist")
EntityManager em;
@Transactional(TxType.SUPPORTS)
public Task getTask(Integer id) {
return em.find(Task.class, id);
}
public void updateTask(Task task) {
em.persist(task);
}
}
All methods run in transaction by default
Managed EM injected
No Transaction required here
REST and SOAP Services
Use OSGi remote services (Apache CXF DOSGi or Eclipse ECF)
● Annotate Class with @WebService or Rest annotations
● Export as OSGi service with special properties
JAX-RS connector by Eclipsesource (Holger Staudacher)
● Scans for OSGi services of JAX-RS classes
● Provides security and different serializations
● Easy to install in Apache Karaf with a feature
REST and SOAP Service in blueprint using Apache
CXF
● Custom Aries blueprint namespace
● No pure Annotation based configs
● Several protocols http, servlet, jms, local, …
● Extensive Security Features
● Enterprise level logging to Elasticsearch leveraging Karaf Decanter
REST Service in Blueprint using CXF
<bean id="personServiceImpl" class="net.lr.tutorial.karaf.cxf.personrest.impl.PersonServiceImpl"/>
<jaxrs:server address="/person" id="personService">
<jaxrs:serviceBeans>
<ref component-id="personServiceImpl" />
</jaxrs:serviceBeans>
<jaxrs:features>
<cxf:logging />
</jaxrs:features>
</jaxrs:server>
Class with JAXRS annoations
Additional CXF features
SOAP Service in Blueprint using CXF
<bean id="personServiceImpl" class="net.lr.tutorial.karaf.cxf.personservice.impl.PersonServiceImpl"/>
<jaxws:endpoint implementor="#personServiceImpl" address="/personService" />
Packaging for Apache Karaf
Pro
● User features can depend on other features to ease deployment
● Karaf provides features for most enterprise needs like (JPA, Transaction,
CXF, Camel, ActiveMQ, Hibernate, OpenJPA, Eclipselink, Elastic Search)
● Feature validation at build time (Since Karaf 4)
● References to bundles and feature repos as maven coordinates
● Can leverage all bundles in any maven repo
Con
● Karaf feature creation still largely manual
Karaf Feature Repo Example
<features name="tasklist-cdi-1.0.0-SNAPSHOT" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
<repository>mvn:org.apache.aries.jpa/jpa-features/2.2.0-SNAPSHOT/xml/features</repository>
<repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.7.0/xml/features</repository>
<feature name="example-tasklist-cdi-persistence" version="${pom.version}">
<feature>pax-jdbc-h2</feature>
<feature>pax-jdbc-config</feature>
<feature>pax-jdbc-pool-dbcp2</feature>
<feature>jndi</feature>
<feature>transaction</feature>
<feature version="[2.2, 2.3)">jpa</feature>
<feature version="[4.3, 4.4)">hibernate</feature>
<bundle>mvn:net.lr.tasklist.cdi/tasklist-model/${pom.version}</bundle>
<bundle>mvn:net.lr.tasklist.cdi/tasklist-persistence/${pom.version}</bundle>
</feature>
Reference other feature repos
Depend on features
Set version ranges for features
Define bundles to install
Deployment on Apache Karaf
Deployment options
● Deployment by hand using Console commands
● Remote triggered deployment using JMX
● Create self contained Archive from Karaf + Features + Bundles using karaf-
maven-plugin
● Create lightweight deployment using Karaf Profiles
IDE: Plain Eclipse + m2e (No PDE)
Pros
● Familiar maven builds
● Can check out individual maven projects
● No target platform or similar
● maven-bundle-plugin does most of the work automatically
● Debugging in running Karaf quite simple
Cons
● No OSGi specific tooling
● Configuring deployments (Karaf features) mainly manual
● Pax Exam OSGi integration tests difficult to set up
● Needs remote debugging
Demo
Recommendations DS
● If OSGi dynamics needed
● Nicer config support
● If frameworks work with the stock DS features
● No special integration with most big open source libraries and frameworks
Recommendations (Aries) Blueprint
● If you need other Apache Frameworks like Camel, CXF
● Better JPA / XA support
● Annotations currently support only subset of CDI
Future Developments
● Extension model for Blueprint generation from Annotated Code
● Creation of OSGi indexes from maven dependencies
● Better bndtools maven support in Version 3.1.0
● Karaf features based on requirements like in bndtools
● Karaf boot: Simplified development / test / deployment lifecycle like in Spring
boot
Questions ?
github.com/cschneider/Karaf-Tutorial
Examples tasklist-ds and tasklist-blueprint-cdi
Backup
CDI (PAX-CDI)
● Mark bundle as CDI bundle by placing empty beans.xml in META-INF
● Use CDI + JEE + pax-cdi Annotations
● Annotations interpreted at runtime
● Uses pax-cdi + Openwebbeans or Weld
● Quite comprehensive support for CDI
● JPA support planned using Apache Deltaspike (not yet working)
● JSF not yet working
● Lifecycle per context (bundle)
● Service Damping like in Blueprint
● Not yet fully mature
CDI Example
Basically same as in Blueprint from CDI example.
Recommendations PAX CDI
Pro
● Leverage JEE knowledge
Con
● Not fully mature
Configuration in CDI
● No out of the box solution
● See https://java.net/jira/browse/GLASSFISH-15364 - unresolved since 2010
● Typically implemented using
@Produces
MyConfig loadConfig() {
// Read config explicitly
}
Deployment with bndtools
● Define launch configs using requirements and OSGi bundle resolver
● Create self contained archives from bndtools and gradle
IDE: Bndtools
Pros
● Deployments easy to define if OSGi indexes exist for the needed bundles
● Fast incremental Builds
● Tests and debugging easy. No remote debug
Cons
● OSGi ready repositories only cover very small subset of bundles in maven
central
● Very limited maven integration (Version 3.0.0)

More Related Content

What's hot

Apache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetApache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetNormandy JUG
 
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
 
Jahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karafJahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karafSerge Huber
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache CamelFuseSource.com
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful setTerry Cho
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleHenryk Konsek
 
OSGi in 5 minutes
OSGi in 5 minutesOSGi in 5 minutes
OSGi in 5 minutesSerge Huber
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentSanjeeb Sahoo
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersClaus Ibsen
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache CamelClaus Ibsen
 
Apache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source IntegrationApache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source Integrationprajods
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache CamelKenneth Peeples
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Spring framework 4.x
Spring framework 4.xSpring framework 4.x
Spring framework 4.xArawn Park
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersClaus Ibsen
 

What's hot (20)

Apache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetApache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume Nodet
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
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
 
Jahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karafJahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karaf
 
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter LehtoJavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful set
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whale
 
OSGi in 5 minutes
OSGi in 5 minutesOSGi in 5 minutes
OSGi in 5 minutes
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
OSGi Presentation
OSGi PresentationOSGi Presentation
OSGi Presentation
 
Apache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source IntegrationApache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source Integration
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache Camel
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Spring framework 4.x
Spring framework 4.xSpring framework 4.x
Spring framework 4.x
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 

Viewers also liked

Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafIoan Eugen Stan
 
Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlettmfrancis
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesikmfrancis
 
OSGi Provisioning With Apache ACE
OSGi Provisioning With Apache ACEOSGi Provisioning With Apache ACE
OSGi Provisioning With Apache ACEmfrancis
 
The Karaf Model - How to reach excellence!
The Karaf Model - How to reach excellence!The Karaf Model - How to reach excellence!
The Karaf Model - How to reach excellence!BYAZ
 
Flossuk2015 opennms1.0;21 03-2015
Flossuk2015 opennms1.0;21 03-2015Flossuk2015 opennms1.0;21 03-2015
Flossuk2015 opennms1.0;21 03-2015craiggallen
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafAchim Nierbeck
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixMarcel Offermans
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro ServicesMarcel Offermans
 
Containerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetesContainerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetesBrian McNamara
 
OpenNMS - My Notes
OpenNMS - My NotesOpenNMS - My Notes
OpenNMS - My Notesashrawi92
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneidermfrancis
 
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...mfrancis
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchevmfrancis
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBWebinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBMongoDB
 

Viewers also liked (18)

Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlett
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
 
OSGi Provisioning With Apache ACE
OSGi Provisioning With Apache ACEOSGi Provisioning With Apache ACE
OSGi Provisioning With Apache ACE
 
The Karaf Model - How to reach excellence!
The Karaf Model - How to reach excellence!The Karaf Model - How to reach excellence!
The Karaf Model - How to reach excellence!
 
Flossuk2015 opennms1.0;21 03-2015
Flossuk2015 opennms1.0;21 03-2015Flossuk2015 opennms1.0;21 03-2015
Flossuk2015 opennms1.0;21 03-2015
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache Karaf
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
 
De leukste Bug
De leukste BugDe leukste Bug
De leukste Bug
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache Felix
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro Services
 
Containerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetesContainerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetes
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
OpenNMS - My Notes
OpenNMS - My NotesOpenNMS - My Notes
OpenNMS - My Notes
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneider
 
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBWebinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
 

Similar to OSGi ecosystems compared on Apache Karaf - Christian Schneider

What is new in java 8 concurrency
What is new in java 8 concurrencyWhat is new in java 8 concurrency
What is new in java 8 concurrencykshanth2101
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfAppster1
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfAppster1
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with javaDPC Consulting Ltd
 
Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistencePinaki Poddar
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
How Does Kubernetes Build OpenAPI Specifications?
How Does Kubernetes Build OpenAPI Specifications?How Does Kubernetes Build OpenAPI Specifications?
How Does Kubernetes Build OpenAPI Specifications?reallavalamp
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleFelix Meschberger
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleFelix Meschberger
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCPEric Jain
 
Grails Plugin
Grails PluginGrails Plugin
Grails Pluginguligala
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsSadayuki Furuhashi
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Loiane Groner
 

Similar to OSGi ecosystems compared on Apache Karaf - Christian Schneider (20)

What is new in java 8 concurrency
What is new in java 8 concurrencyWhat is new in java 8 concurrency
What is new in java 8 concurrency
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
 
Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed Persistence
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
How Does Kubernetes Build OpenAPI Specifications?
How Does Kubernetes Build OpenAPI Specifications?How Does Kubernetes Build OpenAPI Specifications?
How Does Kubernetes Build OpenAPI Specifications?
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi Style
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi Style
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCP
 
Grails Plugin
Grails PluginGrails Plugin
Grails Plugin
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
GradleFX
GradleFXGradleFX
GradleFX
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018
 

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

OSGi ecosystems compared on Apache Karaf - Christian Schneider

  • 1. OSGi ecosystems compared on Apache Karaf Christian Schneider Talend
  • 2. Goals ● Introduce Declarative Services and Blueprint ● Model a simple enterprise application in both frameworks regarding ○ Configuration ○ JPA and Transactions ○ Rest and SOAP ● Packaging / Deployment for Apache Karaf ● Eclipse without PDE ● Recommendations ● Future enhancements
  • 3. Sample Application Tasklist Persistence JPA TaskServiceImpl Model Task Entity TaskService interface OSGi service UI Servlet UI Angular JS http Service Endpoint REST github.com/cschneider/Karaf-Tutorial Examples tasklist-ds and tasklist- blueprint-cdi
  • 4. Declarative Services (DS) ● Component <-> Class <-> XML descriptor ● Annotations -> XML at build time ● Dynamic Lifecycle Pro ● Annotations standardized ● Very small at runtime (Just one bundle) Con ● No support for interceptors ● No extension model
  • 5. DS Component Lifecycle Component A Service B Component A Service B Will activate when all dependencies are present Component A Service B Will deactivate when any mandatory dependency goes away
  • 6. DS Example @Component public class InitHelper { TaskService taskService; @Activate public void addDemoTasks() { Task task = new Task(1, "Just a sample task", "Some more info"); taskService.addTask(task); } @Reference public void setTaskService(TaskService taskService) { this.taskService = taskService; } } Create OSGi Service Called on start of component Mandatory OSGi service reference
  • 7. (Aries) Blueprint ● Beans described in a XML Context ● Annotations -> XML at build time ● Config per Context, injected into properties Pro ● Extension model using Namespaces ● Many Extensions (Aries JPA, Aries Transaction, CXF, Camel, Authz) ● Supports internal wiring (DI) ● Supports interceptors (e.g. for transactions) Con ● No standard blueprint annotations ● Lifecycle per Context ● Service damping
  • 8. Blueprint Lifecycle Context A Service B Context A Service B Will activate when all mandatory dependencies are present Context A Service B Will block if mandatory service goes away Graceperiod when mandatory services missing Permanent failure after timeout
  • 9. Blueprint Example <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean id="initHelper" class="net.lr.tasklist.persistence.impl.InitHelper" init- method="addDemoTasks"> <property name="taskService" ref="taskService"/> </bean> <reference id="taskService" interface="net.lr.tasklist.model.TaskService"/> </blueprint> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > <bean id="taskServiceImpl" class="net.lr.tasklist.persistence.impl. TaskServiceImpl" ext:field-injection="true"/> <service ref="taskServiceImpl" interface="net.lr.tasklist.model.TaskService"/> </blueprint> Create bean Inject another bean Mandatory OSGi service reference Publish bean as OSGi service Called on start of bean
  • 10. Blueprint from CDI annotations blueprint-maven-plugin CDI + JEE + pax-cdi Annotations blueprint xml ● Uses subset of CDI ● Aims for compatibility with real CDI runtime
  • 11. Blueprint from CDI annotations Example @OsgiServiceProvider(classes = {TaskService.class}) @Singleton public class TaskServiceImpl implements TaskService { } @Singleton public class InitHelper { @OsgiService @Inject TaskService taskService; @PostConstruct public void addDemoTasks() { Task task = new Task(1, "Just a sample task", "Some more info"); taskService.addTask(task); } } Create bean Inject OSGi Service Publish as OSGi service Inject another bean Called on start of context
  • 12. Configuration Goals ● Configure objects from config admin configurations ● Support configuration changes at runtime ● Ideally support type safety and config validation (meta type spec)
  • 13. Configuration in DS (1.3) @ObjectClassDefinition(name = "Server Configuration") @interface ServerConfig { String host() default "0.0.0.0"; int port() default 8080; boolean enableSSL() default false; } @Component @Designate(ocd = ServerConfig.class) public class ServerComponent { @Activate public void activate(ServerConfig cfg) { ServerSocket sock = new ServerSocket(); sock.bind(new InetSocketAddress(cfg.host(), cfg.port())); } } Meta type definition Type safe configuration called when config changes link with config metadata Example from http://njbartlett.name/2015/08/17/osgir6-declarative-services.html
  • 14. Configuration in blueprint <cm:property-placeholder persistent-id="com.example.config" update-strategy="reload"> <cm:default-properties> <cm:property name="host" value="0.0.0.0" /> <cm:property name="port" value="8080" /> </cm:default-properties> </cm:property-placeholder> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > <bean id="taskServiceImpl" class="net.lr.tasklist.persistence.impl.TaskServiceImpl"> <property name=”host” value=”${host}”/> <property name=”port” value=”${port}”/> </bean> </blueprint> Default value In Apache Karaf config would be in /etc/com.example.config.cfg Blueprint context restarted on config change Inject into property with automatic type conversion No real meta type support
  • 15. JPA and Transactions - Persistence Unit Bundle A Meta-Persistence: META-INF/persistence.xml Aries JPA Scans for bundles with persistence units DataSource ServiceDataSource name EntityManagerFactory EntityManager JpaTemplate Creates services in the name of Bundle A Persistence Provider name PersistenceProvider Service Hibernate Aries JPA Container implements the OSGi JPA Service Specification.
  • 16. Closure based transactions for DS or Blueprint @Component public class TaskServiceImpl implements TaskService { private JpaTemplate jpa; public Task getTask(Integer id) { return jpa.txExpr(TransactionType.Supports, em -> em.find(Task.class, id)); } public void updateTask(Task task) { jpa.tx(em -> em.persist(task)); } @Reference(target = "(osgi.unit.name=tasklist)") public void setJpaTemplate(JpaTemplate jpa) { this.jpa = jpa; } }
  • 17. Declarative transactions for Blueprint @Singleton @Transactional public class TaskServiceImpl implements TaskService { @PersistenceContext(unitName = "tasklist") EntityManager em; @Transactional(TxType.SUPPORTS) public Task getTask(Integer id) { return em.find(Task.class, id); } public void updateTask(Task task) { em.persist(task); } } All methods run in transaction by default Managed EM injected No Transaction required here
  • 18. REST and SOAP Services Use OSGi remote services (Apache CXF DOSGi or Eclipse ECF) ● Annotate Class with @WebService or Rest annotations ● Export as OSGi service with special properties JAX-RS connector by Eclipsesource (Holger Staudacher) ● Scans for OSGi services of JAX-RS classes ● Provides security and different serializations ● Easy to install in Apache Karaf with a feature
  • 19. REST and SOAP Service in blueprint using Apache CXF ● Custom Aries blueprint namespace ● No pure Annotation based configs ● Several protocols http, servlet, jms, local, … ● Extensive Security Features ● Enterprise level logging to Elasticsearch leveraging Karaf Decanter
  • 20. REST Service in Blueprint using CXF <bean id="personServiceImpl" class="net.lr.tutorial.karaf.cxf.personrest.impl.PersonServiceImpl"/> <jaxrs:server address="/person" id="personService"> <jaxrs:serviceBeans> <ref component-id="personServiceImpl" /> </jaxrs:serviceBeans> <jaxrs:features> <cxf:logging /> </jaxrs:features> </jaxrs:server> Class with JAXRS annoations Additional CXF features
  • 21. SOAP Service in Blueprint using CXF <bean id="personServiceImpl" class="net.lr.tutorial.karaf.cxf.personservice.impl.PersonServiceImpl"/> <jaxws:endpoint implementor="#personServiceImpl" address="/personService" />
  • 22. Packaging for Apache Karaf Pro ● User features can depend on other features to ease deployment ● Karaf provides features for most enterprise needs like (JPA, Transaction, CXF, Camel, ActiveMQ, Hibernate, OpenJPA, Eclipselink, Elastic Search) ● Feature validation at build time (Since Karaf 4) ● References to bundles and feature repos as maven coordinates ● Can leverage all bundles in any maven repo Con ● Karaf feature creation still largely manual
  • 23. Karaf Feature Repo Example <features name="tasklist-cdi-1.0.0-SNAPSHOT" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0"> <repository>mvn:org.apache.aries.jpa/jpa-features/2.2.0-SNAPSHOT/xml/features</repository> <repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.7.0/xml/features</repository> <feature name="example-tasklist-cdi-persistence" version="${pom.version}"> <feature>pax-jdbc-h2</feature> <feature>pax-jdbc-config</feature> <feature>pax-jdbc-pool-dbcp2</feature> <feature>jndi</feature> <feature>transaction</feature> <feature version="[2.2, 2.3)">jpa</feature> <feature version="[4.3, 4.4)">hibernate</feature> <bundle>mvn:net.lr.tasklist.cdi/tasklist-model/${pom.version}</bundle> <bundle>mvn:net.lr.tasklist.cdi/tasklist-persistence/${pom.version}</bundle> </feature> Reference other feature repos Depend on features Set version ranges for features Define bundles to install
  • 24. Deployment on Apache Karaf Deployment options ● Deployment by hand using Console commands ● Remote triggered deployment using JMX ● Create self contained Archive from Karaf + Features + Bundles using karaf- maven-plugin ● Create lightweight deployment using Karaf Profiles
  • 25. IDE: Plain Eclipse + m2e (No PDE) Pros ● Familiar maven builds ● Can check out individual maven projects ● No target platform or similar ● maven-bundle-plugin does most of the work automatically ● Debugging in running Karaf quite simple Cons ● No OSGi specific tooling ● Configuring deployments (Karaf features) mainly manual ● Pax Exam OSGi integration tests difficult to set up ● Needs remote debugging
  • 26. Demo
  • 27. Recommendations DS ● If OSGi dynamics needed ● Nicer config support ● If frameworks work with the stock DS features ● No special integration with most big open source libraries and frameworks
  • 28. Recommendations (Aries) Blueprint ● If you need other Apache Frameworks like Camel, CXF ● Better JPA / XA support ● Annotations currently support only subset of CDI
  • 29. Future Developments ● Extension model for Blueprint generation from Annotated Code ● Creation of OSGi indexes from maven dependencies ● Better bndtools maven support in Version 3.1.0 ● Karaf features based on requirements like in bndtools ● Karaf boot: Simplified development / test / deployment lifecycle like in Spring boot
  • 32. CDI (PAX-CDI) ● Mark bundle as CDI bundle by placing empty beans.xml in META-INF ● Use CDI + JEE + pax-cdi Annotations ● Annotations interpreted at runtime ● Uses pax-cdi + Openwebbeans or Weld ● Quite comprehensive support for CDI ● JPA support planned using Apache Deltaspike (not yet working) ● JSF not yet working ● Lifecycle per context (bundle) ● Service Damping like in Blueprint ● Not yet fully mature
  • 33. CDI Example Basically same as in Blueprint from CDI example.
  • 34. Recommendations PAX CDI Pro ● Leverage JEE knowledge Con ● Not fully mature
  • 35. Configuration in CDI ● No out of the box solution ● See https://java.net/jira/browse/GLASSFISH-15364 - unresolved since 2010 ● Typically implemented using @Produces MyConfig loadConfig() { // Read config explicitly }
  • 36. Deployment with bndtools ● Define launch configs using requirements and OSGi bundle resolver ● Create self contained archives from bndtools and gradle
  • 37. IDE: Bndtools Pros ● Deployments easy to define if OSGi indexes exist for the needed bundles ● Fast incremental Builds ● Tests and debugging easy. No remote debug Cons ● OSGi ready repositories only cover very small subset of bundles in maven central ● Very limited maven integration (Version 3.0.0)