SlideShare a Scribd company logo
1 of 61
Download to read offline
Motivation
Aspecio
Summary
Aspecio
aspect-oriented programming meets the OSGi service model
Simon Chemouil
Lambdacube
OSGi Community Event, 2016
1 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Aspecio
Aspecio
A Java/OSGi R6+ ’micro-framework’ that brings a mix of
component-oriented and aspect-oriented programming to your
application.
http: // lambdacube. github. io/ aspecio/
2 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
3 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
4 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
The DRY Principle
Do Not Repeat Yourself
Mostly a rule-of-thumb to organize code
Benefits:
Share code / Fix problems once (modularity)
Limit verbosity (readability)
5 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
The DRY Principle
Do Not Repeat Yourself
Mostly a rule-of-thumb to organize code
Benefits:
Share code / Fix problems once (modularity)
Limit verbosity (readability)
5 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
The DRY Principle
Do Not Repeat Yourself
Mostly a rule-of-thumb to organize code
Benefits:
Share code / Fix problems once (modularity)
Limit verbosity (readability)
5 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
The DRY Principle
Do Not Repeat Yourself
Mostly a rule-of-thumb to organize code
Benefits:
Share code / Fix problems once (modularity)
Limit verbosity (readability)
5 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
The DRY Principle
Do Not Repeat Yourself
Mostly a rule-of-thumb to organize code
Benefits:
Share code / Fix problems once (modularity)
Limit verbosity (readability)
5 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Motivation: modularizing implementations
OSGi solves API & service modularity
What about implementations?
6 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Motivation: modularizing implementations
OSGi solves API & service modularity
What about implementations?
6 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
7 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Modularizing implementations
Example
package com.mylibrary.book;
@Component
public final class BookManagerImpl implements BookManager {
@Reference AccessControl accessControl ;
public Promise <Book > getBook(String isbn) {
try {
accessControl . ensureAuthorized (...);
/* business code here */
return actuallyGetBookNow (isbn );
} catch (Exception e) {
return Promises.failed(e);
}
}
}
8 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Modularizing implementations
Example
package com.mylibrary.book;
@Component
public final class BookManagerImpl implements BookManager {
@ EnsureAuthorized
public Promise <Book > getBook(String isbn) {
/* business code here */
return actuallyGetBookNow (isbn );
}
}
9 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
DRY and modularity
Dealing with cross-cutting concerns
Modularizing implementations
Example
package com.mylibrary.book;
@Component
public final class BookManagerImpl implements BookManager {
@ EnsureAuthorized
@Measured
public Promise <Book > getBook(String isbn) {
/* business code here */
return actuallyGetBookNow (isbn );
}
}
10 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
11 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Aspecio
Aspects at injection-time!
No modification of existing bytecode: dynamic proxy injection
instead
Built with OSGi in mind
Component-framework agnostic ; also works with plain APIs
Minimal proxy overhead
No primitive boxing, pay for what you use
12 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Aspecio
Aspects at injection-time!
No modification of existing bytecode: dynamic proxy injection
instead
Built with OSGi in mind
Component-framework agnostic ; also works with plain APIs
Minimal proxy overhead
No primitive boxing, pay for what you use
12 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Aspecio
Aspects at injection-time!
No modification of existing bytecode: dynamic proxy injection
instead
Built with OSGi in mind
Component-framework agnostic ; also works with plain APIs
Minimal proxy overhead
No primitive boxing, pay for what you use
12 / 35 Simon Chemouil Aspecio
The Big Picture
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Framework Hooks
Since OSGi r5 (updated in r6)
Weaving Hooks
Ability to alter the bytecode of a class when it is first loaded.
Useful for “traditional” aspect frameworks, or bytecode
manipulation frameworks in general.
Service Hooks
Intercept queries to BundleContext#getService, service events,
service listeners registration
14 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Framework Hooks
Since OSGi r5 (updated in r6)
Weaving Hooks
Ability to alter the bytecode of a class when it is first loaded.
Useful for “traditional” aspect frameworks, or bytecode
manipulation frameworks in general.
Service Hooks
Intercept queries to BundleContext#getService, service events,
service listeners registration
14 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Framework Hooks
Since OSGi r5 (updated in r6)
Weaving Hooks
Ability to alter the bytecode of a class when it is first loaded.
Useful for “traditional” aspect frameworks, or bytecode
manipulation frameworks in general.
Service Hooks
Intercept queries to BundleContext#getService, service events,
service listeners registration
14 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
15 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Applying Aspects
In Aspecio, service implementations decide if they want
aspects
Two service properties:
service.aspect.weave: “I can only be consumed as a
service if that aspect is woven”
service.aspect.weave.optional: “I can be consumed
anyhow, but if that aspect is available, use it”
Aspects are similar to service interfaces, they represent a
concept, not necessarily a specific implementation
They are implemented with interceptors that are OSGi services
and may come and go
16 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Applying Aspects
In Aspecio, service implementations decide if they want
aspects
Two service properties:
service.aspect.weave: “I can only be consumed as a
service if that aspect is woven”
service.aspect.weave.optional: “I can be consumed
anyhow, but if that aspect is available, use it”
Aspects are similar to service interfaces, they represent a
concept, not necessarily a specific implementation
They are implemented with interceptors that are OSGi services
and may come and go
16 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Applying Aspects
Example
package com.mylibrary.book;
@Component(properties = { "service.aspect.weave=com.mylibrary.auth.AuthAspect",
"service.aspect.weave=com.metrics. MetricsAspect " })
public final class BookManagerImpl implements BookManager {
@ EnsureAuthorized
@Measured
public Promise <Book > getBook(String isbn) {
/* business code here */
return actuallyGetBookNow (isbn );
}
}
17 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Applying Aspects
Example
package com.mylibrary.book;
@Component
@Weave(required = { AuthAspect.class , MetricAspect .class })
public final class BookManagerImpl implements BookManager {
@ EnsureAuthorized
@Measured
public Promise <Book > getBook(String isbn) {
/* business code here */
return actuallyGetBookNow (isbn );
}
}
18 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Applying Aspects
Example
package com.mylibrary.book;
@Component
@Weave(required = AuthAspect.class , optional = MetricAspect .class)
public final class BookManagerImpl implements BookManager {
@ EnsureAuthorized
@Measured
public Promise <Book > getBook(String isbn) {
/* business code here */
return actuallyGetBookNow (isbn );
}
}
19 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Defining Aspects
Aspects can have any name, but we use classes by convention
to avoid conflicts.
To publish an Aspect, we register an OSGi service
implementing Interceptor (or one of its derivatives)
With the String property service.aspect containing the
name of the Aspect
Optionally, it is possible to define the property
service.aspect.extraProperties
20 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Defining Aspects
Aspects can have any name, but we use classes by convention
to avoid conflicts.
To publish an Aspect, we register an OSGi service
implementing Interceptor (or one of its derivatives)
With the String property service.aspect containing the
name of the Aspect
Optionally, it is possible to define the property
service.aspect.extraProperties
20 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Defining Aspects
Example
package com.metrics;
// Marker interface
public interface MetricAspect {
}
21 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Defining Aspects
Example
package com.metrics;
@Component
@Aspect(provides = MetricAspect .class , extraProperties = "measured ")
public final class AnnotatedMetricInterceptorImpl
implements AnnotationInterceptor <Measured > {
@Reference Metrics metrics;
public Class <Measured > intercept () { return Measured.class; }
public Advice onCall(Measured annotation , CallContext callContext) {
String methodName = callContext .target.getName () +
"::" + callContext .method.getName ();
Context syncTimer = metrics.timer(methodName ). time ();
return new AdviceAdapter () {
public int afterPhases () { return Finally.PHASE; }
public void runFinally () { syncTimer.close (); }
};
}
}
22 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
23 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
A Closer Look At Interceptors
In Aspecio, services providing aspects are called Interceptors
Interceptors always intercept all service methods
We can narrow it down by matching some annotations
If multiple interceptors provide the same aspect, Aspecio
chooses the one with the highest service ranking
If the rankings are equal, the one with the lowest service id is
selected
24 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
A Closer Look At Interceptors
In Aspecio, services providing aspects are called Interceptors
Interceptors always intercept all service methods
We can narrow it down by matching some annotations
If multiple interceptors provide the same aspect, Aspecio
chooses the one with the highest service ranking
If the rankings are equal, the one with the lowest service id is
selected
24 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Each time a method of the aspect proxy is called, the methods
onCall of the active interceptors are called
The method onCall returns an Advice
Advices tell Aspecio what to do when a proxy method is called
25 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Each time a method of the aspect proxy is called, the methods
onCall of the active interceptors are called
The method onCall returns an Advice
Advices tell Aspecio what to do when a proxy method is called
25 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Optionally request the actual arguments passed to the method,
and alter them;
Skip the call to the original method and return a value... or
proceed with the call;
Obtain throwables potentially thrown by the proxied method
and optionally alter them, but not swallow them;
Obtain and alter the return value
All of these for reference types and all primitive types to
prevent boxing!
26 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Optionally request the actual arguments passed to the method,
and alter them;
Skip the call to the original method and return a value... or
proceed with the call;
Obtain throwables potentially thrown by the proxied method
and optionally alter them, but not swallow them;
Obtain and alter the return value
All of these for reference types and all primitive types to
prevent boxing!
26 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Optionally request the actual arguments passed to the method,
and alter them;
Skip the call to the original method and return a value... or
proceed with the call;
Obtain throwables potentially thrown by the proxied method
and optionally alter them, but not swallow them;
Obtain and alter the return value
All of these for reference types and all primitive types to
prevent boxing!
26 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Optionally request the actual arguments passed to the method,
and alter them;
Skip the call to the original method and return a value... or
proceed with the call;
Obtain throwables potentially thrown by the proxied method
and optionally alter them, but not swallow them;
Obtain and alter the return value
All of these for reference types and all primitive types to
prevent boxing!
26 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Advices
Optionally request the actual arguments passed to the method,
and alter them;
Skip the call to the original method and return a value... or
proceed with the call;
Obtain throwables potentially thrown by the proxied method
and optionally alter them, but not swallow them;
Obtain and alter the return value
All of these for reference types and all primitive types to
prevent boxing!
26 / 35 Simon Chemouil Aspecio
The Big Picture Again
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Aspecio’s Dynamic Proxies
Aspecio generates proxies with the ASM bytecode generation
library
Proxies might generate several classes lazily
e.g if arguments are requested, an immutable data class in
generated for these unboxed arguments, with proper hashCode
and equals definitions.
Proxies generated by Aspecio expose the same binary signature
as the class they proxy
Including generic signature, annotations, etc, so that framework
relying on introspection work transparently
28 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Aspecio’s Dynamic Proxies
Aspecio generates proxies with the ASM bytecode generation
library
Proxies might generate several classes lazily
e.g if arguments are requested, an immutable data class in
generated for these unboxed arguments, with proper hashCode
and equals definitions.
Proxies generated by Aspecio expose the same binary signature
as the class they proxy
Including generic signature, annotations, etc, so that framework
relying on introspection work transparently
28 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Proxies and Services
Aspecio can proxy services implementing multiple service
interfaces just fine
However Aspecio will ignore services registered as a class or an
abstract class
Service proxies registered by Aspecio share the same properties
as the woven service
Aspecio handles different service scopes intelligently (including
prototype)
It will not generate different proxies for a singleton service
scoped as bundle for lazy-loading reasons (e.g, by Declarative
Services)
29 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Proxies and Services
Aspecio can proxy services implementing multiple service
interfaces just fine
However Aspecio will ignore services registered as a class or an
abstract class
Service proxies registered by Aspecio share the same properties
as the woven service
Aspecio handles different service scopes intelligently (including
prototype)
It will not generate different proxies for a singleton service
scoped as bundle for lazy-loading reasons (e.g, by Declarative
Services)
29 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Proxies and Services
Aspecio can proxy services implementing multiple service
interfaces just fine
However Aspecio will ignore services registered as a class or an
abstract class
Service proxies registered by Aspecio share the same properties
as the woven service
Aspecio handles different service scopes intelligently (including
prototype)
It will not generate different proxies for a singleton service
scoped as bundle for lazy-loading reasons (e.g, by Declarative
Services)
29 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Outline
1 Motivation
DRY and modularity
Dealing with cross-cutting concerns
2 Aspecio
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
3 Summary
30 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Getting started
Aspecio is just one bundle
depends only ony an OSGi R6+ framework
slf4j is an optional dependency; otherwise JUL logging is used
It has to be started early in the framework, before any bundle
that uses it
No way to “fake” service events to “unwire” components;
Same situation for all frameworks making use of framework
hooks, e.g subsystems
31 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Getting started
Aspecio is just one bundle
depends only ony an OSGi R6+ framework
slf4j is an optional dependency; otherwise JUL logging is used
It has to be started early in the framework, before any bundle
that uses it
No way to “fake” service events to “unwire” components;
Same situation for all frameworks making use of framework
hooks, e.g subsystems
31 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Overview
Using Aspecio
Interceptors, Advices and Proxies
Getting started
Checking if Aspecio sees your aspects
Aspecio provides two Gogo commands
aspect:aspects
aspects and interceptors available
aspect:woven
services currently woven, with which aspect
32 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Aspecio Tech Sheet
A bit of a component framework
Plays with service dynamics and registers some on behalf of
other bundles
A lot of bytecode trickery
Mimicking the signature of classes and methods it proxies
Supporting all primitive types for call performance
And a Java DSL to define advices
Advices are close to automata that determine how the
generated code will interact with user code
33 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Aspecio Tech Sheet
A bit of a component framework
Plays with service dynamics and registers some on behalf of
other bundles
A lot of bytecode trickery
Mimicking the signature of classes and methods it proxies
Supporting all primitive types for call performance
And a Java DSL to define advices
Advices are close to automata that determine how the
generated code will interact with user code
33 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Aspecio Tech Sheet
A bit of a component framework
Plays with service dynamics and registers some on behalf of
other bundles
A lot of bytecode trickery
Mimicking the signature of classes and methods it proxies
Supporting all primitive types for call performance
And a Java DSL to define advices
Advices are close to automata that determine how the
generated code will interact with user code
33 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
In-house Feedback
Used on a large project (hundreds of bundles, thousands of
services)
Easy to get started
Some aspects are extremely useful
Metrics, Access Control, Exception Logging, ...
Practical with integration testing (with and without Aspecio)
Potential improvements:
Better stacking of advices, asynchronous support, “this”
handling
34 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
In-house Feedback
Used on a large project (hundreds of bundles, thousands of
services)
Easy to get started
Some aspects are extremely useful
Metrics, Access Control, Exception Logging, ...
Practical with integration testing (with and without Aspecio)
Potential improvements:
Better stacking of advices, asynchronous support, “this”
handling
34 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
In-house Feedback
Used on a large project (hundreds of bundles, thousands of
services)
Easy to get started
Some aspects are extremely useful
Metrics, Access Control, Exception Logging, ...
Practical with integration testing (with and without Aspecio)
Potential improvements:
Better stacking of advices, asynchronous support, “this”
handling
34 / 35 Simon Chemouil Aspecio
Motivation
Aspecio
Summary
Aspecio
Questions?
http: // lambdacube. github. io/ aspecio/
Twitter:
@simach
simon.chemouil@lambdacube.fr
35 / 35 Simon Chemouil Aspecio
Evaluate the Sessions
Sign in and vote at eclipsecon.org
- 1 + 10

