Notification Support

The DSB implements and provides Web service notifications support as defined in the OASIS WSN specifications. It focuses on Web service Base Notification, Web service Topics and Web service Resources.

The current section describes how it is implemented and how it can be used by clients.

High level Architecture

The WSN library used to provide WSN support is described here. This library provides all the basic features needed to provide a simple and efficient notification support in any runtime. The DSB provides two different WSN implementations, the first one is provided by a DSB component (Petals JBI component) and the second one is a native WSN support inside the DSB kernel.

Sequence description

  • Step 1: Interested parties subscribes to some notification by sending a WSN Subscribe message to the DSB Notification Producer interface. The information needed is the Topic name and the endpoint reference which will be in charge of receiving WSN notification messages when new messages are posted to the specified topic.
  • Step 1' : The Notification producer forward the subscribe request(s) to the core engine hosted somewhere in the DSB. When the notification engine receives the subscribe message, it stores all the information needed to contact the subscriber when new messages will be available.
  • Step 2 and 3 : A notification consumer client sends a notifiction message to the Notification Consumer interface. This message is automatically sent to the Notification engine.
  • Step 4 : The notification engine detects that there are some actors which are interested in notifications posted in the given topic. The Notification engine selects an endpoint to send message to. This selection is possible since all the required information has been stored in Step 1' i.e. if the subscriber is a Web service, the notification automatically detects that the notification MUST be sent using the SOAP connector. Based on that deduction, the Notification engine will send the message to right 'protocol binding' component and not directly. This is a key point of the DSB integration: the message will be routed to a DSB service which is able to send the message to the notification subscriber in the right format and protocol i.e. the notification engine is transport and protocol independent.
  • Step 4' : The Protocol binding forward the notification message to the subscriber.

Implementations

DSB component

A specific DSB component is in charge of the WSN stuff. It embeds the core notification engine and expose interfaces defined in WSN such as:

  • NotificationProducer: Subscribe and GetCurrentMessage operations support. Allows to Subscribe to notifications i.e. a client send a Subscribe message with an endpoint reference interested in receiving some notifications. The notification the subscriber is interested in are classified into a WSN Topic and is specified in a Subscribe message element.
  • NotificationConsumer: Notify operation support. The component can receive notification messages through the Notify operation. When the client sends a notify message on a Topic, the notification engine will select all the subscribers which are interested in receiving messages for the given topic and sends notification message to all interested parties. By using the DSB, you do not have to care about the transport to use to send notifications to subscribers, it is up to the DSB to route the message to the right services with the right transport and protocol.

There are some additional interfaces which are exposed and which allows to manage resources such as WS Topics:

  • NotificationProducerResourceProperty. Resources are used to manage topics. With this interface you can get, modify supported topics, ...

DSB service 

The WSN engine is also embedded as a core kernel service. It means that a DSB developer can use WSN features in his core services to subscribe, notify to others core components.

Note : Under development

Using notifications

In this part, we describe how notifications can be used with SOAP client and services. A really simple sample is composed of several external actors : Some WS notification subscribers which will receive notifications they are interested in; A notification producer which will be in charge of sending notifications to a topic and the DSB which will route notification messages to the right notification subscribers.

A code sample is available at https://svn.petalslink.com/svnroot/trunk/research/commons/dsb/samples/dsb-wsn-sample/src/main/java/org/petalslink/dsb/sample/wsn/Main.java

It uses Web service clients to send subscribe and notify messages; service exposed with the help of CXF to receive notifications; and the DSB as notification broker.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.