SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Distributed OSGi and Possible
    Future Enhancements




      David Bosschaert                      Marc Schaaf
     david.bosschaert@gmail.com           marc@marc-schaaf.de


                   OSGi DevCon Europe 2009 - Zürich
About Us
●   David Bosschaert
    ●   Works at Progress Software in Dublin (previously IONA
        Technologies)
    ●   Member of the OSGi Enterprise Expert Group
    ●   Coding Open Source projects


●   Marc Schaaf
    ●   Student of computer science at the University of Applied Science
        in Hannover, Germany
    ●   Currently writing his masters thesis on a possible integration of
        asynchronous messaging into OSGi
Distributed OSGi
  (Remote Services)
Remote Services
New OSGi Specifications, based on the Distributed OSGi RFC 119.
   1. Remote Services, which specifies the standardized properties for
      service remoting.
      Will be released this summer as part of OSGi 4.2
   2. Distribution Service Admin API’s. Contains standard API’s for
      interacting with the Distribution Provider and Discovery Providers.
      Will be released before the end of the year.
Demo of Remote Services
                         Client Side OSGi container                    Server Side OSGi container
                         (Felix)                                       (Equinox)
                                     Core OSGi Bundles                         Core OSGi Bundles

                                       Library Bundles                             Library Bundles
                                       DOSGi Bundles                               DOSGi Bundles
                                       (Apache CXF)                                (Apache CXF)

                                   My App Interfaces Bundle                  My App Interfaces Bundle
                   ook




                                   My App Consumer Bundle                     My App Service Bundle
          egistry H
Service R red by




                                                invokes                                     creates
                           provides
     trigge




                                                                                                      publishes
                                              svc                                        OSGi
                                             proxy                                        svc


 remote
 service
metadata
                                                                remote              remote endpoint
                                                                                                            publishes

                         Discovery                            invocation
                          service
Asynchronous Messaging
        in OSGi
    An integration approach
Project Lightsabre – Aims

    OSGi Container
     OSGi Container                  OSGi Container
                                      OSGi Container

    “Normal” Bundle                  “Normal” Bundle



  Mediation Component             Mediation Component



                        Queue
                          or
Messaging System
 Messaging System        Topic


                                 Already existing / /Legacy
                                  Already existing Legacy
                                        Application
                                         Application
The OSGi EventAdmin
●   EventAdmin
    ●    OSGi internal mechanism for (asynchronous) event based
         communication with topic semantic
                                         EventAdmin
                                           Service
                           Push Events
         SendingBundle

                                                                   EventAdmin Impl.

                          Receive Events                Deliver Events
        ReceivingBundle
                                         EventHandler
                                           Service

    ●    Events consist of a topic and an arbitrary number of key:value
         pairs
    ●    An EventHandler can provide a filter to select the events he
         wants to receive
EventAdmin Based Integration
     Idea: Introduce an “Event Distribution System” (EDS)
           which mediates between the EventAdmin and the MoM

OSGi Container
 OSGi Container
                                     Events                                      Messages

                     EventHandling
                        Service
                                                  EventAdmin     Configuration
 Receiving Bundle                                   Service


                                     EventAdmin                      EDS            MoM

  Sending Bundle
                    EventAdmin                       EventHandling
                      Service                           Service


                                     Events                                      Messages
EventAdmin Based Integration
●   Basic messaging functionality with existing API
    ●   Seamless integration
    ●   Usage of MoM without any knowledge about it

●
    Drawbacks
    ●   No guaranteed delivery → No reliability
    ●   No error handling, .....


●
    Possible solutions
    ●   Use another (new) API
    ●   Extend the existing API (next slide)
“Extended” EventAdmin
  ●   Idea: Introduce an extended EventAdmin API
      ●   The additional API could provide guaranteed delivery and could
          be implemented directly by the EDS
      ●   The old API still enables legacy bundles to use messaging with
          limited features

OSGi Container
 OSGi Container                   Extended EventAdmin
                                        Service
                  EventHandling
                     Service
                                                 EventAdmin
                                                   Service
 Receiving Bundle

                                    EventAdmin                     EDS   MoM

  Sending Bundle
                   EventAdmin                      EventHandling
                     Service                          Service
Demo
Sending OSGi Container
 Sending OSGi Container             Receiving OSGi Container
                                     Receiving OSGi Container

Message Producing Bundle            Message Consuming Bundle


      EventAdmin           Events         EventAdmin



            EDS                               EDS

       ActiveMQWrapper              ActiveMQWrapper




