modularity with osgi

50
OSGi & Modularity 2011-06-23 IBM Montpellier by Peter Kriens 1 dinsdag 28 juni 2011

Upload: peter-kriens

Post on 20-Jan-2015

764 views

Category:

Technology


0 download

DESCRIPTION

High level presentation about OSGi and modularity.

TRANSCRIPT

Page 1: Modularity with OSGi

OSGi &Modularity

2011-06-23 IBM Montpellier

by Peter Kriens

1dinsdag 28 juni 2011

Page 2: Modularity with OSGi

2dinsdag 28 juni 2011

Page 3: Modularity with OSGi

2dinsdag 28 juni 2011

Page 4: Modularity with OSGi

2dinsdag 28 juni 2011

Page 5: Modularity with OSGi

Prod

uctiv

ity

Application Complexity

3dinsdag 28 juni 2011

Page 6: Modularity with OSGi

Prod

uctiv

ity

Application Complexity

Assembly

3dinsdag 28 juni 2011

Page 7: Modularity with OSGi

Prod

uctiv

ity

Application Complexity

Assembly

Structured Programming

3dinsdag 28 juni 2011

Page 8: Modularity with OSGi

Prod

uctiv

ity

Application Complexity

Assembly

Structured Programming

Object Oriented Programming

3dinsdag 28 juni 2011

Page 9: Modularity with OSGi

Prod

uctiv

ity

Application Complexity

Assembly

Structured Programming

Object Oriented Programming

Service Oriented Programming?

3dinsdag 28 juni 2011

Page 10: Modularity with OSGi

4dinsdag 28 juni 2011

Page 11: Modularity with OSGi

Application

4dinsdag 28 juni 2011

Page 12: Modularity with OSGi

Application

Extensions

Application

Foundation

Java VM

Basic

Convenience

Something

Core

4dinsdag 28 juni 2011

Page 13: Modularity with OSGi

Application

Extensions

Application

Foundation

Java VM

Basic

Convenience

Something

CoreJava VM

log4j barcode4j axis batik commons

derbyfopezmorphfreemarkerhttpunit

jakarta jcl json jdbm jdom

jenks jpos18 jython looks lucene

mail mx4j naming jetty poi

resolver rome serializer servlets tomcat

velocity

ws-commons

xalan

wsdl4j

xerces

xmlgraphics

xmlrpc

xmlapis

..

geronimo

bsh

bsf

guiapp hhfacility manufact. marketing minerva

accounting assetmaint

base

bi

catalinacommon

oagis order

ebaycontent

datafile

ecommerce

entity

googlebase

Application layer

widget

minilang party pos. product workeffort workflow …

sunjce_prov.pluginjssejcert dnsns ..

Libs

4dinsdag 28 juni 2011

Page 14: Modularity with OSGi

Application

Extensions

Application

Foundation

Java VM

Basic

Convenience

Something

CoreJava VM

log4j barcode4j axis batik commons

derbyfopezmorphfreemarkerhttpunit

jakarta jcl json jdbm jdom

jenks jpos18 jython looks lucene

mail mx4j naming jetty poi

resolver rome serializer servlets tomcat

velocity

ws-commons

xalan

wsdl4j

xerces

xmlgraphics

xmlrpc

xmlapis

..

geronimo

bsh

bsf

guiapp hhfacility manufact. marketing minerva

accounting assetmaint

base

bi

catalinacommon

oagis order

ebaycontent

datafile

ecommerce

entity

googlebase

Application layer

widget

minilang party pos. product workeffort workflow …

sunjce_prov.pluginjssejcert dnsns ..

Libs

4dinsdag 28 juni 2011

Page 15: Modularity with OSGi

Java VM

log4j

barcode4j

axis

batik

commons

derby

fop

ezmorph

freemarker

httpunit

jakarta

jcl

json

jdbm

jdom

jenks

jpos18

jython

looks

lucene

mail

mx4j

naming

jetty

poi

resolver

rome

serializer

servlets

tomcat

velocity

ws-commons

xalan

wsdl4j

xerces

xmlgraphics

xmlrpc

xmlapis

..

geronimo

bsh

bsf

guiapp

hhfacility

manufact.

marketing

minerva

accounting

assetmaint

base

bi

catalina

common

oagis

order

ebay

content

datafile

ecommerce

entity

googlebase

ofbiz

widget

minilang

party

pos.

product

workeffort

workflow

sunjce_prov.

plugin

jsse

jce

rt

dnsns

..

BeginHere

5dinsdag 28 juni 2011

Page 16: Modularity with OSGi

Java VM

log4j

barcode4j

axis

batik

commons

derby

fop

ezmorph

freemarker

httpunit

jakarta

jcl

json

jdbm

jdom

jenks

jpos18

jython

looks

lucene

mail

mx4j

naming

jetty

poi

resolver

rome

serializer

servlets

tomcat

velocity

ws-commons

xalan

wsdl4j

xerces

xmlgraphics

xmlrpc

xmlapis

..

geronimo

