SlideShare une entreprise Scribd logo
1  sur  24
Distributing OSGi™


OSGi 4.2- Early Draft RFC-119 (with
       a twist of Terracotta)
So who is Bram?

Bram de Kruijff

Computer Science / Cognitive Science
Lead Architect GX R&D

Mainly interested in web x.y, Java™, Linux,
 Open Source, Open Standards

Bram.deKruijff@gxwebmanager.com
… and what is GX?

GX creative online development

Web Content Management
Nijmegen, Amsterdam, Eindhoven, Boston

Founded in 1995, first (Java™) CMS in 1998
GX WebManager 9 powered by OSGi™

http://www.gxwebmanager.com
http://www.gxdeveloperweb.com
Today’s menu!


Problem statement
OSGi™ Architecture
Distributed OSGi™
Demo setup
Code & Demo
Questions & discussion
Problem statement

How do we scale OSGi™ based application
  without loosing flexibility at runtime or
  violating the service programming model?

•Sharing object caches between nodes
•Manage deployment over multiple nodes
•Manage application state over multiple nodes
•Service collaboration over multiple nodes
OSGi™ Architecture

OSGi™ Architecture

•   Security
•   Modules
•   Life Cycle
•   Service Registry
•   Services

    “OSGi provides an inVM collaborative SOA model”
Distributed OSGi™

RFC 119 addresses the need for OSGi™
  applications to operate in heterogeneous IT
  environments

•Allow OSGi™ services to publish themselves
and be invoked from outside their own
runtime

•Allow OSGi™ services to discover and consume
services outside their own runtime
Distributed OSGi™

Example of a remote system invoking a service inside
the OSGi™ runtime




                                     Source: OSGi specification
Distributed OSGi™

Example of a an service inside the OSGi™ runtime
invoking an external service




                                     Source: OSGi specification
Distributed OSGi™

Example using this mechanism for communication
between multiple OSGi runtimes




                                    Source: OSGi specification
Distributed OSGi™

Hey! I can do that using <enter favorite
  middleware product here> too!

               True, but…

Distributed OSGi™ standardizes the mechanism,
abstracts away from implementation specifics and
keeps the OSGI™ service programming model
intact
Distributed OSGi™

OSGi™ service programming model is kept
 intact!

•Remotable services simply publish their Java
service interface with the service registry
•Remote services are published through
standard service registry
•Discovery and distribution through standard
service interfaces
Distributed OSGi™

Local services for distribution and discovery




                                   Source: OSGi specification
Distributed OSGi™

Responsibilities of the DistributionProvider
  service:
•Monitor availability of local remotable services
•Publish local remotable services with
Discovery
•Publish local endpoints for remote services
•Handle local service invocation of remote
services
•Handle remote service invocation of local
services
Distributed OSGi™

Responsibilities of the Discovery service

•Discover available remote services
•Monitor availability of remote services
•Notify DistributionProvider of changes
•Publish services in remote serviceregistries
Distributed OSGi™

Leveraging Service Registry Hooks (RFC 126)

•PublishHook – filtering service lifecycle
events before delivery
•FindHook – filtering service references
before return
•ListenerHook – monitoring service registry
listener registrations
Distributed OSGi™

Interaction example




                               Source: OSGi specification
Distributed OSGi™

Metadata and configuration
•org.osgi.remote.publish – indicates that a
service is to be made available
•org.osgi.remote.intents – list of (qualified)
intents for the published service
•org.osgi.remote.configuration.type – type of
additional metadata

Additional configuration is done at
deployment time through the DSW software
Distributed OSGi™

Conclusion
•Spec is still in early draft
•Nice fit wit existing service model
•Open and focused on collaboration
•Service Registry Hooks are very powerful

And it works 
•Apache CXF (Reference Implementation)
•Apache Tuscany (Work in progress)
•GXLabs JSpring 2009 demo!
Demo setup

To get things started we need an OSGi™
  runtime and some kind of middleware



•OSGi™ framework       •JVM level clustering
•Open source (ASL)     •Open source (TPL)
•Small footprint       •Non invasive
•Very stable           •Lightweight
Demo setup

To meet our objectives we are going to create
  several services
•MessageBus – Simple messaging service infrastructure based on
collections clustered by Terracotta
•DeploymentManager – Bundle deployment service that allows
cluster wide deployment of bundles using the MessageBus
•DistributionProvider – DSW implementation that remotes calls
using the MessageBus
•Discovery – Implementation of the Discovery service that
communicates over the MessageBus
Demo setup