ActiveMQ                   Topic
 ActiveMQ
How to Send Messages
ServiceTracker
st = new ServiceTracker(bctx, EventAdmin.class.getName(), null) {
    @Override
    public Object addingService(ServiceReference reference) {
        eventAdmin = (EventAdmin) bctx.getService(reference);
        jbSend.setEnabled(true);
        return super.addingService(reference);
    }
};




Sending an Event
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("message", jtMessage.getText());
Event ev = new Event("demo", props);
eventAdmin.sendEvent(ev);



Configuration
org.fusesource.lightsabre.name=DemoActiveMqForwarding
org.fusesource.lightsabre.direction=send
org.fusesource.lightsabre.event.topic=demo
org.fusesource.lightsabre.messaging.binding=org.apache.activemq
org.fusesource.lightsabre.messaging.url=tcp://localhost:61616
org.fusesource.lightsabre.messaging.subject=DemoActivemqTopic
[...]
How to Receive Messages
Bundle Activator
public void start(BundleContext context) throws Exception {
    Dictionary props = new Hashtable();
    props.put(EventConstants.EVENT_TOPIC, "demo");

     context.registerService(EventHandler.class.getName(),new DemoMessageReceiver(),
                                                                              props);
}




Event Handler
public class DemoMessageReceiver implements EventHandler {

     public void handleEvent(Event event) {
         System.out.println("DemoMessageReceiver: " + event.getProperty("message"));
     }
}



Configuration
org.fusesource.lightsabre.name=DemoActiveMqForwarding
org.fusesource.lightsabre.direction=receive
org.fusesource.lightsabre.messaging.binding=org.apache.activemq
org.fusesource.lightsabre.messaging.url=tcp://localhost:61616
org.fusesource.lightsabre.messaging.subject=DemoActivemqTopic
[...]
Conclusion
●   Distributed OSGi
    ●   A standardized way to use the OSGi Services model with Remote
        Service Distribution


●   Asynchronous Messaging
    ●   Promising approach as a basis for further research found
    ●   Lightsabre provides a first implementation
Thank you for your kind attention

OSGi Remote Services                              Project Lightsabre
                                                  OSGi Asynchronous Messaging
OSGi 4.2 Draft
➔   http://www.osgi.org/Specifications/Drafts      ➔   http://lightsabre.fusesource.org

Reference Implementation
➔   http://cxf.apache.org/distributed-osgi.html

Weitere ähnliche Inhalte

Was ist angesagt?

Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-final
OpenCity Community
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise Release
David Bosschaert
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared Memory
Anthony Gelibert
 
Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action
CompatibleOne
 
CompatibleOne @ OpenWorldForum 2011
CompatibleOne @ OpenWorldForum 2011CompatibleOne @ OpenWorldForum 2011
CompatibleOne @ OpenWorldForum 2011
CompatibleOne
 
Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0
Sathishkumar A
 

Was ist angesagt? (20)

OSGi for mere mortals
OSGi for mere mortalsOSGi for mere mortals
OSGi for mere mortals
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-final
 
Rogue bundles
Rogue bundlesRogue bundles
Rogue bundles
 
Hyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computingHyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computing
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise Release
 
Intro to Cloudstack
Intro to CloudstackIntro to Cloudstack
Intro to Cloudstack
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared Memory
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
 
Ese2008 Swordfish
Ese2008 SwordfishEse2008 Swordfish
Ese2008 Swordfish
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
 
Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action
 
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of liberty
 
Jetty Vs Tomcat
Jetty Vs TomcatJetty Vs Tomcat
Jetty Vs Tomcat
 
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
 
CompatibleOne @ OpenWorldForum 2011
CompatibleOne @ OpenWorldForum 2011CompatibleOne @ OpenWorldForum 2011
CompatibleOne @ OpenWorldForum 2011
 
Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0
 
Puppet and the Model-Driven Infrastructure
Puppet and the Model-Driven InfrastructurePuppet and the Model-Driven Infrastructure
Puppet and the Model-Driven Infrastructure
 

Ähnlich wie Distributed Services - OSGi 4.2 and possible future enhancements

Apache con 2011 provisioning distributed os-gi applications in a cloud
Apache con 2011   provisioning distributed os-gi applications in a cloudApache con 2011   provisioning distributed os-gi applications in a cloud
Apache con 2011 provisioning distributed os-gi applications in a cloud
Guillaume Nodet
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
IndicThreads
 
