MICROSERVICES WITH OSGI

Ähnliche Dokumente
Eclipse Equinox als Basis für Smart Client Anwendungen. Christian Campo, compeople AG, Java Forum Stuttgart 2007

+++ Bitte nutzen Sie die integrierte Audio-Funktion von WebEx (Menü Audio -> Integrated Voice Conference -> Start auswählen), um uns zu hören!!!.

Group and Session Management for Collaborative Applications

Isabel Arnold CICS Technical Sales Germany z/os Explorer IBM Corporation

XML Template Transfer Transfer project templates easily between systems

How To Configure Cloud for Customer Integration SAP CRM using SAP Netweaver PI

Softwareschnittstellen

p^db=`oj===pìééçêíáåñçêã~íáçå=

Mitglied der Leibniz-Gemeinschaft

ALL1681 Wireless g Powerline Router Quick Installation Guide

TVHD800x0. Port-Weiterleitung. Version 1.1

Infrastructure as a Service (IaaS) Solutions for Online Game Service Provision

TomTom WEBFLEET Tachograph

ISO Reference Model

Introduction to Azure for Developers MOC 10978

Introducing PAThWay. Structured and methodical performance engineering. Isaías A. Comprés Ureña Ventsislav Petkov Michael Firbach Michael Gerndt

Symbio system requirements. Version 5.1

eurex rundschreiben 094/10

Frontend Migration from JSP to Eclipse Scout

Exploring the knowledge in Semi Structured Data Sets with Rich Queries

OSGi. The Next Generation Java Service Platform. SOA - The Java Way or My classpath is killing me. Michael Greifeneder

Klausur Verteilte Systeme

Presentation of a diagnostic tool for hybrid and module testing

Webbasierte Exploration von großen 3D-Stadtmodellen mit dem 3DCityDB Webclient

IDRT: Unlocking Research Data Sources with ETL for use in a Structured Research Database

Dynamische Programmiersprachen. David Schneider STUPS

Notice: All mentioned inventors have to sign the Report of Invention (see page 3)!!!

Prozesse als strategischer Treiber einer SOA - Ein Bericht aus der Praxis

Spring Dynamic Modules for OSGi Service Platforms

Distributed testing. Demo Video

HIR Method & Tools for Fit Gap analysis

EEX Kundeninformation

Integration of D-Grid Sites in NGI-DE Monitoring

Robotino View Kommunikation mit OPC. Communication with OPC DE/EN 04/08

Advanced Availability Transfer Transfer absences from HR to PPM

Markus BöhmB Account Technology Architect Microsoft Schweiz GmbH

SELF-STUDY DIARY (or Lerntagebuch) GER102

Mash-Up Personal Learning Environments. Dr. Hendrik Drachsler

NEWSLETTER. FileDirector Version 2.5 Novelties. Filing system designer. Filing system in WinClient

Exercise (Part I) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

AS Path-Prepending in the Internet And Its Impact on Routing Decisions

Wie agil kann Business Analyse sein?

Titelbild1 ANSYS. Customer Portal LogIn

Product Lifecycle Manager

GIPS 2010 Gesamtüberblick. Dr. Stefan J. Illmer Credit Suisse. Seminar der SBVg "GIPS Aperitif" 15. April 2010 Referat von Stefan Illmer

SAP Simple Service Request. Add-on for SAP Solution Manager by SAP Consulting SAP Deutschland SE & Co. KG

ReadMe zur Installation der BRICKware for Windows, Version ReadMe on Installing BRICKware for Windows, Version 6.1.2

Version smart.finder SDI. What's New?

Remote Eclipse RCP Management

Erfolgreiche Unternehmen bauen ihre SharePoint-Dashboards mit Visio Sehen heißt verstehen! Claus Quast SSP Visio Microsoft Deutschland GmbH

5. Übung zur Vorlesung Service-orientierte Architekturen

Einsatz einer Dokumentenverwaltungslösung zur Optimierung der unternehmensübergreifenden Kommunikation

Algorithms for graph visualization

WH1 Citrix Follow-Me Data: The Enterprise Version of File Sharing. Peter Schulz, Product Manager, Citrix Joerg Vosse, Systems Engineer, Citrix

Invitation - Benutzerhandbuch. User Manual. User Manual. I. Deutsch Produktübersicht Beschreibung... 2

CHAMPIONS Communication and Dissemination

How-To-Do. Hardware Configuration of the CC03 via SIMATIC Manager from Siemens

WP2. Communication and Dissemination. Wirtschafts- und Wissenschaftsförderung im Freistaat Thüringen

Customer-specific software for autonomous driving and driver assistance (ADAS)

Prof. Dr. Margit Scholl, Mr. RD Guldner Mr. Coskun, Mr. Yigitbas. Mr. Niemczik, Mr. Koppatz (SuDiLe GbR)

KURZANLEITUNG. Firmware-Upgrade: Wie geht das eigentlich?

Microsoft Azure Fundamentals MOC 10979

Corporate Digital Learning, How to Get It Right. Learning Café

Exercise (Part II) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Inequality Utilitarian and Capabilities Perspectives (and what they may imply for public health)

The poetry of school.

39 Object Request Brokers. 40 Components of an ORB Stubs and Skeletons Stub

1. General information Login Home Current applications... 3

Verzeichnisdienste in heterogenen Systemen

There are 10 weeks this summer vacation the weeks beginning: June 23, June 30, July 7, July 14, July 21, Jul 28, Aug 4, Aug 11, Aug 18, Aug 25

GRIPS - GIS basiertes Risikoanalyse-, Informations- und Planungssystem

Lehrstuhl für Allgemeine BWL Strategisches und Internationales Management Prof. Dr. Mike Geppert Carl-Zeiß-Str Jena

Wählen Sie das MySQL Symbol und erstellen Sie eine Datenbank und einen dazugehörigen User.

Overall Coordination- and Communication Platform. for electronic and standardised Data-Exchange between. Ports and Hinterland in Rail-Traffic

Availability Manager Overview

Forschungsprojekt OSAMI Teilprojekt: Entwicklung eines telemedizinischen Trainingssystems

Concept. Chapter. Locking daemon over CIFS for OpenOffice.org. Verantwortlich

Field Librarianship in den USA

Kommunikation ist alles

Load balancing Router with / mit DMZ

EtherNet/IP Topology and Engineering MPx06/07/08VRS

UPU / CEN / ETSI. E-Zustellung in Europa & weltweit

M-CRAMER TRACKING. ONLINE TRACKING PLATTFORM Sie finden unsere Online Tracking Plattform unter

Instruktionen Mozilla Thunderbird Seite 1

Günstig wohnen für Austauschstudenten und Gastdozenten von einer Nacht bis zu sechs Monaten.

Z-Push. Heinlein Mailserverkonferenz Helmuth Neuberger.

MODELLING AND CONTROLLING THE STEERING FORCE FEEDBACK USING SIMULINK AND xpc TARGET

JobScheduler - Job Execution and Scheduling System Software Open Source

Sicherheit dank Durchblick. Thomas Fleischmann Sales Engineer, Central Europe

Sprint 1 -> 2 Bridge ( )

Plug & Care Connector: OSGi-basierte Applikation für Smartphones und Desktop-Systeme

SAP PPM Enhanced Field and Tab Control

Mensch-Maschine-Interaktion 2 Übung 1

Effizienz im Vor-Ort-Service

Martin Schütte. 6. Brandenburger Linux-Infotag 21. November 2009

Transkript:

MICROSERVICES WITH OSGI

Speaker Dirk Fauth Software-Architect Rich Client Systeme Eclipse Committer Robert Bosch GmbH Franz-Oechsle-Straße 4 73207 Plochingen dirk.fauth@de.bosch.com www.bosch.com blog.vogella.com/author/fipro/ Twitter: fipro78 2

Speaker Peter Kirschner Developer, Architect, Build and Release Engineer OSS, OSGi & Eclipse Enthusiast Kirschners GmbH Löchgauer Straße 57 74321 Bietigheim-Bissingen peter@kirschners.de GitHub: peterkir.github.io Twitter: peterkir 3

MOTIVATION

Motivation Microservices are one of the current hype topics A lot of people are actually doing microservices with different approaches OSGi has a mature service design OSGi Core R6 Chapter 5 Service Layer OSGi Compendium R6 Chapter 112 Declarative Services OSGi has specifications for remote services OSGi Compendium R6 Chapter 100 Remote Services OSGi Compendium R6 Chapter 122 Remote Service Admin Service There are several talks about OSGi, microservices and remote services But mostly about architecture, cool demos but little about the technical details 5

OVERVIEW

Publish-Find-Bind Bundles register (publish) services Bundles get (bind) services Bundles listen (find) services <<bundle>> <<service>> <<bundle>> A register (publish) S get (bind) B listen (find) 7

Publish-Find-Bind - Remote <<bundle>> A <<bundle>> A <<bundle>> A register (publish) register (publish) register (publish) <<service>> S <<service>> S <<service>> S S get (bind) listen (find) S S <<bundle>> B get (bind) listen (find) get (bind) <<bundle>> B <<bundle>> B <<bundle>> A register (publish) <<service>> S S get (bind) <<bundle>> B listen (find) 8 listen (find)

Remote Services 9 OSGi Compendium Specification R6 Figure 100.1 Architecture

Terminology Remote Service (aka Distributed Service) 10 OSGi service that is available across container boundaries Distribution Provider Exports services by creating endpoints Imports services by creating proxies to access endpoints Manage policies around the topology Discover remote services Endpoint Communication access mechanism to a remote service that requires some protocol for communications Topology Mapping between services and endpoints as well as their communication characteristics

Remote Service Admin 11 OSGi Compendium Specification R6 Figure 122.1 Remote Service Admin Entities

Terminology Remote Service Admin Passive Distribution Provider providing the mechanism but actually does not export or import services itself Topology Manager Provides the policy for importing and exporting services via RSA Implements a topology by using the RSA Discovery Discover / announce Endpoint Descriptions via some discovery protocol Endpoint Description Describes an Endpoint via configuration type (name and set of properties) 12

Remote Service Admin Export Simplified Service Producer Remote Service Implementation instructs Remote Service Admin Topology Manager informs Discovery endpoint created by RSA announced by Discovery 13

Remote Service Admin Import Simplified Service Consumer Remote Service Implementation endpoint learns from Topology Manager instructs discovered by Discovery proxied by RSA Discovery Remote Service Admin 14

IMPLEMENTATION

Remote Service Implementation @Component(property= { "service.exported.interfaces=*", "service.exported.configs=ecf.generic.server" }) public class UppercaseModifier implements StringModifier { @Override public String modify(string input) { return input.touppercase(locale.getdefault()); } } 16

Remote Service Properties service.exported.interfaces=* Required property to mark a service for export. Specifies which service interfaces should be exported. Using the wildcard it says that all the interfaces that are registered should be exported. service.exported.configs The configuration types that should be used to export a service. Each configuration type (endpoint type) represents the configuration parameters for endpoints. For example: ECF Generic Provider = CXF DOSGi provider RS = ecf.generic.server org.apache.cxf.rs https://wiki.eclipse.org/distribution_providers https://github.com/apache/cxf-dosgi 17

Implementations Eclipse Communication Framework https://www.eclipse.org/ecf/ Apache Aries Remote Service Admin http://aries.apache.org/modules/rsa.html Amdatu https://amdatu.org/application/remote/ Paremus RSA https://docs.paremus.com/display/sf113/remote+service+implementation Apache CXF Distributed OSGi (distribution providers for Aries RSA) http://cxf.apache.org/distributed-osgi.html 18

Required Bundles Equinox OSGi Application Bundle-SymbolicName org.fipro.modifier.api org.fipro.modifier.uppercase org.apache.felix.gogo.command org.apache.felix.gogo.runtime org.apache.felix.gogo.shell org.eclipse.equinox.console org.eclipse.osgi org.eclipse.osgi.services org.eclipse.equinox.common org.eclipse.equinox.event org.eclipse.equinox.util org.apache.felix.scr org.eclipse.osgi.util Bundle-Name Application Bundles OSGi Console Equinox OSGi System Bundle Equinox OSGi Service Interfaces Common Eclipse Runtime Event Admin Equinox Util Bundle Apache Felix Declarative Services OSGi Utility Classes 19

Required Bundles ECF with Generic Provider Bundle-SymbolicName org.eclipse.core.jobs org.eclipse.equinox.concurrent org.eclipse.ecf org.eclipse.ecf.discovery org.eclipse.ecf.identity org.eclipse.ecf.osgi.services.distribution org.eclipse.ecf.osgi.services.remoteserviceadmin org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy org.eclipse.ecf.provider org.eclipse.ecf.provider.jmdns org.eclipse.ecf.provider.remoteservice org.eclipse.ecf.remoteservice org.eclipse.ecf.remoteservice.asyncproxy org.eclipse.ecf.sharedobject org.eclipse.osgi.services.remoteserviceadmin Bundle-Name Eclipse Jobs Mechanism Equinox Concurrent API ECF Core Bundle ECF Discovery API Bundle ECF Identity Bundle ECF RSA Basic Topology Manager ECF RSA Implementation ECF RSA Proxy ECF Generic Provider ECF Discovery Zeroconf/JMDNS Provider ECF Generic Provider RemoteServices Support ECF RemoteServices API ECF RemoteServices AsyncProxy API ECF SharedObject API OSGi RSA API 20

ECF Providers Discovery 21 Zeroconf/aka Bonjour/Rendevous (JmDNS) org.eclipse.ecf.provider.jmdns jslp aka SLP/RFC2608 org.eclipse.ecf.provider.jslp Distribution Provider Generic Provider org.eclipse.ecf.provider org.eclipse.ecf.provider.remoteservice r-osgi Provider org.eclipse.ecf.provider.r_osgi ch.ethz.iks.r_osgi.remote Apache CXF Jax-RS Implementation org.eclipse.ecf.provider.cxf.server org.eclipse.ecf.provider.jaxrs.server org.eclipse.ecf.provider.jaxrs https://wiki.eclipse.org/distribution_providers https://github.com/apache/cxf-dosgi

Troubleshooting with Equinox Bundles that need to auto-started 22 org.eclipse.osgi org.apache.felix.scr org.eclipse.equinox.event org.eclipse.ecf.osgi.services.distribution org.eclipse.ecf.provider.jmdns org.eclipse.ecf.provider.remoteservice On the producer side when using a product file additional bundles needed org.eclipse.equinox.app org.eclipse.equinox.registry On the consumer side Eclipse RCP and @Service: configure the service interface bundles for a lower start level than the default Eclipse RCP with low level OSGi API: ensure the bundle is started (UI bundles are typically not started)

Conclusion Simple at service implementation Complicated at runtime definition Even more complicated on DevOps side Fallacies of Distributed Computing https://de.wikipedia.org/wiki/fallacies_of_distributed_computing Service interface evolution Developer specifies topology via service property, not the administrator 23

DEMO

Demo Setup PC Consumer with local service Service Producer PC Service Producer Raspberry Pi Service Producer 25

REFERENCES

References Neil Bartlett - Scaling and Orchestrating Microservices with OSGi https://de.slideshare.net/mfrancis/scaling-and-orchestratingmicroservices-with-osgi-n-bartlett Achim Nierbeck Microservices and OSGi running with Apache Karaf https://de.slideshare.net/achimnierbeck/microservicesosgirunningwithapachekaraf Christian Schneider Lean microservices on OSGi https://de.slideshare.net/christianschneider3/lean-microservices-on-osgi Graham Charters - Microservices & OSGi - Better Together? https://de.slideshare.net/mfrancis/microservices-osgi-better-togethergraham-charters 27

References Wim Jongman - How to cook an egg with the Eclipse Communication Framework http://www.eclipsecon.org/europe2014/sites/default/files/slides/how%20to %20Cook%20an%20Egg%20with%20the%20Eclipse%20Communication %20Framework.pdf Christoph Keimel Powering a Live Escape Game with ECF & e(fx)clipse https://de.slideshare.net/keimel/powering-a-live-escape-game-with-ecfand-efxclipse 28

OSGi Remote Services Evaluate the Sessions Sign in and vote at eclipsecon.org - 1 0 + 1 29