SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
OSGi as a Framework for 
   Building a Product Line:
Experience and Best Practices

   Afkham Azeez [azeez@apache.org]
   Ruwan Linton [ruwan@apache.org]
Agenda
•   SOA Middleware Products
•   Componentized SOA Platform
•   Why OSGi?
•   WSO2 Carbon
•   Challenges faced
•   Best practices
SOA Middleware Products
• Traditional SOA platforms are:
   – Overly complex
   – Heavyweight
   – Not internally consistent 
   – Hard to learn
   – Acquired, not designed
   – The components  don't fit well together
• The result is:
   – Centralizing SOA on a single hub based ESB
   – Relying on the “SOA team” to solve problems
   – Replacing centralized monolithic applications with
       • Centralized monolithic ESB and SOA platform
What is wrong with existing SOA 
           Platforms?
                      • Heavyweight, complex and bloated
Agile Adoption
                      • Downloading an evaluation can take days


                      • SOA adoption is restricted because tools are so 
Skills
                      difficult to use


                      • Large SOA platform “components” are actually
SOA Deployment        distinct products
                      • Bigger installations encourage centralization


                      • Adding new aspects of SOA (e.g. process choreography) 
Continuity
                      means installing and learning a completely new product


                      • Customers waste time integrating vendor's products
Product Integration
                      • Time that could be spent integrating real applications
Solution?
• Componentized SOA Platform
  – WSO2 Carbon Architecture based on OSGi
Why OSGi?
• It's a  framework which specifies a modular 
  architecture for dynamic component based systems.
• It can be used as the underlying core modularization 
  technology.
Why OSGi?
   It's a dynamic module system for Java.
    – Bundle( == jar) is called the Modularization unit. 
    – Meta data can be specified in manifest headers.
    – Separate classloader for a bundle.
    – A bundle can share or hide packages.
    – Allows multiple versions of the same class in a 
      single VM. This solves jar hell problem.
Why OSGi...
   OSGi services provides in­VM collaborative SOA model
    – Each bundle can provide services to other bundles
    – Services are simply Java objects that implement a given interface
    – There is a Service Registry where you can find a service implementation
    – Services should be only links between components
    – Best known way to decouple components from each other.
    – This allows components to be substituted.
    – Significantly minimize class loading problems
Why OSGi.. 
• It's Dynamic
  – The OSGi component model is a dynamic model
  – Bundles can be installed, started, stopped, updated, 
    and uninstalled without shutting down the whole 
    system.
What is WSO2 Carbon? 




          OSGi
What is WSO2 Carbon?
• A framework based on OSGi
   – Uses Equinox by default
• Still very closely based on Apache technology
   – Apache Axis2, Apache Synapse, Apache ODE
   – Apache Tomcat, Apache Axiom, and many other core 
     libraries
• A well defined component model for Enterprise 
  Middleware
Core Carbon Framework
Enterprise Service Bus
Web Services Application Server
The Full Component Repository
A distributed example
Unified management console




    Can be run independently and connect to any JVM instance
Use case: Data services & mediation
• Daniel is a Database Administrator
   – He has used WSO2 Data Services to expose his Data as 
     Secure Web Services across the Enterprise
   – Now he has been asked to implement an existing schema
   – By adding the Mediation component and using XSLT or 
     E4X he can effectively convert the existing service interface 
     to match the corporate schema
Use case: POJO service and logging
• Helen is a POJO Service developer
   – She has an existing POJO service
   – The analytics department would like her to send a copy of every 
     service request to them 
   – She could write a new Handler in Java, but she discovers it takes 
     5 minutes to deploy and test the ESB Clone Mediator
What is right with Carbon?
Agile Adoption        • Start with the components you need, and grow as needed


                      • Based on industry standards
Skills                • Common patterns can be applied across products

                      • Choose the components you need
                      • Total platform is <150Mb (1/4 the size of Oracle) 
SOA Deployment
                      • Designed for Distributed Deployment with a central registry



                      • Can install new function into an existing deployment
Continuity
                      • The same Admin UI works for all products


                      • The whole platform was designed to be consistent
Product Integration
                      • The products integrate using the Registry out­of­the­box
Powered by OSGi
   OSGi is the underlying core modularization technology
    – Shipping with Eclipse Equinox by default
    – Can be supported on Spring dm Server, Felix and 
      Knoplerfish if required
• Uses the core OSGi approach to support plugging in 
  new functions in a managed way
• Any OSGi bundle can be deployed (e.g. ActiveMQ)
• New components can be deployed into an existing 
  installation
• Used for both server runtime as well as for 
  componentized management console
• Customers can write and deploy their own OSGi 
  components
