Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to EclipseRT (JAX 2010)

3,384 views

Published on

A presentation about EclipseRT given at JAX 2010 in Mainz, Germany.

Published in: Technology
  • Be the first to comment

Introduction to EclipseRT (JAX 2010)

  1. 1. An Introduction to EclipseRT and OSGi Chris Aniszczyk Principal Software Engineer zx@redhat.com http://aniszczyk.org June 23, 2008 Confidential | Date | Other Information, if necessary © 2002 IBM Corporation
  2. 2. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  3. 3. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  4. 4. OSGi... • The dynamic module system for java • What’s a module? “Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components.”
  5. 5. JARs != Modules • JARs are deployment artifacts • JARs have dependencies • They are not modules... missing crucial information  identifier (file name isn’t good enough)  version  vendor  exports  dependencies ;(
  6. 6. How does OSGI help? • OSGi Bundle == Module • Just a JAR with module related metadata  identifier  version  vendor  exports  dependencies (imports) ;)
  7. 7. Community of Bundles Bundle A OSGi Application Bundle D Bundle X Bundle Z Bundle C Bundle G Bundle B Bundle E Bundle Y Bundle F Bundle H
  8. 8. Bundles, Metadata and the MANIFEST.MF Manifest-Version: 1.0 Bundle-ClassPath: junit.jar Bundle-Vendor: Eclipse.org Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.3 Bundle-Name: JUnit3 Bundle-SymbolicName: org.junit Export-Package: junit.awtui;version="3.8.2",junit.extensions;version=" 3.8.2",junit.framework;version="3.8.2",junit.runner;version="3.8.2",j unit.swingui;version="3.8.2",junit.swingui.icons;version="3.8.2",juni t.textui;version="3.8.2" Bundle-Version: 3.8.2.v20090203-1005 Bundle-ManifestVersion: 2
  9. 9. OSGi in Details • OSGi Alliance o Worldwide consortium of technology innovators that advances OSGi technology • OSGi Technology o Set of specifications that define a module system for Java o Enables modular programming for Java • Originally designed for embedded systems... o Home automation... set-top boxes... vehicles... • Now in widespread use in desktop and servers...
  10. 10. OSGi Alliance • An open standards organization founded in March 1999  Founded by Ericsson, IBM, Motorola and Sun Microsystems • Five expert groups that produce specifications  Core Platform  Enterprise  Mobile  Vehicle  Residential • Now ~100 members  IBM, Oracle, Tibco, Siemens, SAP, Motorola, Red Hat...
  11. 11. OSGi Layers • OSGi has a layered model...
  12. 12. OSGi Technology • Bundles  OSGi modules made by the developers • Services  Connects bundles in a dynamic way by offering a publish-find-bind model • Life Cycle  API to install, start, stop, update and uninstall bundles • Modules  Defines how a bundle can import and export code • Security  Handles the security aspects, think permissions • Execution Environment  Defines what methods and classes are available in a specific platform
  13. 13. OSGi API: BundleContext • Represents the system • Unique context supplied to each bundle • Find, register services • Install bundles • Register listeners • Get properties
  14. 14. OSGi API: BundleActivator • No main() • Each bundle is self-contained • Some need initialization  HTTP bundle might start server on port 80 • Implement start() and stop() • Can be called at any time on any thread
  15. 15. OSGi API: Services • Allow for bundle collaboration • Register services that implement an API (type) • Discover services by looking up the API • One central, flat registry • Filter services using properties • Services dynamically come and go so be ready
  16. 16. Bundle Lifecycle • OSGi is dynamic • Bundles can come and go!
  17. 17. OSGi Specifications • Two major specifications • Core Specifications  Covers the core layers of OSGi • Service Compendium  Contains a variety of useful services
  18. 18. OSGi Specification Releases • OSGi Release 1 (R1): May 2000 • OSGi Release 2 (R2): October 2001 • OSGi Release 3 (R3): March 2003 • OSGi Release 4 (R4): October 2005  Core Specification (R4 Core): October 2005  Mobile Specification (R4 Mobile / JSR-232): September 2006 • OSGi Release 4.1 (R4.1): May 2007 (AKA JSR-291) • OSGi Release 4.1 (R4.2): (Summer 2009) • OSGi EEG spec coming in 4Q09
  19. 19. OSGi Frameworks • There’s a lot of OSGi framework implementations...
  20. 20. OSGi Framework Implementations • Equinox (open source)  Reference implementation for the core framework and various services  Base runtime for EclipseRT • Felix (open source)  Implementation developed at Apache  Ships with GlassFish • Knopflerfish (open source)  BSD license • Concierge (open source)  Highly optimized and tiny R3 implementation  Runs in tiny devices • Many other commercial and private implementations
  21. 21. How does this relate to Eclipse? • Eclipse had its own non-standard plug-in model • OSGi and old Eclipse plug-in model were similar
  22. 22. What happened? • The world didn’t need two modular systems • Eclipse went to OSGi in 3.0 with Equinox* o Eclipse needed something robust and standard o Put OSGi on the map! *http://portal.acm.org/citation.cfm?id=1086616
  23. 23. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  24. 24. Eclipse? Enterprise? Runtimes? What?  Eclipse is a trusted source of development tools  However, Eclipse is more than just tools!  There are 100+ Eclipse.org projects  Eclipse provides a wide selection of...  Runtime Containers  Middleware  Enterprise Frameworks
  25. 25. What is EclipseRT?  EclipseRT is the name given to the runtime projects  http://eclipse.org/eclipsert/whitepaper/eclipseRT.php
  26. 26. EclipseRT-related Projects at Eclipse.org  Equinox  eRCP  Riena  Swordfish  RAP  Jetty  EMF++  BIRT  GEF  EclipseLink  SMILA  ECF  e4  Gemini  Higgins  Virgo http://www.eclipse.org/projects
  27. 27. Common Denominator?  It’s all OSGi based!  http://www.osgi.org  Infrastructure-related projects  Modular philosophy  Realizing Eclipse value, in runtimes
  28. 28. EclipseRT Adopters  Jazz  Lotus  SpringDM (Gemini)  NASA  SAP  Infor  GlassFish  Oracle  Websphere  JP Morgan  US Army  ... http://eclipse.org/eclipsert/case_studies/case_studies.php
  29. 29. Who’s Buying the Story? “OSGi and The Rise of The Stackless Stack: Just in Time” “Towards a “JBoss is working mainstream on OSGi too” Open Source OSGi application “Spring Dynamic Modules for OSGi: server?” simplified development of OSGi applications” “Keeping an eye on the OSGi” Alex Fletcher, Entiva Group “Top Five Java Technologies to Learn in 2008”
  30. 30. The Software Landscape
  31. 31. How did we get here?  Software complexity increases over time...  Software is becoming more specialized  Lack of a common component model
  32. 32. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  33. 33. Toast Overview • Fleet management system • Client = Vehicle head unit • Server = Backend business logic/data Vehicle discovery/tracking Dynamic provisioning Emergency reporting Remote control Google Earth/Maps Open source Extensible client UI Lots of opportunities • Full version open source at Eclipse http://wiki.eclipse.org/Toast
  34. 34. Toast Modules
  35. 35. Toast Modules http://wiki.eclipse.org/Toast
  36. 36. Technology in Toast  Equinox  Derby  p2  Amazon EC2  ECF  SLP  BIRT  RCP  Twitter  RAP  JavaScript  Jetty  Google Earth  EclipseLink http://wiki.eclipse.org/Toast
  37. 37. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  38. 38. What makes Toast possible?  OSGi and Equinox  Modularity  API  CODA
  39. 39. Monolithic Middleware and Stackless Stacks  Traditional middleware is monolithic; a comfortable place to run applications but comes with a lot of baggage  Ideally, you only want to run what you need  EclipseRT allows you to specialize your own enterprise stack based on your needs via Equinox and OSGi http://www.redmonk.com/jgovernor/2008/02/05/osgi-and-the-rise-of-the-stackless-stack-just-in-time/
  40. 40. OSGi and Equinox  Equinox is an OSGi runtime framework implementation  Equinox is the foundation of EclipseRT  Equinox provides a common component model and runtime via OSGi  Allows you to specialize the enterprise stack for your application’s needs  We all this component oriented approach CODA...
  41. 41. Component Oriented Development and Assembly Multiple Customize Individual Component Components Solutions Producers http://www.eclipse.org/equinox-portal/whitepaper/20080310_equinox.php
  42. 42. Platforms  Platforms are all about components  EclipseRT and CODA enables you to build platforms  Example: NASA and the Ensemble platform
  43. 43. Agenda  OSGi and an Eclipse History Lesson  EclipseRT  Toast  Stackless Stacks, Equinox and CODA  Summary  Q&A
  44. 44. Summary  Eclipse is more than just a tools framework!  Eclipse is evolving into runtimes via EclipseRT  EclipseRT allows you to build your own stacks  The tight integration between Eclipse tools and EclipseRT provides a great developer experience  EclipseRT and CODA is the future of runtime technology at Eclipse
  45. 45. Question and Answers?

×