3. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
4. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
5. 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.”
6. 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
;(
7. How does OSGI help?
• OSGi Bundle == Module
• Just a JAR with module related metadata
identifier
version
vendor
exports
dependencies (imports)
;)
8. 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
10. 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...
11. 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...
13. 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
14. OSGi API: BundleContext
• Represents the system
• Unique context supplied to each bundle
• Find, register services
• Install bundles
• Register listeners
• Get properties
15. 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
16. 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
18. OSGi Specifications
• Two major specifications
• Core Specifications
Covers the core layers of OSGi
• Service Compendium
Contains a variety of useful services
19. 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
21. 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
22. How does this relate to Eclipse?
• Eclipse had its own non-standard plug-in model
• OSGi and old Eclipse plug-in model were similar
23. 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
24. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
25. 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
26. What is EclipseRT?
EclipseRT is the name given to the runtime projects
http://eclipse.org/eclipsert/whitepaper/eclipseRT.php
28. Common Denominator?
It’s all OSGi based!
http://www.osgi.org
Infrastructure-related projects
Modular philosophy
Realizing Eclipse value, in runtimes
29. 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
30. 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”
32. How did we get here?
Software complexity increases over time...
Software is becoming more specialized
Lack of a common component model
33. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
34. 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
38. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
39. What makes Toast possible?
OSGi and Equinox
Modularity
API
CODA
40. 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/
41. 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...
42. Component Oriented Development and Assembly
Multiple Customize Individual
Component Components Solutions
Producers
http://www.eclipse.org/equinox-portal/whitepaper/20080310_equinox.php
43. Platforms
Platforms are all about components
EclipseRT and CODA enables you to build platforms
Example: NASA and the Ensemble platform
44. Agenda
OSGi and an Eclipse History Lesson
EclipseRT
Toast
Stackless Stacks, Equinox and CODA
Summary
Q&A
45. 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
* Eclipse has been around for about 10 years now...
* We are a trusted source of development tools and have significant mindshare in the Java space
* We started out as a tools framework but about 4-5 years ago we evolved into a platform for building rich client applications via an effort called RCP. Also around the time we launched the RCP effort we changed our plumbing to use something called OSGi which gave us a common and standard component model
* However, since that we have been growing in terms of projects and what people do at Eclipse... we have 200+ projects at Eclipse now and a variety of them have runtime aspects to them... we now have runtime containers via Jetty and Equinox
* We have enterprise frameworks
EclipseRT is the collection of OSGi-based runtimes and frameworks built by the Eclipse open source projects. It enables the implementation of component oriented development architectures whether you building rich desktop, web, SOA, enterprise, platforms or embedded applications.
* UI layers with RCP, RAP, or Riena
* Runtime containers such as Jetty and Equinox
* Persistence services with EclipseLink
* Data reporting support from BIRT
* Data modeling with Eclipse Modeling Framework (EMF)
* Remote communication and distributed OSGi with ECF
At Eclipse, we are big proponents of OSGi based technology when it comes to middleware.
There was a conscious decision made 5 years ago to move to OSGi over our old plug-in model that we used when developing Eclipse plug-ins. It makes sense to go with a standard.
Eclipse itself is an example of a platform for creating tools and runtime frameworks. As such, it's little wonder that many of the early adoptors of EclipseRT have built platforms that allow them to rapidly deliver applications to their customers and end-users.
For example, NASA, the US space agency, uses EclipseRT for its Ensemble platform. Ensemble is used by the different science teams to write the applications needed to control and run the experiments on their Mars rover operations. Instead of each team writing their software from the ground up, they build on-top of the EclipseRT-based Ensemble platform. This results in an an acceleration of their software development efforts, a consistent end-user view of these applications and an interchange point between applications.
The component-oriented nature of EclipseRT and the OSGi standard creates a technology base that can be designed to be a platform. Architects can use the design and policy enforcement aspects available in EclipseRT to architect proper extension points and application development in their organization. Because the platform is built on-top of Eclipse technologies, developers can use their familiar tools and frameworks when developing for the platform instead of being forced to use custom platform tools. The deployment services available in p2 gives IT the ability to deploy and then maintain applications built on the platform.
Let’s be honest with ourselves... software is complex... it’s not really reliable....
Like Mark Little said in his presentation... we aren’t doing a good job of writing reliable code... the power of hardware is improving...
The traditional JEE stack tried to simplify things by providing a lot of “services” out of the box but this resulted in a monolithic stack and not much portability when moving across different middleware stacks... web profile is a step in the right direction but we prefer an approach that things come a la carte
How did we get to this point?Well, I tend to related complex software projects to the scale of skyscrapers, developers will specialize further in order to cope with the complexity of the systems they build.
Tthousands of developers working on a system and not really understanding what each other are doing… doesn’t sound like a safe thing to do. How are we going to make it possible for those people to collaborate effectively without stepping on each other?
Using the same principles employed in skyscrapers… foundations, frameworks and architectures.
I think EclipseRT is providing the solid foundations, frameworks and architectures that people need to build applications.
Equinox and OSGi
Of course Equinox is used as the base runtime across the Toast client, server and embedded elements. The example also demonstrates a wide range of OSGi services such as HttpService, ConfigAdmin, Log, ...
Server-side
Toast demonstrates three scenarios for the use of Equinox and OSGi on the server
p2 provisioning
Various elements of p2 are included in Toast; building, deploying, managing profiles, ...
ECF
Toast is a distributed application and uses ECF to do vehicle discovery, remote services and various other nifty things (Twitter?)
RAP
The Toast control center runs on servers and presents a rich user interface using RAP including Google Map and Earth integration.
EclipseLink
The control center needs to store and manage data about vehicles, drivers, packages, ..
Modeling
The basic Toast server side data is, of course, modeled using EMF.
BIRT
Toast allows for reporting on the activities of the vehicles, package delivery, ... through RAP integrated reportlets.
Riena
Riena is used to give users a rich client application experience using remote messaging and focused workflows.
OSGi and Equinox allow for a common component model so applications can be stitched together from exisiting components
Modularity
It refers to an emerging trend toward enterprise infrastructure (and web-app infrastructure, particularly) that's lighter, more modular, and more services-oriented.
If all you need is a servlet engine and web server, why bring along EJB runtimes, a JMX framework,
If you're a developer, you shouldn't need to load 500 Java classes just to print "Hello World" to the console. Likewise, if you're running a Web CMS, you shouldn't need to wire together millions of dollars' worth of systems to light up a web browser.
EclipseRT is all about providing an ala-carte model when it comes to building your own runtime
Rather than carving down large, complex, feature-rich stacks to suit your needs, Equinox provides a lightweight, component-based method of building stacks tailored to your needs. More than just a framework and runtime, the Equinox community provides many core components such as data access, SOA tooling, and other server-side functions, along with rich desktop and Ajax UI facilities. In short, Equinox allows you to stop coercing monolithic, of-the-shelf stacks to fit your world and, start designing and assembling stacks to fit your project’s needs. The result is a flexible and reusable component and programming model that spans your application’s tiers and layers. This simplification gives you the power to more rapidly adapt your existing software assets, integrate them with other systems, and create new function to meet the demands of new markets and opportunities.
Equinox provides one methodology that normalizes the decomposition of code into components and the collaboration between these components within, and across, tiers. The result is a system that has the feel of a tier-less architecture.
Eclipse itself is an example of a platform for creating tools and runtime frameworks. As such, it's little wonder that many of the early adoptors of EclipseRT have built platforms that allow them to rapidly deliver applications to their customers and end-users.
For example, NASA, the US space agency, uses EclipseRT for its Ensemble platform. Ensemble is used by the different science teams to write the applications needed to control and run the experiments on their Mars rover operations. Instead of each team writing their software from the ground up, they build on-top of the EclipseRT-based Ensemble platform. This results in an an acceleration of their software development efforts, a consistent end-user view of these applications and an interchange point between applications.
Eclipse, which used to be a developer tools framework is now evolving into a fully fledged component/service oriented runtime.