More Related Content

What's hot

OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...mfrancis
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEmahrwald
 
Asynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T WardAsynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T Wardmfrancis
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...mfrancis
 
CamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityCamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityKenneth Peeples
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891NetApp
 
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2UCloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2USufyaan Kazi
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Vendic Magento, PWA & Marketing
 
Mastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCIMastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCIGregory GUILLOU
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?glynnormington
 
Building Distributed Systems with Netflix OSS and Spring Cloud
Building Distributed Systems with Netflix OSS and Spring CloudBuilding Distributed Systems with Netflix OSS and Spring Cloud
Building Distributed Systems with Netflix OSS and Spring CloudMatt Stine
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind TourVMware Tanzu
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSPuppet
 
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)Alexandre Dutra
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryAlain Sahli
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Matt Raible
 
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentAre We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentKen Pepple
 
OpenStack Architected Like AWS (and GCP)
OpenStack Architected Like AWS (and GCP)OpenStack Architected Like AWS (and GCP)
OpenStack Architected Like AWS (and GCP)Randy Bias
 
Persistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin FieldsPersistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin FieldsOracle Developers
 

What's hot (20)

OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEE
 
Asynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T WardAsynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T Ward
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...
Build bundles in the cloud - How Cloudyle PaaS+ helps creating OSGi applicati...
 
CamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityCamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF Security
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891
 
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2UCloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)
 
Mastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCIMastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCI
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
Building Distributed Systems with Netflix OSS and Spring Cloud
Building Distributed Systems with Netflix OSS and Spring CloudBuilding Distributed Systems with Netflix OSS and Spring Cloud
Building Distributed Systems with Netflix OSS and Spring Cloud
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind Tour
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
 
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud Foundry
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
 
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentAre We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack Deployment
 
OpenStack Architected Like AWS (and GCP)
OpenStack Architected Like AWS (and GCP)OpenStack Architected Like AWS (and GCP)
OpenStack Architected Like AWS (and GCP)
 
Persistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin FieldsPersistent storage with containers By Kaslin Fields
Persistent storage with containers By Kaslin Fields
 

Similar to Aspecio - aspect-oriented programming meets the OSGi service model - Simon Chemouil

Tailoring Harmony/SE for Automotive V3
Tailoring Harmony/SE for Automotive V3Tailoring Harmony/SE for Automotive V3
Tailoring Harmony/SE for Automotive V3Fraser Chadburn
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component modelravindrareddy
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMmukulobject
 
Escape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceEscape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceRobert Munteanu
 
Acceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdfAcceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdfClaudiaNaveda2
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleSpringPeople
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinKai Tödter
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Steven Smith
 