Continuous Delivery in the Cloud
Continuous Delivery in the CloudContinuous Delivery in the Cloud
Continuous Delivery in the Cloud
Fabio Lessa
 
Oscon anatomy of_os_cloud_ecosystem
Oscon anatomy of_os_cloud_ecosystemOscon anatomy of_os_cloud_ecosystem
Oscon anatomy of_os_cloud_ecosystem
htdvul
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
glynnormington
 
Operating the Hyperscale Cloud
Operating the Hyperscale CloudOperating the Hyperscale Cloud
Operating the Hyperscale Cloud
Open Stack
 

Ähnlich wie Distributed Services - OSGi 4.2 and possible future enhancements (20)

Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
 
OSGi Mars World in Action
OSGi Mars World in ActionOSGi Mars World in Action
OSGi Mars World in Action
 
Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
 
Apache con 2011 provisioning distributed os-gi applications in a cloud
Apache con 2011   provisioning distributed os-gi applications in a cloudApache con 2011   provisioning distributed os-gi applications in a cloud
Apache con 2011 provisioning distributed os-gi applications in a cloud
 
Apache con 2011 provisioning distributed os-gi applications in a cloud
Apache con 2011   provisioning distributed os-gi applications in a cloudApache con 2011   provisioning distributed os-gi applications in a cloud
Apache con 2011 provisioning distributed os-gi applications in a cloud
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS Cloud
 
Continuous Delivery in the Cloud
Continuous Delivery in the CloudContinuous Delivery in the Cloud
Continuous Delivery in the Cloud
 
Oscon anatomy of_os_cloud_ecosystem
Oscon anatomy of_os_cloud_ecosystemOscon anatomy of_os_cloud_ecosystem
Oscon anatomy of_os_cloud_ecosystem
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
 
Apache Ignite - Distributed Database Orchestration
Apache Ignite - Distributed Database OrchestrationApache Ignite - Distributed Database Orchestration
Apache Ignite - Distributed Database Orchestration
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Operating the Hyperscale Cloud
Operating the Hyperscale CloudOperating the Hyperscale Cloud
Operating the Hyperscale Cloud
 
An Introduction to Azure IaaS
An Introduction to Azure IaaSAn Introduction to Azure IaaS
An Introduction to Azure IaaS
 
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
 
Introduction and hacking OpenStack, Pycon India
Introduction and hacking OpenStack,  Pycon IndiaIntroduction and hacking OpenStack,  Pycon India
Introduction and hacking OpenStack, Pycon India
 
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
 

Mehr von David Bosschaert

Mehr von David Bosschaert (10)

Node MCU Fun
Node MCU FunNode MCU Fun
Node MCU Fun
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
 
What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
 
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
 
