Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

The OSGI world of REST
"presenter": {
    "name": "Dragos Dascalita Haut",
    "position": "Solution Architect",
    "company": "Adobe"
What did I learn
Hot deployments
Better modularization
Lightweight runtime
Phase 1 : startup
 Felix + Jetty
Servlet registration by path
Phase 2 : jax-rs
 Felix + Jetty
+ JAX-RS framework
Phase 3 : api docs
 Felix + Jetty
+ Jersey
+ api docs framework
Phase 4 : ready
 Felix + Jetty
+ Jersey
+ Swagger

      ◦ Libraries are easier to integrate by other teams

      ◦ You can swap application containers easier:

           we were able to try Apache Felix, then Apache Karaf,

            gave Equinox a try too but switched back to Apache Felix.

            It didn't require any modification of our code to try

            them in multiple containers.
• The code is more portable

    ◦ You can make updates without restarting the application runtime

    ◦ This increases the app uptime with a low level of effort

    ◦ A classic JEE alternative would be the rolling updates:

                      shutdown existing instances,

                      spin new instances with the new code, but the overhead is significant. 

• Hot deployments are powerful
• Better separation of concerns 
◦ One of the OSGI goals :); no further comments on this point ...

◦ It simplifies the integration tests
• The "launchpad" concept 
◦  Lightweight - "the simplest container to run your code" 

◦ Concept borrowed from Apache Sling , s
upported by Apache Karaf

◦ Compare with classic JEE containers;
     JARs and pom.xml files as dependencies
• OSGI is not for the masses 
◦  Advanced technology 

◦ Be thoughtful of ClassLoaders

◦ The team needs to be open to learn new things

◦ The team needs to acknowledge the value of modularization
• Be aware of non-OSGI libs
◦  The majority of popular libs are OSGI ready 

◦ But when you encounter some that are not, be ready for the challenge

◦ Create OSGI wrappers

    OSGI packaging means exporting packages and resolving import statements

◦ It usually happens in the initial phases of the projects, when new libs get added

    or when upgrading to newer versions


Use a spacebar or arrow keys to navigate