Difference between revisions of "DIS-Broker"

From Gcube Wiki
Jump to: navigation, search
(Introduction)
(Implementation Details)
Line 11: Line 11:
  
 
'''registerTopic''' (RegisterTopicMessage)
 
'''registerTopic''' (RegisterTopicMessage)
 +
 
This operation allows the DILIGENT services to publish their Topics in the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap, where the mappings between topics and the producer EPR are stored. In the case of pending subscription requests, this method subscribes consumer to the given EPR. It also automatically registers existing consumers interested in the topics to newly registered producers. The RegisterTopicMessage parameter contains:
 
This operation allows the DILIGENT services to publish their Topics in the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap, where the mappings between topics and the producer EPR are stored. In the case of pending subscription requests, this method subscribes consumer to the given EPR. It also automatically registers existing consumers interested in the topics to newly registered producers. The RegisterTopicMessage parameter contains:
 
*EndpointReferenceType producerERP: the producer EPR that exposes the Topics;
 
*EndpointReferenceType producerERP: the producer EPR that exposes the Topics;
Line 16: Line 17:
  
 
'''unregisterTopic'''(RegisterTopicMessage)
 
'''unregisterTopic'''(RegisterTopicMessage)
 +
 
This operation allows the DILIGENT services to un-publish their Topics (or a part of them) from the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap. If no more services expose the same Topics, it removes the entries referred by the given Topics from the internal collection and it un-subscribes all the related consumers. The parameter is the same described in the RegisterTopic operation.
 
This operation allows the DILIGENT services to un-publish their Topics (or a part of them) from the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap. If no more services expose the same Topics, it removes the entries referred by the given Topics from the internal collection and it un-subscribes all the related consumers. The parameter is the same described in the RegisterTopic operation.
  
 
'''subscribeToTopic'''(SubscribeMessage)-> EndpointReferenceType []
 
'''subscribeToTopic'''(SubscribeMessage)-> EndpointReferenceType []
 +
 
This method allows consumers to subscribe to a particular Topic (without knowing the EPR of the producers). The consumer is subscribed to all services that expose the given Topic: then it is up to consumers to filter the inappropriate notification message.  A consumer can also subscribe itself to a Topic that has not yet published on the DIS-Broker: in this case, the subscription request remains pending until a service registers the given topic. It will also be subscribed to newly appearing producer, even after a successful subscription.
 
This method allows consumers to subscribe to a particular Topic (without knowing the EPR of the producers). The consumer is subscribed to all services that expose the given Topic: then it is up to consumers to filter the inappropriate notification message.  A consumer can also subscribe itself to a Topic that has not yet published on the DIS-Broker: in this case, the subscription request remains pending until a service registers the given topic. It will also be subscribed to newly appearing producer, even after a successful subscription.
 
According to the Java WS Core implementation of the WS-Base Notification specification. the producer is in charge to send notifications to consumers. Whilst the DIS-Broker is in charge of dispatching subscription requests to the appropriate producers. The SubscribeMessage parameter contains:
 
According to the Java WS Core implementation of the WS-Base Notification specification. the producer is in charge to send notifications to consumers. Whilst the DIS-Broker is in charge of dispatching subscription requests to the appropriate producers. The SubscribeMessage parameter contains:
Line 27: Line 30:
  
 
'''listTopic'''()-> String[]
 
'''listTopic'''()-> String[]
 +
 
This method retrieves the list of topics managed by the DIS-Broker Service
 
This method retrieves the list of topics managed by the DIS-Broker Service
  
  
 
'''listTopicForNotifiers'''(EPR)->  String[]
 
'''listTopicForNotifiers'''(EPR)->  String[]
 +
 
This method retrieves the list of topic the given EPR notiifier is managing.
 
This method retrieves the list of topic the given EPR notiifier is managing.
  
 
'''getSubscribersForTopic'''(Topic) -> EndpointReferenceType []
 
'''getSubscribersForTopic'''(Topic) -> EndpointReferenceType []
 +
 
This method retrieves the list of Subscribers EPRs currently subscribed to the given topic.
 
This method retrieves the list of Subscribers EPRs currently subscribed to the given topic.
  
  
 
'''removeSubscription'''(SubscribeMessage)
 
'''removeSubscription'''(SubscribeMessage)
 +
 
This method allows consumers to remove the subscription to a particular topic. The service updates its internal status and destroys the Subscription Reference on the consumer side. The parameter is the same described in the SucbrcibeToTopic operation.
 
This method allows consumers to remove the subscription to a particular topic. The service updates its internal status and destroys the Subscription Reference on the consumer side. The parameter is the same described in the SucbrcibeToTopic operation.
 +
 +
