EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves...

30
1 EclipseRT Virgo & OSGi By Christopher Frost

Transcript of EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves...

Page 1: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

1

EclipseRT Virgo& OSGi

By Christopher Frost

Page 2: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

2

Agenda

• What is OSGi & OSGi basics

• Gemini & Virgo at Eclipse

• A tour of Virgo

• Current Status

• How can I get started?

Page 3: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

3

Bundles Bundles Bundles• OSGi is a Module System

• Many adopters including a lot of Eclipse projects

• Defned by the OSGi Alliance

• A Bundle, a Jar fle, a single module

• The Bundle Manifest defnes the imports/exports

Page 4: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

4

Services• A Bundle can export and consume services

• This happens dynamically at runtime

• Managed by a Service Registry

• A service is a Java Object with some properties

• The Whiteboard pattern

Page 5: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

5

What is Virgo?

• “Dynamic Enterprise Application Platform”

• Based on SpringSource dm Server 2.0

• Objectives:

• Better OSGi platform

• Servlets & Migration of Java EE apps

• Modular and extensible

Page 6: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

6

What is Gemini?

• “Enterprise Modules Project”

• A collection of OSGi spec implementations

• Aims to provide a single authoritative collection

• Main contributors are SpringSource and Oracle

Page 7: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

7

Problems Virgo Solves

• Groups bundles into manageable units

• Enables the use of existing open source libraries

• TCCL, LTW, implicit package use

• Provisions from repositories

• Extensive diagnostics

• resolution failure, deadlock, delayed services

Page 8: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

8

Virgo and EclipseRT

Page 9: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

9

Virgo Externals

Page 10: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

10

Page 11: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

11

Page 12: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

12

Artifacts

• Identifed by type, name, version

• Types:

• bundle - OSGi bundle

• confguration - properties fle

• plan - list of artifacts

• par – container of artifacts

Page 13: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

13

Page 14: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

14

Plans• XML

• List artifacts by type, name, version range

• Scoping

• Atomicity

• PARs

• Contain artifacts

• Scoped, atomic

14

Page 15: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

15

Scoping

Page 16: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

16

Page 17: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

17

Repositories

• Artifacts indexed by type, name, version

• Supports queries e.g. by version range

• Repository types:

• External

• Watched

• Remote

• Repositories may be chained

Page 18: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

18

Repository Chainingremote

Page 19: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

19

Page 20: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

20

Pipelines

Page 21: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

21

Page 22: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

22

Regions

Page 23: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

23

How can I get started?

Page 24: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

24

Getting Started

• Tech Demo later today (5)

• Pre-req: Java 6

• Download & unzip

• bin/startup.sh or bin\startup.bat

• drop WAR fles or bundles into pickup dir

Page 25: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

25

Then What?

• Read documentation

• User Guide

• Programmer Guide

• Getting Started Guide

• Join the community

• http://wiki.eclipse.org/Virgo/Community

Page 26: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

26

Roles

• Casual user

• Expert user

• Contributor

• Committer

26

Page 27: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

27

Committer Skills

• Know or willing to learn:

• Clean architecture & code

• Unit and Integration testing

• Concurrency

• (Deep) OSGi understanding

• git, ant, ivy, etc.

Page 28: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

28

Work Areas

• Developer docs & wiki

• Jetty adapter

• Regions and nested frameworks

• p2 integration

• More server types

Page 29: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

29

Current Status

• Adding the last code into Eclipse GIT

• IP scrutiny progressing well

• Most repos can be checked out and built

• Virgo Nightly Builds available

• Baseline release is coming soon

29

Page 30: EclipseRT Virgo & OSGiwiki.eclipse.org/images/5/58/EclipseRT_Virgo_OSGi.pdf7 Problems Virgo Solves •Groups bundles into manageable units •Enables the use of existing open source

30

Further Information

• http://www.eclipse.org/virgo

• http://wiki.eclipse.org/Virgo/Community

• #VirgoRT

• Download dm Server 2.0.2 and try it out

• http://www.springsource.org/dmserver