hilf mir obr, du bist meine letzte hoffnung

20
www.paremus.com Transforming the Way the World Runs Applications Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. www.paremus.com Paremus Nov 2011 Hilf mir, OBR - Du bist meine letzte Hoffnung! Eine schnelle Einführung in das OSGi Bundle Repository Holger Hoffstätte [email protected] [email protected] Twitter: @asynchronaut

Upload: holger-hoffstaette

Post on 18-Dec-2014

267 views

Category:

Technology


0 download

DESCRIPTION

A brief overview of the upcoming OSGi Bundle Repository specification (RFC 112), presented at the German OSGi User's Forum in Cologne.

TRANSCRIPT

Page 1: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Hilf mir, OBR -Du bist meine letzte Hoffnung!

Eine schnelle Einführung in das OSGi Bundle Repository

Holger Hoffstä[email protected]@applied-asynchrony.com

Twitter: @asynchronaut

Page 2: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Wer bin ich?• Holger Hoffstätte, Dipl.Inf. (FH)

Lebe & arbeite in Deutschland, nahe Köln;regelmäßige Besuche in London

• Beratender Analyst, Architekt & Entwickler für Paremus Ltd.Fokus auf 2. Generation Paremus Service Fabric, Messaging, Verteilung

• >20 Jahre Erfahrung mit nebenläufigen/verteilten Systemen,Agile Prozessberatung, AOP, B2B, Enterprise Integration etc.

Page 3: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

..das was?

OSGi Bundle Repository (OBR)● Motivation, Geschichte

● Hauptaspekte / Rollen

● Vorteile, Einflüsse auf OSGi

(nicht wirklich Bundles)

Page 4: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Typische OSGi Schmerzen

• Verwaltung/Kontrolle von Abhängigkeiten:Entwicklung, Installation, Laufzeit

• Welche Bundes sollen wann, warum, wieinstalliert werden?

Page 5: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Typische OSGi Schmerzen• Existierende (nicht-OSGi-spezielle) Werkzeuge:

Notlösungen, unvollständig, inkompatibel(P2, Maven, Ivy, Gradle, Sigil, ..)

• Basieren meist auf „dummen“ Artefakten,nicht was diese tun

• Keine einheitlichen Wege, um Abhängigkeitenabzufragen oder einzeln aufzulösen(zu Entwicklungs- und Laufzeit)

Page 6: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

OBR ist..Hauptsächlich ein standardisiertes Modell,das beschreibt:

• Welche Bundles sind verfügbar?

• Was tun diese?

Kein Management Agent/Deployer: nur ein „Berechner“Kein „Server/Datenbank“: kein vordefinierter Speicher, Zugriff etc.

Page 7: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

HauptaspekteOBR hat 3 wesentliche Aufgaben:

• Repository:Was ist verfügbar?

• Resolution:Passende Kombination von Bundles

• Austauschformat

Page 8: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Bisherige Entwicklung• Informell spezifiziert & implementiert

von Richard Hall ~2004, Teil von Felix

• Verschiede Probleme:Versorgung von externen Prozessen,Unterscheidung Entwicklungs-/Laufzeit

• Offizielle Wiederbelebung 2009 von Hal Hildebrand,neue Spezifikation geleitet von David Savage in OSGi EEG

Page 9: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Neues Modell!• Implementiert das 4.3 Konzept von "wiring"

• Implementiert häufig benötigte Funktionalitätfür Framework-Einsicht zur Laufzeit(ersetzt PackageAdmin + Hacks)

• Resources:→ mehr als trad. Bundles

• Capabilities & Requirements:abstrakte Beschreibung der „Fähigkeiten“und Abhängigkeiten eines Bundles

Page 10: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Resources• Resources sind physisch oder virtuell:

trad. Bundle → physische Resource

• Capabilities:Identity → eindeutige „ID“Content → Checksumme, Größe..

• Requirements:osgi.wiring.package → Import-Packageosgi.wiring.bundle → Require-Bundle

Page 11: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Resources• Capabilities haben einen

Namensraum und Attribute

• Requirements habeneinen Namensraumund eine Menge vonAnweisungen (Directives)

Page 12: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Resources• Ein Requirement wird von

einer Capability erfüllt, wenn:

• die Namensräume gleich sind

• die Anweisungen zu denAttributen „passen“

Page 13: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Repository• Repository:

Einfacher Dienst, derRessourcen mit Fähigkeitenfindet & bereitstellt

• Beliebig viele möglich!

Page 14: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Auflösung(von Abhängigkeiten)

• Resources + Wiring→ Environment

• Environment + Requirements→ Resolution

Page 15: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Auflösung: Beispiel

Page 16: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Ausblick:Subsystems(RFC 152)

Page 17: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Austauschformat• Basiert auf XML Schema

• Beschreibender Name & URI (Identität)

• Versionsnummer (long)

• Resource URLs, Größe, Checksumme, Algo..

Page 18: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Austauschformat<?xml version="1.0"?><repository name="example" increment="1" targetNamespace='http://www.osgi.org/xmlns/obr/v1.0.0'> <resource> <capability namespace='osgi.identity'> <attribute name='osgi.identity' value='org.foo.mumble' /> <attribute name='version' type='version' value='1.0.0' /> <attribute name='type' value='osgi.bundle' /> </capability> <capability namespace="osgi.content"> <attribute name="osgi.content" value="org/foo/org.foo.mumble-1.0.0.jar" /> <attribute name='size' type='long' value='46725' /> <attribute name='checksum' value='1bafd2ece2e88db4cdf835a7f8f0de65fab5b1147977a5dcc59b7c1b8c6f5080' /> </capability> </resource>

Page 19: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Mögl. Erweiterungen• Begrenzte Diagnosemöglichkeiten bei fehlgeschlagener Auflösung

• Repository Events

• Lizenzverwaltung/Berücksichtigung

• Web-basiertes Repository

• Deployment Modell → Subsystems

Page 20: Hilf mir OBR, Du bist meine letzte Hoffnung

www.paremus.com

Transforming the Way the World Runs Applications

Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

www.paremus.comParemus Nov 2011

Zusammenfassung!

OBR ist..●Klein, Robust, Zuverlässig

●Repariert Defekte selbständig

●Ein wichtiger Helfer im Kampfgegen die Dunkle Seite der ungewollten Komplexität!