bsh

bsf

guiapp

hhfacility

manufact.

marketing

minerva

accounting

assetmaint

base

bi

catalina

common

oagis

order

ebay

content

datafile

ecommerce

entity

googlebase

ofbiz

widget

minilang

party

pos.

product

workeffort

workflow

sunjce_prov.

plugin

jsse

jce

rt

dnsns

..

ClassNot

FoundException

BeginHere

5dinsdag 28 juni 2011

Page 17: Modularity with OSGi

6dinsdag 28 juni 2011

Page 18: Modularity with OSGi

7dinsdag 28 juni 2011

Page 19: Modularity with OSGi

8dinsdag 28 juni 2011

Page 20: Modularity with OSGi

8dinsdag 28 juni 2011

Page 21: Modularity with OSGi

9dinsdag 28 juni 2011

Page 22: Modularity with OSGi

low coupling,

9dinsdag 28 juni 2011

Page 23: Modularity with OSGi

low coupling,high cohesion &

9dinsdag 28 juni 2011

Page 24: Modularity with OSGi

low coupling,

encapsulationhigh cohesion &

9dinsdag 28 juni 2011

Page 25: Modularity with OSGi

10dinsdag 28 juni 2011

Page 26: Modularity with OSGi

OS + Hardware

Execution Environment

Module

Life Cycle

Service

SECURITY

Applications(bundles)

11dinsdag 28 juni 2011

Page 27: Modularity with OSGi

Code

protected boolean report(Reporter reporter) { if (reporter.getWarnings().size() > 0) { System.err.println("Warnings"); for (Iterator<String> e = reporter.

getWarnings().iterator(); e.hasNext();) { System.err.println(" " + e.next());

} } return false; }

12dinsdag 28 juni 2011

Page 28: Modularity with OSGi

Functions

protected boolean report(Reporter reporter) { if (reporter.getWarnings().size() > 0) { System.err.println("Warnings"); for (Iterator<String> e = reporter.

getWarnings().iterator(); e.hasNext();) { System.err.println(" " + e.next());

} } return false; }

13dinsdag 28 juni 2011

Page 29: Modularity with OSGi

Classes

protected boolean report(Reporter reporter) { if (reporter.getWarnings().size() > 0) { System.err.println("Warnings"); for (Iterator<String> e = reporter.

getWarnings().iterator(); e.hasNext();) { System.err.println(" " + e.next());

} } return false; }

14dinsdag 28 juni 2011

Page 30: Modularity with OSGi

Classes

Class B

Class A

Class C

Class D

14dinsdag 28 juni 2011

Page 31: Modularity with OSGi

Packages

Class B

Class A

Class C

Class D

15dinsdag 28 juni 2011

Page 32: Modularity with OSGi

Packages

Class C

Class D

15dinsdag 28 juni 2011

Page 33: Modularity with OSGi

Bundles

Bundle A

Bundle B

.

p

q-1.4

Bundle A

16dinsdag 28 juni 2011

Page 34: Modularity with OSGi

Bundles

Bundle A

Bundle B

.

p

r

q-[1.2,1.8)

p

q-1.4

import export

r

private

Bundle A

17dinsdag 28 juni 2011

Page 35: Modularity with OSGi

Bundles

Bundle A

Bundle B

.

p

r

q-[1.2,1.8)

p

q-1.4

import

imports

export

r

private

Bundle A

17dinsdag 28 juni 2011

Page 36: Modularity with OSGi

Bundles

Bundle A

Bundle B

.

p

r

q-[1.2,1.8)

p

q-1.4

import

imports

exports

export

r

private

Bundle A

17dinsdag 28 juni 2011

Page 37: Modularity with OSGi

BundleX

BundleX-v2

BundleB

MANAGE-MENT

BUNDLE

BundleA

Systembundle

18dinsdag 28 juni 2011

Page 38: Modularity with OSGi

Services

void foo() {…}

…s.foo()…

interface Foo { void foo();}

19dinsdag 28 juni 2011

Page 39: Modularity with OSGi

20dinsdag 28 juni 2011

Page 40: Modularity with OSGi

20dinsdag 28 juni 2011

Page 41: Modularity with OSGi

20dinsdag 28 juni 2011

Page 42: Modularity with OSGi

21dinsdag 28 juni 2011

Page 43: Modularity with OSGi

21dinsdag 28 juni 2011

Page 44: Modularity with OSGi

bundleA-1.2

bundleB-4.1

bundleC-1.0

bc

a

21dinsdag 28 juni 2011

Page 45: Modularity with OSGi

22dinsdag 28 juni 2011

Page 46: Modularity with OSGi

22dinsdag 28 juni 2011

Page 47: Modularity with OSGi

The ComponentFramework

22dinsdag 28 juni 2011

Page 48: Modularity with OSGi

23dinsdag 28 juni 2011

Page 49: Modularity with OSGi

Q&A24dinsdag 28 juni 2011

Page 50: Modularity with OSGi

Thanks!

25dinsdag 28 juni 2011