More then a thousand words
OSGi runtime 1             TC            OSGi runtime 2



  Discovery                                               Discovery

                 Message                 Message
                                BUS
                   Bus                     Bus
 Distribution                                             Distribution
  Provider                                                 Provider


 Distribution     Cache         Cache     Cache           Distribution
  Manager        Manager        (1..n)   Manager           Manager
Demo & Code
Q&A




For more info on GX WebManager 9 have a look at
        http://www.gxdeveloperweb.com

Contenu connexe

Tendances

The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)
Kyle Simpson
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
Miroslav Resetar
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common Js
Skills Matter
 

Tendances (20)

Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
 
Let's server your Data
Let's server your DataLet's server your Data
Let's server your Data
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
Go: What's Different ?
Go: What's Different ?Go: What's Different ?
Go: What's Different ?
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
JRuby deployments
JRuby deploymentsJRuby deployments
JRuby deployments
 
.Net standard 2.0
.Net standard 2.0.Net standard 2.0
.Net standard 2.0
 
The Same-Origin Saga
The Same-Origin SagaThe Same-Origin Saga
The Same-Origin Saga
 
SFJS 6-19-2012
SFJS 6-19-2012SFJS 6-19-2012
SFJS 6-19-2012
 
openSUSE Conference 2017 - YaST News
openSUSE Conference 2017 - YaST NewsopenSUSE Conference 2017 - YaST News
openSUSE Conference 2017 - YaST News
 
MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?
 
openSUSE Conference 2017 - The Docker at Travis Presentation
openSUSE Conference 2017 - The Docker at Travis PresentationopenSUSE Conference 2017 - The Docker at Travis Presentation
openSUSE Conference 2017 - The Docker at Travis Presentation
 
libcurl, seven SSL libraries and one SSH library
libcurl, seven SSL libraries and one SSH librarylibcurl, seven SSL libraries and one SSH library
libcurl, seven SSL libraries and one SSH library
 
Installing Groovy engine in Apache Jmeter
Installing Groovy engine in Apache JmeterInstalling Groovy engine in Apache Jmeter
Installing Groovy engine in Apache Jmeter
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common Js
 

Similaire à Distributing OSGi

Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlett
mfrancis
 
OSGi In Anger - Tara Simpson
OSGi In Anger - Tara SimpsonOSGi In Anger - Tara Simpson
OSGi In Anger - Tara Simpson
mfrancis
 

Similaire à Distributing OSGi (20)

OSGi introduction
OSGi introductionOSGi introduction
OSGi introduction
 
DevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed DeploymentsDevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed Deployments
 
Head in the clouds
Head in the cloudsHead in the clouds
Head in the clouds
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache Felix
 
De leukste Bug
De leukste BugDe leukste Bug
De leukste Bug
 
What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0
 
Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlett
 
OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff
OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff
OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff
 
Is OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn NormingtonIs OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn Normington
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
 
OSGi In Anger - Tara Simpson
OSGi In Anger - Tara SimpsonOSGi In Anger - Tara Simpson
OSGi In Anger - Tara Simpson
 
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P KriensOSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 

Plus de Bram de Kruijff (6)

Amdatu Remote - Remote Service Admin 1.1 update - OSGi DevCon 2014_0.pdf
Amdatu Remote - Remote Service Admin 1.1 update - OSGi DevCon 2014_0.pdfAmdatu Remote - Remote Service Admin 1.1 update - OSGi DevCon 2014_0.pdf
Amdatu Remote - Remote Service Admin 1.1 update - OSGi DevCon 2014_0.pdf
 
Dynamic Hybrid Cloud Applications
Dynamic Hybrid Cloud ApplicationsDynamic Hybrid Cloud Applications
Dynamic Hybrid Cloud Applications
 
Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011
 
Naf LaC 2009 - Web 2.0 en Technologie
Naf LaC 2009 - Web 2.0 en TechnologieNaf LaC 2009 - Web 2.0 en Technologie
Naf LaC 2009 - Web 2.0 en Technologie
 
OSGi tech session
OSGi tech sessionOSGi tech session
OSGi tech session
 