OSGi Cloud Ecosystems
OSGi Cloud EcosystemsOSGi Cloud Ecosystems
OSGi Cloud Ecosystems
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
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
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert Group
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Distributed Services - OSGi 4.2 and possible future enhancements

  • 1. Distributed OSGi and Possible Future Enhancements David Bosschaert Marc Schaaf david.bosschaert@gmail.com marc@marc-schaaf.de OSGi DevCon Europe 2009 - Zürich
  • 2. About Us ● David Bosschaert ● Works at Progress Software in Dublin (previously IONA Technologies) ● Member of the OSGi Enterprise Expert Group ● Coding Open Source projects ● Marc Schaaf ● Student of computer science at the University of Applied Science in Hannover, Germany ● Currently writing his masters thesis on a possible integration of asynchronous messaging into OSGi
  • 3. Distributed OSGi (Remote Services)
  • 4. Remote Services New OSGi Specifications, based on the Distributed OSGi RFC 119. 1. Remote Services, which specifies the standardized properties for service remoting. Will be released this summer as part of OSGi 4.2 2. Distribution Service Admin API’s. Contains standard API’s for interacting with the Distribution Provider and Discovery Providers. Will be released before the end of the year.
  • 5. Demo of Remote Services Client Side OSGi container Server Side OSGi container (Felix) (Equinox) Core OSGi Bundles Core OSGi Bundles Library Bundles Library Bundles DOSGi Bundles DOSGi Bundles (Apache CXF) (Apache CXF) My App Interfaces Bundle My App Interfaces Bundle ook My App Consumer Bundle My App Service Bundle egistry H Service R red by invokes creates provides trigge publishes svc OSGi proxy svc remote service metadata remote remote endpoint publishes Discovery invocation service
  • 6. Asynchronous Messaging in OSGi An integration approach
  • 7. Project Lightsabre – Aims OSGi Container OSGi Container OSGi Container OSGi Container “Normal” Bundle “Normal” Bundle Mediation Component Mediation Component Queue or Messaging System Messaging System Topic Already existing / /Legacy Already existing Legacy Application Application
  • 8. The OSGi EventAdmin ● EventAdmin ● OSGi internal mechanism for (asynchronous) event based communication with topic semantic EventAdmin Service Push Events SendingBundle EventAdmin Impl. Receive Events Deliver Events ReceivingBundle EventHandler Service ● Events consist of a topic and an arbitrary number of key:value pairs ● An EventHandler can provide a filter to select the events he wants to receive
  • 9. EventAdmin Based Integration Idea: Introduce an “Event Distribution System” (EDS) which mediates between the EventAdmin and the MoM OSGi Container OSGi Container Events Messages EventHandling Service EventAdmin Configuration Receiving Bundle Service EventAdmin EDS MoM Sending Bundle EventAdmin EventHandling Service Service Events Messages
  • 10. EventAdmin Based Integration ● Basic messaging functionality with existing API ● Seamless integration ● Usage of MoM without any knowledge about it ● Drawbacks ● No guaranteed delivery → No reliability ● No error handling, ..... ● Possible solutions ● Use another (new) API ● Extend the existing API (next slide)
  • 11. “Extended” EventAdmin ● Idea: Introduce an extended EventAdmin API ● The additional API could provide guaranteed delivery and could be implemented directly by the EDS ● The old API still enables legacy bundles to use messaging with limited features OSGi Container OSGi Container Extended EventAdmin Service EventHandling Service EventAdmin Service Receiving Bundle EventAdmin EDS MoM Sending Bundle EventAdmin EventHandling Service Service
  • 12. Demo Sending OSGi Container Sending OSGi Container Receiving OSGi Container Receiving OSGi Container Message Producing Bundle Message Consuming Bundle EventAdmin Events EventAdmin EDS EDS ActiveMQWrapper ActiveMQWrapper ActiveMQ Topic ActiveMQ
  • 13. How to Send Messages ServiceTracker st = new ServiceTracker(bctx, EventAdmin.class.getName(), null) { @Override public Object addingService(ServiceReference reference) { eventAdmin = (EventAdmin) bctx.getService(reference); jbSend.setEnabled(true); return super.addingService(reference); } }; Sending an Event Dictionary<String, Object> props = new Hashtable<String, Object>(); props.put("message", jtMessage.getText()); Event ev = new Event("demo", props); eventAdmin.sendEvent(ev); Configuration org.fusesource.lightsabre.name=DemoActiveMqForwarding org.fusesource.lightsabre.direction=send org.fusesource.lightsabre.event.topic=demo org.fusesource.lightsabre.messaging.binding=org.apache.activemq org.fusesource.lightsabre.messaging.url=tcp://localhost:61616 org.fusesource.lightsabre.messaging.subject=DemoActivemqTopic [...]
  • 14. How to Receive Messages Bundle Activator public void start(BundleContext context) throws Exception { Dictionary props = new Hashtable(); props.put(EventConstants.EVENT_TOPIC, "demo"); context.registerService(EventHandler.class.getName(),new DemoMessageReceiver(), props); } Event Handler public class DemoMessageReceiver implements EventHandler { public void handleEvent(Event event) { System.out.println("DemoMessageReceiver: " + event.getProperty("message")); } } Configuration org.fusesource.lightsabre.name=DemoActiveMqForwarding org.fusesource.lightsabre.direction=receive org.fusesource.lightsabre.messaging.binding=org.apache.activemq org.fusesource.lightsabre.messaging.url=tcp://localhost:61616 org.fusesource.lightsabre.messaging.subject=DemoActivemqTopic [...]
  • 15. Conclusion ● Distributed OSGi ● A standardized way to use the OSGi Services model with Remote Service Distribution ● Asynchronous Messaging ● Promising approach as a basis for further research found ● Lightsabre provides a first implementation
  • 16. Thank you for your kind attention OSGi Remote Services Project Lightsabre OSGi Asynchronous Messaging OSGi 4.2 Draft ➔ http://www.osgi.org/Specifications/Drafts ➔ http://lightsabre.fusesource.org Reference Implementation ➔ http://cxf.apache.org/distributed-osgi.html