Distributed Services - OSGi 4.2 and possible future enhancements

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    6 Favorites & 1 Group

    Distributed Services - OSGi 4.2 and possible future enhancements - Presentation Transcript

    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

    + David BosschaertDavid Bosschaert, 4 months ago

    custom

    801 views, 6 favs, 1 embeds more stats

    In the first part of this talk David Bosschaert wil more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 801
      • 772 on SlideShare
      • 29 from embeds
    • Comments 0
    • Favorites 6
    • Downloads 0
    Most viewed embeds
    • 29 views on http://osgilook.com

    more

    All embeds
    • 29 views on http://osgilook.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags

    Groups / Events