Spring training
Spring trainingSpring training
Spring trainingTechFerry
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introductionTania Gonzales
 
Angular js introduction by Tania Gonzales
Angular js introduction by Tania GonzalesAngular js introduction by Tania Gonzales
Angular js introduction by Tania GonzalesThoughtworks
 
What is os gi and what does osgi
What is os gi and what does osgiWhat is os gi and what does osgi
What is os gi and what does osgiYunChang Lee
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Bram Adams
 

Similar to Aspecio - aspect-oriented programming meets the OSGi service model - Simon Chemouil (20)

Tailoring Harmony/SE for Automotive V3
Tailoring Harmony/SE for Automotive V3Tailoring Harmony/SE for Automotive V3
Tailoring Harmony/SE for Automotive V3
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component model
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
 
Escape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceEscape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud Service
 
Acceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdfAcceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdf
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
 
spring aop
spring aopspring aop
spring aop
 
Spring Framework -I
Spring Framework -ISpring Framework -I
Spring Framework -I
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Spring AOP
Spring AOPSpring AOP
Spring AOP
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
 
Spring training
Spring trainingSpring training
Spring training
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
Angular js introduction by Tania Gonzales
Angular js introduction by Tania GonzalesAngular js introduction by Tania Gonzales
Angular js introduction by Tania Gonzales
 