But more than just OSGi
• Analogies:
   – Eclipse uses OSGi but is much more – it defines how 
     you plug Tool components into a Tooling Framework
   – Microsoft Office uses DLLs, but is much more – it 
     defines how you can share a graph component across 
     multiple document types
• Carbon uses OSGI, but it also defines how you build a 
  consistent SOA platform 
   – New service types plug into the console
   – Security, throttling, stats, TryIt, all work on any service 
     component
• Not just using OSGi for componentizing a single product, 
  but rather entire middleware platform
Challenges
• Difficult to convert existing code into OSGi bundles.
   – Legacy jars use class loaders heavily, hence 
     most likely to fail in an OSGi environment. 
• Getting the “start level” of bundles right is hard.
• OSGi originally designed for embedded devices
   – Needs little more tuning to fit into the server 
     runtime.
• No support for the new servlet­api specs even in the 
  latest OSGi R4 spec
• No built in support for JSPs in the model
• Primitive tooling for debugging OSGi issues
Migrating to OSGi
• First create a big OSGi bundle including all your project code and 
  dependent jars.
• Use a BundleActivator to call the main class.
• Get your project working.
• gradually break down the big bundle into manageable bundles.
    – remove all the dependent jars and use their OSGified versions.
    – If possible, break down your project into reusable 
      components(bundles)

• You will get so many issues.
• Solve them and keep it working!!
• Use Ant/Maven bundle plugin to create bundles.
Use proper package imports
• Import all the packages your bundle needs
• Use version when importing packages
   – This avoids version conflicts.
   – Fixed versions vs. version ranges.

• User Import­Package instead of Require­Bundle
   – Import­Package can have many providers
   – Require­Bundle can only have a single provider.

• Avoid using Class.forName
   – a lots of ClassNotFoundExceptions.
   – Use OSGi services to handle these dynamic collaborations between 
     bundles.
   – As a workaround for Class.forName, use DynamicImport­Package. But 
     this is not the recommended approach.
Few more best practices..
• Avoid start ordering dependencies.
   – Starting order of bundle may differ on different 
     framework.
   – Use ServiceTracker utility or Declarative Services 
• Use Whiteboard pattern.
Summary


    Adapt your middleware to your 
       enterprise architecture, 
not your architecture to the middleware
Thank you!



Questions??

Weitere ähnliche Inhalte

Was ist angesagt?

Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Oozie sweet
Oozie sweetOozie sweet
Oozie sweetmislam77
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Exove
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
Oozie towards zero downtime
Oozie towards zero downtimeOozie towards zero downtime
Oozie towards zero downtimeDataWorks Summit
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersCarlos Abalde
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksMySQLConference
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMorgan Tocker
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Andy Kucharski
 

Was ist angesagt? (9)

Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Oozie sweet
Oozie sweetOozie sweet
Oozie sweet
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Oozie towards zero downtime
Oozie towards zero downtimeOozie towards zero downtime
Oozie towards zero downtime
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developers
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big Data
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...
 

Andere mochten auch

OSGi Best and Worst Practices
OSGi Best and Worst PracticesOSGi Best and Worst Practices
OSGi Best and Worst PracticesChris Aniszczyk
 
Autoscaling Ws On Ec2 Apache Con Presentation
Autoscaling Ws On Ec2 Apache Con PresentationAutoscaling Ws On Ec2 Apache Con Presentation
Autoscaling Ws On Ec2 Apache Con Presentationguest60ed0b
 
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
 
Aceu2009 Open Source For Interoperability
Aceu2009 Open Source For InteroperabilityAceu2009 Open Source For Interoperability
Aceu2009 Open Source For Interoperabilityguest60ed0b
 
Aceu2009 Synapse Scalability Availability
Aceu2009 Synapse Scalability AvailabilityAceu2009 Synapse Scalability Availability
Aceu2009 Synapse Scalability Availabilityguest60ed0b
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Wardmfrancis
 
Aceu2009 Apache Synapse Events
Aceu2009 Apache Synapse EventsAceu2009 Apache Synapse Events
Aceu2009 Apache Synapse Eventsguest60ed0b
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiangmfrancis
 
Autoscaling Best Practices
Autoscaling Best PracticesAutoscaling Best Practices
Autoscaling Best PracticesMarc Cluet
 
OSGi Training for Carbon Developers
OSGi Training for Carbon DevelopersOSGi Training for Carbon Developers
OSGi Training for Carbon DevelopersAruna Karunarathna
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanAmazon Web Services
 
Maintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIMaintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIDaniel Jacobson
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJAX London
 

Andere mochten auch (13)

OSGi Best and Worst Practices
OSGi Best and Worst PracticesOSGi Best and Worst Practices
OSGi Best and Worst Practices
 