Web 2.0 en Technologie
Web 2.0 en TechnologieWeb 2.0 en Technologie
Web 2.0 en Technologie
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Distributing OSGi

  • 1. Distributing OSGi™ OSGi 4.2- Early Draft RFC-119 (with a twist of Terracotta)
  • 2. So who is Bram? Bram de Kruijff Computer Science / Cognitive Science Lead Architect GX R&D Mainly interested in web x.y, Java™, Linux, Open Source, Open Standards Bram.deKruijff@gxwebmanager.com
  • 3. … and what is GX? GX creative online development Web Content Management Nijmegen, Amsterdam, Eindhoven, Boston Founded in 1995, first (Java™) CMS in 1998 GX WebManager 9 powered by OSGi™ http://www.gxwebmanager.com http://www.gxdeveloperweb.com
  • 4. Today’s menu! Problem statement OSGi™ Architecture Distributed OSGi™ Demo setup Code & Demo Questions & discussion
  • 5. Problem statement How do we scale OSGi™ based application without loosing flexibility at runtime or violating the service programming model? •Sharing object caches between nodes •Manage deployment over multiple nodes •Manage application state over multiple nodes •Service collaboration over multiple nodes
  • 6. OSGi™ Architecture OSGi™ Architecture • Security • Modules • Life Cycle • Service Registry • Services “OSGi provides an inVM collaborative SOA model”
  • 7. Distributed OSGi™ RFC 119 addresses the need for OSGi™ applications to operate in heterogeneous IT environments •Allow OSGi™ services to publish themselves and be invoked from outside their own runtime •Allow OSGi™ services to discover and consume services outside their own runtime
  • 8. Distributed OSGi™ Example of a remote system invoking a service inside the OSGi™ runtime Source: OSGi specification
  • 9. Distributed OSGi™ Example of a an service inside the OSGi™ runtime invoking an external service Source: OSGi specification
  • 10. Distributed OSGi™ Example using this mechanism for communication between multiple OSGi runtimes Source: OSGi specification
  • 11. Distributed OSGi™ Hey! I can do that using <enter favorite middleware product here> too! True, but… Distributed OSGi™ standardizes the mechanism, abstracts away from implementation specifics and keeps the OSGI™ service programming model intact
  • 12. Distributed OSGi™ OSGi™ service programming model is kept intact! •Remotable services simply publish their Java service interface with the service registry •Remote services are published through standard service registry •Discovery and distribution through standard service interfaces
  • 13. Distributed OSGi™ Local services for distribution and discovery Source: OSGi specification
  • 14. Distributed OSGi™ Responsibilities of the DistributionProvider service: •Monitor availability of local remotable services •Publish local remotable services with Discovery •Publish local endpoints for remote services •Handle local service invocation of remote services •Handle remote service invocation of local services
  • 15. Distributed OSGi™ Responsibilities of the Discovery service •Discover available remote services •Monitor availability of remote services •Notify DistributionProvider of changes •Publish services in remote serviceregistries
  • 16. Distributed OSGi™ Leveraging Service Registry Hooks (RFC 126) •PublishHook – filtering service lifecycle events before delivery •FindHook – filtering service references before return •ListenerHook – monitoring service registry listener registrations
  • 17. Distributed OSGi™ Interaction example Source: OSGi specification
  • 18. Distributed OSGi™ Metadata and configuration •org.osgi.remote.publish – indicates that a service is to be made available •org.osgi.remote.intents – list of (qualified) intents for the published service •org.osgi.remote.configuration.type – type of additional metadata Additional configuration is done at deployment time through the DSW software
  • 19. Distributed OSGi™ Conclusion •Spec is still in early draft •Nice fit wit existing service model •Open and focused on collaboration •Service Registry Hooks are very powerful And it works  •Apache CXF (Reference Implementation) •Apache Tuscany (Work in progress) •GXLabs JSpring 2009 demo!
  • 20. Demo setup To get things started we need an OSGi™ runtime and some kind of middleware •OSGi™ framework •JVM level clustering •Open source (ASL) •Open source (TPL) •Small footprint •Non invasive •Very stable •Lightweight
  • 21. Demo setup To meet our objectives we are going to create several services •MessageBus – Simple messaging service infrastructure based on collections clustered by Terracotta •DeploymentManager – Bundle deployment service that allows cluster wide deployment of bundles using the MessageBus •DistributionProvider – DSW implementation that remotes calls using the MessageBus •Discovery – Implementation of the Discovery service that communicates over the MessageBus
  • 22. Demo setup More then a thousand words OSGi runtime 1 TC OSGi runtime 2 Discovery Discovery Message Message BUS Bus Bus Distribution Distribution Provider Provider Distribution Cache Cache Cache Distribution Manager Manager (1..n) Manager Manager
  • 24. Q&A For more info on GX WebManager 9 have a look at http://www.gxdeveloperweb.com