intro to osgi – the microservices kernel - p kriens & t ward

93
OSGi – The μServices Kernel A high level technical introduction to OSGi

Upload: mfrancis

Post on 06-Jan-2017

3.261 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi – The µServices KernelA high level technical introduction to OSGi

Page 2: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Once upon a time in 1998 …

Page 3: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

long before SOA …

Page 4: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

A JSR was born …

Page 5: Intro to OSGi – the Microservices kernel - P Kriens & T Ward
Page 6: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

8

Page 7: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

the OSGi Service FrameworkService

Page 8: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service

Page 9: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service

Page 10: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service

Page 11: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

To prevent confusion, we coined the term …

Page 12: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

micro-service

Page 13: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

micro-service

Page 14: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

micro-service

Page 15: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

they did it again …

Page 16: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

µService

Page 17: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

because we are worth it …

Page 18: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Let’s go back to the beginning

Page 19: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Page 20: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Pub

Page 21: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Pub

Page 22: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Page 23: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Page 24: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Page 25: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Page 26: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

A v1.0

C v1.1

B v2.3

Page 27: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Done?

Page 28: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Interfaces/API

User Class

Implementer ClassInterface

Page 29: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

User Class

Implementer ClassInterface

Interfaces/API

Page 30: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

User Class

Implementer ClassInterface

Interfaces/API

Page 31: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

DocumentBuilderYour App Xerces

User Class

Implementer ClassInterface

Interfaces/API

Page 32: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

User Class

Implementer ClassInterface

Interfaces/API

Page 33: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

User Class

Implementer ClassInterface

Interfaces/API

Page 34: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

User Class

Implementer ClassInterface

priva

te

Interfaces/API

Page 35: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Now what?

Page 36: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

Page 37: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

List

en

Page 38: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

Regi

ster

List

en

Page 39: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

package com.api package com.provider.implpackage com.consumer.impl

Regi

ster

Get

List

en

Page 40: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

An honest broker …

Page 41: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Overhead?

Page 42: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

µService call ≡ Method call

Page 43: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

µService ≡ object

Page 44: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Closer with less irritation …

Page 45: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

.

Page 46: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

.

REST

Page 47: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

SOA

.

REST

Page 48: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

SOA “MICRO Service”

.

REST

Page 49: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

SOA “MICRO Service”

µservice

.

REST

Page 50: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

G

B

E

H

C

F

I

Page 51: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

B

E

H

C

F

I

Page 52: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

B

Page 53: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Page 54: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Page 55: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Page 56: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

D

A

G

E

H

C

F

I

Page 57: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

D

A

G

E

H

C

FF

Page 58: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

Page 59: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

Ba Bb

D

A

G

E

H

C

F

Page 60: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

Page 61: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

Page 62: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

S;1.1.0

F

Page 63: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

S;1.1.0

F

Page 64: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

S;1.1.0

F

Page 65: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

S;1.1.0

F

REST

Page 66: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 67: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 68: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 69: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 70: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 71: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Page 72: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

But OSGi is so complicated!

Page 73: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Sigh …

Page 74: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Complexity is in the eye of the beholder

Page 75: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

Complexity is in the eye of the beholder

Page 76: Intro to OSGi – the Microservices kernel - P Kriens & T Ward
Page 77: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

The right tool for the job …

Page 78: Intro to OSGi – the Microservices kernel - P Kriens & T Ward
Page 79: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

meet bnd(tools)

Page 80: Intro to OSGi – the Microservices kernel - P Kriens & T Ward
Page 81: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

bnd(tools)• DS Component Annotation support

• Access to maven central and more

• Based on Capability model

• Extensive debugging with dynamic updating

• Executable JARs

• Release tool with semantic versioning

• Baselining

• Integration with Continuous Integration

Page 82: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

bnd(tools)• DS Component Annotation support

• Access to maven central and more

• Based on Capability model

• Extensive debugging with dynamic updating

• Executable JARs

• Release tool with semantic versioning

• Baselining

• Integration with Continuous Integration

See

Nei

l Bar

tlet

t’s

talk

on B

ndto

ols

nex

t

Page 83: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi enRoute

Page 84: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi enRoute

Page 85: Intro to OSGi – the Microservices kernel - P Kriens & T Ward
Page 86: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

cost

of c

hang

e

functionality

Page 87: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

cost

of c

hang

e

functionality

dynamic languages

Page 88: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

cost

of c

hang

e

functionality

dynamic languages Java/OSGi

Page 89: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

cost

of c

hang

e

functionality

dynamic languages

Java/OSGi

Page 90: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

In the end, OSGi is inevitable …

Page 91: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi Release 6• June 2nd the OSGi Core Release 6 Specification received its final

approval and will be available this week to the public for downloading.

• http://www.osgi.org/Specifications/HomePage

• The OSGi Board of Directors also approved the publication of an Early Draft Specification of OSGi Enterprise Release 6 for downloading.

• http://www.osgi.org/Specifications/Drafts

Page 92: Intro to OSGi – the Microservices kernel - P Kriens & T Ward

OSGi Release 6• June 2nd the OSGi Core Release 6 Specification received its final

approval and will be available this week to the public for downloading.

• http://www.osgi.org/Specifications/HomePage

• The OSGi Board of Directors also approved the publication of an Early Draft Specification of OSGi Enterprise Release 6 for downloading.

• http://www.osgi.org/Specifications/Drafts

NEW

Page 93: Intro to OSGi – the Microservices kernel - P Kriens & T Ward