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

Post on 06-Jan-2017

3.260 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Once upon a time in 1998 …

long before SOA …

A JSR was born …

8

the OSGi Service FrameworkService

Service

Service

Service

To prevent confusion, we coined the term …

micro-service

micro-service

micro-service

they did it again …

µService

because we are worth it …

Let’s go back to the beginning

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Pub

Modularity

• modules have a private space and share a public space

• modules limit their visibility and exposure

• complexity ∷ parts2

A B

C D

Pub

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

Softw

are

Com

plex

ity

Moving Parts

Modularity’s Secret

A v1.0

C v1.1

B v2.3

Done?

Interfaces/API

User Class

Implementer ClassInterface

User Class

Implementer ClassInterface

Interfaces/API

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

User Class

Implementer ClassInterface

Interfaces/API

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

DocumentBuilderYour App Xerces

User Class

Implementer ClassInterface

Interfaces/API

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

User Class

Implementer ClassInterface

Interfaces/API

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

User Class

Implementer ClassInterface

Interfaces/API

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

User Class

Implementer ClassInterface

priva

te

Interfaces/API

Now what?

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

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

List

en

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

Regi

ster

List

en

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

Regi

ster

Get

List

en

An honest broker …

Overhead?

µService call ≡ Method call

µService ≡ object

Closer with less irritation …

.

.

REST

SOA

.

REST

SOA “MICRO Service”

.

REST

SOA “MICRO Service”

µservice

.

REST

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

G

B

E

H

C

F

I

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

B

E

H

C

F

I

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

B

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

F

I

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

D

A

G

E

H

C

F

I

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

D

A

G

E

H

C

FF

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

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

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

Ba Bb

OSGi• Adaptive

• Flexible

• Contracts

• Robust

• Secure

• Evolution

• Distributed

D

A

G

E

H

C

FF

I v2.0

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

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

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

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

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

Service Patterns• Factory

• Listener

• Discovery

• Distribution

• Dependencies

But OSGi is so complicated!

Sigh …

Complexity is in the eye of the beholder

Complexity is in the eye of the beholder

The right tool for the job …

meet bnd(tools)

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

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

OSGi enRoute

OSGi enRoute

cost

of c

hang

e

functionality

cost

of c

hang

e

functionality

dynamic languages

cost

of c

hang

e

functionality

dynamic languages Java/OSGi

cost

of c

hang

e

functionality

dynamic languages

Java/OSGi

In the end, OSGi is inevitable …

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

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

top related