Spring aop
Spring aopSpring aop
Spring aop
 
What is os gi and what does osgi
What is os gi and what does osgiWhat is os gi and what does osgi
What is os gi and what does osgi
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 

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

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Aspecio - aspect-oriented programming meets the OSGi service model - Simon Chemouil

  • 1. Motivation Aspecio Summary Aspecio aspect-oriented programming meets the OSGi service model Simon Chemouil Lambdacube OSGi Community Event, 2016 1 / 35 Simon Chemouil Aspecio
  • 2. Motivation Aspecio Summary Aspecio Aspecio A Java/OSGi R6+ ’micro-framework’ that brings a mix of component-oriented and aspect-oriented programming to your application. http: // lambdacube. github. io/ aspecio/ 2 / 35 Simon Chemouil Aspecio
  • 3. Motivation Aspecio Summary Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 3 / 35 Simon Chemouil Aspecio
  • 4. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 4 / 35 Simon Chemouil Aspecio
  • 5. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns The DRY Principle Do Not Repeat Yourself Mostly a rule-of-thumb to organize code Benefits: Share code / Fix problems once (modularity) Limit verbosity (readability) 5 / 35 Simon Chemouil Aspecio
  • 6. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns The DRY Principle Do Not Repeat Yourself Mostly a rule-of-thumb to organize code Benefits: Share code / Fix problems once (modularity) Limit verbosity (readability) 5 / 35 Simon Chemouil Aspecio
  • 7. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns The DRY Principle Do Not Repeat Yourself Mostly a rule-of-thumb to organize code Benefits: Share code / Fix problems once (modularity) Limit verbosity (readability) 5 / 35 Simon Chemouil Aspecio
  • 8. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns The DRY Principle Do Not Repeat Yourself Mostly a rule-of-thumb to organize code Benefits: Share code / Fix problems once (modularity) Limit verbosity (readability) 5 / 35 Simon Chemouil Aspecio
  • 9. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns The DRY Principle Do Not Repeat Yourself Mostly a rule-of-thumb to organize code Benefits: Share code / Fix problems once (modularity) Limit verbosity (readability) 5 / 35 Simon Chemouil Aspecio
  • 10. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Motivation: modularizing implementations OSGi solves API & service modularity What about implementations? 6 / 35 Simon Chemouil Aspecio
  • 11. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Motivation: modularizing implementations OSGi solves API & service modularity What about implementations? 6 / 35 Simon Chemouil Aspecio
  • 12. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 7 / 35 Simon Chemouil Aspecio
  • 13. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Modularizing implementations Example package com.mylibrary.book; @Component public final class BookManagerImpl implements BookManager { @Reference AccessControl accessControl ; public Promise <Book > getBook(String isbn) { try { accessControl . ensureAuthorized (...); /* business code here */ return actuallyGetBookNow (isbn ); } catch (Exception e) { return Promises.failed(e); } } } 8 / 35 Simon Chemouil Aspecio
  • 14. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Modularizing implementations Example package com.mylibrary.book; @Component public final class BookManagerImpl implements BookManager { @ EnsureAuthorized public Promise <Book > getBook(String isbn) { /* business code here */ return actuallyGetBookNow (isbn ); } } 9 / 35 Simon Chemouil Aspecio
  • 15. Motivation Aspecio Summary DRY and modularity Dealing with cross-cutting concerns Modularizing implementations Example package com.mylibrary.book; @Component public final class BookManagerImpl implements BookManager { @ EnsureAuthorized @Measured public Promise <Book > getBook(String isbn) { /* business code here */ return actuallyGetBookNow (isbn ); } } 10 / 35 Simon Chemouil Aspecio
  • 16. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 11 / 35 Simon Chemouil Aspecio
  • 17. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Aspecio Aspects at injection-time! No modification of existing bytecode: dynamic proxy injection instead Built with OSGi in mind Component-framework agnostic ; also works with plain APIs Minimal proxy overhead No primitive boxing, pay for what you use 12 / 35 Simon Chemouil Aspecio
  • 18. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Aspecio Aspects at injection-time! No modification of existing bytecode: dynamic proxy injection instead Built with OSGi in mind Component-framework agnostic ; also works with plain APIs Minimal proxy overhead No primitive boxing, pay for what you use 12 / 35 Simon Chemouil Aspecio
  • 19. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Aspecio Aspects at injection-time! No modification of existing bytecode: dynamic proxy injection instead Built with OSGi in mind Component-framework agnostic ; also works with plain APIs Minimal proxy overhead No primitive boxing, pay for what you use 12 / 35 Simon Chemouil Aspecio
  • 21. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Framework Hooks Since OSGi r5 (updated in r6) Weaving Hooks Ability to alter the bytecode of a class when it is first loaded. Useful for “traditional” aspect frameworks, or bytecode manipulation frameworks in general. Service Hooks Intercept queries to BundleContext#getService, service events, service listeners registration 14 / 35 Simon Chemouil Aspecio
  • 22. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Framework Hooks Since OSGi r5 (updated in r6) Weaving Hooks Ability to alter the bytecode of a class when it is first loaded. Useful for “traditional” aspect frameworks, or bytecode manipulation frameworks in general. Service Hooks Intercept queries to BundleContext#getService, service events, service listeners registration 14 / 35 Simon Chemouil Aspecio
  • 23. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Framework Hooks Since OSGi r5 (updated in r6) Weaving Hooks Ability to alter the bytecode of a class when it is first loaded. Useful for “traditional” aspect frameworks, or bytecode manipulation frameworks in general. Service Hooks Intercept queries to BundleContext#getService, service events, service listeners registration 14 / 35 Simon Chemouil Aspecio
  • 24. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 15 / 35 Simon Chemouil Aspecio
  • 25. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Applying Aspects In Aspecio, service implementations decide if they want aspects Two service properties: service.aspect.weave: “I can only be consumed as a service if that aspect is woven” service.aspect.weave.optional: “I can be consumed anyhow, but if that aspect is available, use it” Aspects are similar to service interfaces, they represent a concept, not necessarily a specific implementation They are implemented with interceptors that are OSGi services and may come and go 16 / 35 Simon Chemouil Aspecio
  • 26. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Applying Aspects In Aspecio, service implementations decide if they want aspects Two service properties: service.aspect.weave: “I can only be consumed as a service if that aspect is woven” service.aspect.weave.optional: “I can be consumed anyhow, but if that aspect is available, use it” Aspects are similar to service interfaces, they represent a concept, not necessarily a specific implementation They are implemented with interceptors that are OSGi services and may come and go 16 / 35 Simon Chemouil Aspecio
  • 27. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Applying Aspects Example package com.mylibrary.book; @Component(properties = { "service.aspect.weave=com.mylibrary.auth.AuthAspect", "service.aspect.weave=com.metrics. MetricsAspect " }) public final class BookManagerImpl implements BookManager { @ EnsureAuthorized @Measured public Promise <Book > getBook(String isbn) { /* business code here */ return actuallyGetBookNow (isbn ); } } 17 / 35 Simon Chemouil Aspecio
  • 28. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Applying Aspects Example package com.mylibrary.book; @Component @Weave(required = { AuthAspect.class , MetricAspect .class }) public final class BookManagerImpl implements BookManager { @ EnsureAuthorized @Measured public Promise <Book > getBook(String isbn) { /* business code here */ return actuallyGetBookNow (isbn ); } } 18 / 35 Simon Chemouil Aspecio
  • 29. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Applying Aspects Example package com.mylibrary.book; @Component @Weave(required = AuthAspect.class , optional = MetricAspect .class) public final class BookManagerImpl implements BookManager { @ EnsureAuthorized @Measured public Promise <Book > getBook(String isbn) { /* business code here */ return actuallyGetBookNow (isbn ); } } 19 / 35 Simon Chemouil Aspecio
  • 30. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Defining Aspects Aspects can have any name, but we use classes by convention to avoid conflicts. To publish an Aspect, we register an OSGi service implementing Interceptor (or one of its derivatives) With the String property service.aspect containing the name of the Aspect Optionally, it is possible to define the property service.aspect.extraProperties 20 / 35 Simon Chemouil Aspecio
  • 31. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Defining Aspects Aspects can have any name, but we use classes by convention to avoid conflicts. To publish an Aspect, we register an OSGi service implementing Interceptor (or one of its derivatives) With the String property service.aspect containing the name of the Aspect Optionally, it is possible to define the property service.aspect.extraProperties 20 / 35 Simon Chemouil Aspecio
  • 32. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Defining Aspects Example package com.metrics; // Marker interface public interface MetricAspect { } 21 / 35 Simon Chemouil Aspecio
  • 33. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Defining Aspects Example package com.metrics; @Component @Aspect(provides = MetricAspect .class , extraProperties = "measured ") public final class AnnotatedMetricInterceptorImpl implements AnnotationInterceptor <Measured > { @Reference Metrics metrics; public Class <Measured > intercept () { return Measured.class; } public Advice onCall(Measured annotation , CallContext callContext) { String methodName = callContext .target.getName () + "::" + callContext .method.getName (); Context syncTimer = metrics.timer(methodName ). time (); return new AdviceAdapter () { public int afterPhases () { return Finally.PHASE; } public void runFinally () { syncTimer.close (); } }; } } 22 / 35 Simon Chemouil Aspecio
  • 34. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 23 / 35 Simon Chemouil Aspecio
  • 35. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started A Closer Look At Interceptors In Aspecio, services providing aspects are called Interceptors Interceptors always intercept all service methods We can narrow it down by matching some annotations If multiple interceptors provide the same aspect, Aspecio chooses the one with the highest service ranking If the rankings are equal, the one with the lowest service id is selected 24 / 35 Simon Chemouil Aspecio
  • 36. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started A Closer Look At Interceptors In Aspecio, services providing aspects are called Interceptors Interceptors always intercept all service methods We can narrow it down by matching some annotations If multiple interceptors provide the same aspect, Aspecio chooses the one with the highest service ranking If the rankings are equal, the one with the lowest service id is selected 24 / 35 Simon Chemouil Aspecio
  • 37. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Each time a method of the aspect proxy is called, the methods onCall of the active interceptors are called The method onCall returns an Advice Advices tell Aspecio what to do when a proxy method is called 25 / 35 Simon Chemouil Aspecio
  • 38. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Each time a method of the aspect proxy is called, the methods onCall of the active interceptors are called The method onCall returns an Advice Advices tell Aspecio what to do when a proxy method is called 25 / 35 Simon Chemouil Aspecio
  • 39. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Optionally request the actual arguments passed to the method, and alter them; Skip the call to the original method and return a value... or proceed with the call; Obtain throwables potentially thrown by the proxied method and optionally alter them, but not swallow them; Obtain and alter the return value All of these for reference types and all primitive types to prevent boxing! 26 / 35 Simon Chemouil Aspecio
  • 40. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Optionally request the actual arguments passed to the method, and alter them; Skip the call to the original method and return a value... or proceed with the call; Obtain throwables potentially thrown by the proxied method and optionally alter them, but not swallow them; Obtain and alter the return value All of these for reference types and all primitive types to prevent boxing! 26 / 35 Simon Chemouil Aspecio
  • 41. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Optionally request the actual arguments passed to the method, and alter them; Skip the call to the original method and return a value... or proceed with the call; Obtain throwables potentially thrown by the proxied method and optionally alter them, but not swallow them; Obtain and alter the return value All of these for reference types and all primitive types to prevent boxing! 26 / 35 Simon Chemouil Aspecio
  • 42. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Optionally request the actual arguments passed to the method, and alter them; Skip the call to the original method and return a value... or proceed with the call; Obtain throwables potentially thrown by the proxied method and optionally alter them, but not swallow them; Obtain and alter the return value All of these for reference types and all primitive types to prevent boxing! 26 / 35 Simon Chemouil Aspecio
  • 43. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Advices Optionally request the actual arguments passed to the method, and alter them; Skip the call to the original method and return a value... or proceed with the call; Obtain throwables potentially thrown by the proxied method and optionally alter them, but not swallow them; Obtain and alter the return value All of these for reference types and all primitive types to prevent boxing! 26 / 35 Simon Chemouil Aspecio
  • 45. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Aspecio’s Dynamic Proxies Aspecio generates proxies with the ASM bytecode generation library Proxies might generate several classes lazily e.g if arguments are requested, an immutable data class in generated for these unboxed arguments, with proper hashCode and equals definitions. Proxies generated by Aspecio expose the same binary signature as the class they proxy Including generic signature, annotations, etc, so that framework relying on introspection work transparently 28 / 35 Simon Chemouil Aspecio
  • 46. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Aspecio’s Dynamic Proxies Aspecio generates proxies with the ASM bytecode generation library Proxies might generate several classes lazily e.g if arguments are requested, an immutable data class in generated for these unboxed arguments, with proper hashCode and equals definitions. Proxies generated by Aspecio expose the same binary signature as the class they proxy Including generic signature, annotations, etc, so that framework relying on introspection work transparently 28 / 35 Simon Chemouil Aspecio
  • 47. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Proxies and Services Aspecio can proxy services implementing multiple service interfaces just fine However Aspecio will ignore services registered as a class or an abstract class Service proxies registered by Aspecio share the same properties as the woven service Aspecio handles different service scopes intelligently (including prototype) It will not generate different proxies for a singleton service scoped as bundle for lazy-loading reasons (e.g, by Declarative Services) 29 / 35 Simon Chemouil Aspecio
  • 48. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Proxies and Services Aspecio can proxy services implementing multiple service interfaces just fine However Aspecio will ignore services registered as a class or an abstract class Service proxies registered by Aspecio share the same properties as the woven service Aspecio handles different service scopes intelligently (including prototype) It will not generate different proxies for a singleton service scoped as bundle for lazy-loading reasons (e.g, by Declarative Services) 29 / 35 Simon Chemouil Aspecio
  • 49. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Proxies and Services Aspecio can proxy services implementing multiple service interfaces just fine However Aspecio will ignore services registered as a class or an abstract class Service proxies registered by Aspecio share the same properties as the woven service Aspecio handles different service scopes intelligently (including prototype) It will not generate different proxies for a singleton service scoped as bundle for lazy-loading reasons (e.g, by Declarative Services) 29 / 35 Simon Chemouil Aspecio
  • 50. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Outline 1 Motivation DRY and modularity Dealing with cross-cutting concerns 2 Aspecio Overview Using Aspecio Interceptors, Advices and Proxies Getting started 3 Summary 30 / 35 Simon Chemouil Aspecio
  • 51. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Getting started Aspecio is just one bundle depends only ony an OSGi R6+ framework slf4j is an optional dependency; otherwise JUL logging is used It has to be started early in the framework, before any bundle that uses it No way to “fake” service events to “unwire” components; Same situation for all frameworks making use of framework hooks, e.g subsystems 31 / 35 Simon Chemouil Aspecio
  • 52. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Getting started Aspecio is just one bundle depends only ony an OSGi R6+ framework slf4j is an optional dependency; otherwise JUL logging is used It has to be started early in the framework, before any bundle that uses it No way to “fake” service events to “unwire” components; Same situation for all frameworks making use of framework hooks, e.g subsystems 31 / 35 Simon Chemouil Aspecio
  • 53. Motivation Aspecio Summary Overview Using Aspecio Interceptors, Advices and Proxies Getting started Checking if Aspecio sees your aspects Aspecio provides two Gogo commands aspect:aspects aspects and interceptors available aspect:woven services currently woven, with which aspect 32 / 35 Simon Chemouil Aspecio
  • 54. Motivation Aspecio Summary Aspecio Tech Sheet A bit of a component framework Plays with service dynamics and registers some on behalf of other bundles A lot of bytecode trickery Mimicking the signature of classes and methods it proxies Supporting all primitive types for call performance And a Java DSL to define advices Advices are close to automata that determine how the generated code will interact with user code 33 / 35 Simon Chemouil Aspecio
  • 55. Motivation Aspecio Summary Aspecio Tech Sheet A bit of a component framework Plays with service dynamics and registers some on behalf of other bundles A lot of bytecode trickery Mimicking the signature of classes and methods it proxies Supporting all primitive types for call performance And a Java DSL to define advices Advices are close to automata that determine how the generated code will interact with user code 33 / 35 Simon Chemouil Aspecio
  • 56. Motivation Aspecio Summary Aspecio Tech Sheet A bit of a component framework Plays with service dynamics and registers some on behalf of other bundles A lot of bytecode trickery Mimicking the signature of classes and methods it proxies Supporting all primitive types for call performance And a Java DSL to define advices Advices are close to automata that determine how the generated code will interact with user code 33 / 35 Simon Chemouil Aspecio
  • 57. Motivation Aspecio Summary In-house Feedback Used on a large project (hundreds of bundles, thousands of services) Easy to get started Some aspects are extremely useful Metrics, Access Control, Exception Logging, ... Practical with integration testing (with and without Aspecio) Potential improvements: Better stacking of advices, asynchronous support, “this” handling 34 / 35 Simon Chemouil Aspecio
  • 58. Motivation Aspecio Summary In-house Feedback Used on a large project (hundreds of bundles, thousands of services) Easy to get started Some aspects are extremely useful Metrics, Access Control, Exception Logging, ... Practical with integration testing (with and without Aspecio) Potential improvements: Better stacking of advices, asynchronous support, “this” handling 34 / 35 Simon Chemouil Aspecio
  • 59. Motivation Aspecio Summary In-house Feedback Used on a large project (hundreds of bundles, thousands of services) Easy to get started Some aspects are extremely useful Metrics, Access Control, Exception Logging, ... Practical with integration testing (with and without Aspecio) Potential improvements: Better stacking of advices, asynchronous support, “this” handling 34 / 35 Simon Chemouil Aspecio
  • 60. Motivation Aspecio Summary Aspecio Questions? http: // lambdacube. github. io/ aspecio/ Twitter: @simach simon.chemouil@lambdacube.fr 35 / 35 Simon Chemouil Aspecio
  • 61. Evaluate the Sessions Sign in and vote at eclipsecon.org - 1 + 10