==Dependencies==
 +
 +
The dependencies of the DIS-Broker Service are:
 +
*DILIGENTProvider: to publish WS-Resource Properties in the DIS
 +
*DIS-IP: to publish WS-Resource Properties in the DIS and to register WS-Resource Properties in the DIS.
 +
*DVOS Authentication API
 +
*DVOS Delegation Service
 +
*DVOS Common Library.

Revision as of 11:24, 1 June 2007

Introduction

This DIS-Broker is a WSRF service that adopts the singleton pattern. It provides subscription-brokering capability allowing to a client (i.e. the client part of a service) to subscribe to a topic without knowing the location of the notification producer (the Endpoint Reference identifying it). Moreover, the DIS-Broker service supports the subscription to a topic that the producer has not yet exposed. In this case, it maintains the pending subscription until the notification producer registers its topic. The implementation of this service is not based on the brokered notification schema since the DIS-Broker subscribes the consumer directly to the notification producer. In that way there is not a central service that is in charge to receive notifications from producers and to deliver them to the right client (as in the brokered notification architecture). However, the DIS-Broker continues its mediation even after the brokerage of the subscription. In fact, the DIS-Broker automatically manages the relocation of notification producers by forwarding the client subscription requests to the new instances of the producers. This service implementation supports the transparent subscription/re-subscription of the client to the new producer instances that comes up after the initial request of subscription.

Implementation Details

The DIS-Broker Service exposes a set of operations for topic registration/unregistration and for subscription/unsubscription. Even if these methods can be directly accessed by calling the DIS-Broker service, it is mandatory to use the DIS libraries, i.e. the DIS-IP and the DIS-HLS-Client (the related methods are described in DIS-IP and DIS-HLS-Client sections), to be connected to the VO specific instance of the Service. The operations implemented in the DISBrokerService class are:


registerTopic (RegisterTopicMessage)

This operation allows the DILIGENT services to publish their Topics in the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap, where the mappings between topics and the producer EPR are stored. In the case of pending subscription requests, this method subscribes consumer to the given EPR. It also automatically registers existing consumers interested in the topics to newly registered producers. The RegisterTopicMessage parameter contains:

  • EndpointReferenceType producerERP: the producer EPR that exposes the Topics;
  • VectorStub topicVector: a vector of Topics that the producer wants to register.

unregisterTopic(RegisterTopicMessage)

This operation allows the DILIGENT services to un-publish their Topics (or a part of them) from the DIS infrastructure. It updates the service status by modifying the collection, named topicMapping HashMap. If no more services expose the same Topics, it removes the entries referred by the given Topics from the internal collection and it un-subscribes all the related consumers. The parameter is the same described in the RegisterTopic operation.

subscribeToTopic(SubscribeMessage)-> EndpointReferenceType []

This method allows consumers to subscribe to a particular Topic (without knowing the EPR of the producers). The consumer is subscribed to all services that expose the given Topic: then it is up to consumers to filter the inappropriate notification message. A consumer can also subscribe itself to a Topic that has not yet published on the DIS-Broker: in this case, the subscription request remains pending until a service registers the given topic. It will also be subscribed to newly appearing producer, even after a successful subscription. According to the Java WS Core implementation of the WS-Base Notification specification. the producer is in charge to send notifications to consumers. Whilst the DIS-Broker is in charge of dispatching subscription requests to the appropriate producers. The SubscribeMessage parameter contains:

  • EndpointReferenceType clientEPR: the consumer EPR;
  • String topic: the topic (as a serialized String of the topic QName);

If the DIS-Broker already manages the given topic, the service returns the list of topic notifiers.


listTopic()-> String[]

This method retrieves the list of topics managed by the DIS-Broker Service


listTopicForNotifiers(EPR)-> String[]

This method retrieves the list of topic the given EPR notiifier is managing.

getSubscribersForTopic(Topic) -> EndpointReferenceType []

This method retrieves the list of Subscribers EPRs currently subscribed to the given topic.


removeSubscription(SubscribeMessage)

This method allows consumers to remove the subscription to a particular topic. The service updates its internal status and destroys the Subscription Reference on the consumer side. The parameter is the same described in the SucbrcibeToTopic operation.

Dependencies

The dependencies of the DIS-Broker Service are:

  • DILIGENTProvider: to publish WS-Resource Properties in the DIS
  • DIS-IP: to publish WS-Resource Properties in the DIS and to register WS-Resource Properties in the DIS.
  • DVOS Authentication API
  • DVOS Delegation Service
  • DVOS Common Library.