Tianming GUO

RICM5

1.      PUB-SUB Introduction
2.     Protocols & API
3.     PubSub-as-a-Service Providers

4.     Démonstration

  • Publisher(Editeur)
  • Mediator(diateur)
  • Subscriber(Abonné)

1. Sub-pub Introduction

RÔLE

Publisher

Mediator

Subscriber

caractéristique

  • Content-based routing
  • TCP /UDP/Multicast UDP /Broadcast (in LAN)/mix
  • LAN/WAN
  • Realtime / Non
  • QoS / Non
  • Centralisé/Distribué 
  • Atomicité
  • Médiateur/Direct

1. Sub-pub Introduction

Publisher_1

Publisher_2

Mediator

Subscriber_1

Subscriber_2

Subscriber_3

Subscribe(x)

Subscribe(x)

Subscribe(y)

Publish(x)

Publish(y)

Notify

Notify

Notify

1. Sub-pub Introduction

2. PROTOCOLS & API

OSGi Event-Admin service -- Apache felix

        String[] topics = new String[] {
            "com/acme/reportgenerator/GENERATED"
        };
        
        Dictionary props = new Hashtable();
        props.put(EventConstants.EVENT_TOPIC, topics);
        props.put(EventConstants.EVENT_FILTER, "(title=samplereport)");
        bundleContext.registerService(EventHandler.class.getName(), new ReportEventHandler() , props);
public class ReportEventHandler implements EventHandler
{
    public void handleEvent(Event event)
    {
        String reportTitle = (String) event.getProperty("title");
        String reportPath = (String) event.getProperty("path");
        
        sendReportByEmail(reportTitle, reportPath);
    }

deck

By Tianming Guo

deck

  • 795