Autoscaling Ws On Ec2 Apache Con Presentation
Autoscaling Ws On Ec2 Apache Con PresentationAutoscaling Ws On Ec2 Apache Con Presentation
Autoscaling Ws On Ec2 Apache Con Presentation
 
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, ...
 
Aceu2009 Open Source For Interoperability
Aceu2009 Open Source For InteroperabilityAceu2009 Open Source For Interoperability
Aceu2009 Open Source For Interoperability
 
Aceu2009 Synapse Scalability Availability
Aceu2009 Synapse Scalability AvailabilityAceu2009 Synapse Scalability Availability
Aceu2009 Synapse Scalability Availability
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Ward
 
Aceu2009 Apache Synapse Events
Aceu2009 Apache Synapse EventsAceu2009 Apache Synapse Events
Aceu2009 Apache Synapse Events
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiang
 
Autoscaling Best Practices
Autoscaling Best PracticesAutoscaling Best Practices
Autoscaling Best Practices
 
OSGi Training for Carbon Developers
OSGi Training for Carbon DevelopersOSGi Training for Carbon Developers
OSGi Training for Carbon Developers
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Maintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIMaintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix API
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily Jiang
 

Ähnlich wie Aceu2009 Osgi Productline

RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
Web 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New InternetWeb 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New Internettvawler
 
White Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeWhite Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeHamida Rebai Trabelsi
 
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackBackroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackShapeBlue
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Vadym Kazulkin
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud RoadGert Drapers
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Vadym Kazulkin
 
Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsRasheed Waraich
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudVlad Kuusk
 
Leveraging Azure DevOps across the Enterprise
Leveraging Azure DevOps across the EnterpriseLeveraging Azure DevOps across the Enterprise
Leveraging Azure DevOps across the EnterpriseAndrew Kelleher
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsSufyaan Kazi
 
Cloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudCloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudEberhard Wolff
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison AnalysisClever Moe
 
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, SmileOCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, SmileOCCIware
 
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017Marc Dutoo
 
OOW-5185-Hybrid Cloud
OOW-5185-Hybrid CloudOOW-5185-Hybrid Cloud
OOW-5185-Hybrid CloudBen Duan
 

Ähnlich wie Aceu2009 Osgi Productline (20)

RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
Web 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New InternetWeb 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New Internet
 
Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3
 
White Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeWhite Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and Prime
 
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackBackroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
4 spring boot
4 spring boot4 spring boot
4 spring boot
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
 
Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web Apps
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid Cloud
 
Mean stack
Mean stackMean stack
Mean stack
 
Leveraging Azure DevOps across the Enterprise
Leveraging Azure DevOps across the EnterpriseLeveraging Azure DevOps across the Enterprise
Leveraging Azure DevOps across the Enterprise
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
 
Cloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudCloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and Cloud
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
 
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, SmileOCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
 
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
 
OOW-5185-Hybrid Cloud
OOW-5185-Hybrid CloudOOW-5185-Hybrid Cloud
OOW-5185-Hybrid Cloud
 

Kürzlich hochgeladen

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Aceu2009 Osgi Productline

  • 1. OSGi as a Framework for  Building a Product Line: Experience and Best Practices Afkham Azeez [azeez@apache.org] Ruwan Linton [ruwan@apache.org]
  • 2. Agenda • SOA Middleware Products • Componentized SOA Platform • Why OSGi? • WSO2 Carbon • Challenges faced • Best practices
  • 3. SOA Middleware Products • Traditional SOA platforms are: – Overly complex – Heavyweight – Not internally consistent  – Hard to learn – Acquired, not designed – The components  don't fit well together • The result is: – Centralizing SOA on a single hub based ESB – Relying on the “SOA team” to solve problems – Replacing centralized monolithic applications with • Centralized monolithic ESB and SOA platform
  • 4. What is wrong with existing SOA  Platforms? • Heavyweight, complex and bloated Agile Adoption • Downloading an evaluation can take days • SOA adoption is restricted because tools are so  Skills difficult to use • Large SOA platform “components” are actually SOA Deployment distinct products • Bigger installations encourage centralization • Adding new aspects of SOA (e.g. process choreography)  Continuity means installing and learning a completely new product • Customers waste time integrating vendor's products Product Integration • Time that could be spent integrating real applications
  • 5. Solution? • Componentized SOA Platform – WSO2 Carbon Architecture based on OSGi
  • 6. Why OSGi? • It's a  framework which specifies a modular  architecture for dynamic component based systems. • It can be used as the underlying core modularization  technology.
  • 7. Why OSGi?  It's a dynamic module system for Java. – Bundle( == jar) is called the Modularization unit.  – Meta data can be specified in manifest headers. – Separate classloader for a bundle. – A bundle can share or hide packages. – Allows multiple versions of the same class in a  single VM. This solves jar hell problem.
  • 8. Why OSGi...  OSGi services provides in­VM collaborative SOA model – Each bundle can provide services to other bundles – Services are simply Java objects that implement a given interface – There is a Service Registry where you can find a service implementation – Services should be only links between components – Best known way to decouple components from each other. – This allows components to be substituted. – Significantly minimize class loading problems
  • 9. Why OSGi..  • It's Dynamic – The OSGi component model is a dynamic model – Bundles can be installed, started, stopped, updated,  and uninstalled without shutting down the whole  system.
  • 11. What is WSO2 Carbon? • A framework based on OSGi – Uses Equinox by default • Still very closely based on Apache technology – Apache Axis2, Apache Synapse, Apache ODE – Apache Tomcat, Apache Axiom, and many other core  libraries • A well defined component model for Enterprise  Middleware
  • 17. Unified management console Can be run independently and connect to any JVM instance
  • 18. Use case: Data services & mediation • Daniel is a Database Administrator – He has used WSO2 Data Services to expose his Data as  Secure Web Services across the Enterprise – Now he has been asked to implement an existing schema – By adding the Mediation component and using XSLT or  E4X he can effectively convert the existing service interface  to match the corporate schema
  • 19. Use case: POJO service and logging • Helen is a POJO Service developer – She has an existing POJO service – The analytics department would like her to send a copy of every  service request to them  – She could write a new Handler in Java, but she discovers it takes  5 minutes to deploy and test the ESB Clone Mediator
  • 20. What is right with Carbon? Agile Adoption • Start with the components you need, and grow as needed • Based on industry standards Skills • Common patterns can be applied across products • Choose the components you need • Total platform is <150Mb (1/4 the size of Oracle)  SOA Deployment • Designed for Distributed Deployment with a central registry • Can install new function into an existing deployment Continuity • The same Admin UI works for all products • The whole platform was designed to be consistent Product Integration • The products integrate using the Registry out­of­the­box
  • 21. Powered by OSGi  OSGi is the underlying core modularization technology – Shipping with Eclipse Equinox by default – Can be supported on Spring dm Server, Felix and  Knoplerfish if required • Uses the core OSGi approach to support plugging in  new functions in a managed way • Any OSGi bundle can be deployed (e.g. ActiveMQ) • New components can be deployed into an existing  installation • Used for both server runtime as well as for  componentized management console • Customers can write and deploy their own OSGi  components
  • 22. But more than just OSGi • Analogies: – Eclipse uses OSGi but is much more – it defines how  you plug Tool components into a Tooling Framework – Microsoft Office uses DLLs, but is much more – it  defines how you can share a graph component across  multiple document types • Carbon uses OSGI, but it also defines how you build a  consistent SOA platform  – New service types plug into the console – Security, throttling, stats, TryIt, all work on any service  component • Not just using OSGi for componentizing a single product,  but rather entire middleware platform
  • 23. Challenges • Difficult to convert existing code into OSGi bundles. – Legacy jars use class loaders heavily, hence  most likely to fail in an OSGi environment.  • Getting the “start level” of bundles right is hard. • OSGi originally designed for embedded devices – Needs little more tuning to fit into the server  runtime. • No support for the new servlet­api specs even in the  latest OSGi R4 spec • No built in support for JSPs in the model • Primitive tooling for debugging OSGi issues
  • 24. Migrating to OSGi • First create a big OSGi bundle including all your project code and  dependent jars. • Use a BundleActivator to call the main class. • Get your project working. • gradually break down the big bundle into manageable bundles. – remove all the dependent jars and use their OSGified versions. – If possible, break down your project into reusable  components(bundles) • You will get so many issues. • Solve them and keep it working!! • Use Ant/Maven bundle plugin to create bundles.
  • 25. Use proper package imports • Import all the packages your bundle needs • Use version when importing packages – This avoids version conflicts. – Fixed versions vs. version ranges. • User Import­Package instead of Require­Bundle – Import­Package can have many providers – Require­Bundle can only have a single provider. • Avoid using Class.forName – a lots of ClassNotFoundExceptions. – Use OSGi services to handle these dynamic collaborations between  bundles. – As a workaround for Class.forName, use DynamicImport­Package. But  this is not the recommended approach.
  • 26. Few more best practices.. • Avoid start ordering dependencies. – Starting order of bundle may differ on different  framework. – Use ServiceTracker utility or Declarative Services  • Use Whiteboard pattern.
  • 27. Summary Adapt your middleware to your  enterprise architecture,  not your architecture to the middleware