notification manager - Openwsman/openwsman GitHub Wiki

Notification Manager

A Notification defined in WS-Eventing can be a real event produced by the event source or a heartbeat event to be sent in a fixed interval. It is an obvious and reasonable idea to put the two functions in two separate threads. So the notification manager can be designed to consist of the notification manager and the heartbeat threads.

To decrease the memory footprintf, the implementation has a single notification manager thread for all notifications. The thread is created when the service is started. The notification mangager thread works for all notifications. It loops for ever until the service is stopped and detects whether there is an event. If an event is detected, a notification sender thread will be created to send the event to the event sink. The notification sender will quit after the send operation is finished. The notification manager is also responsible for subscriptions. If there is a subscription that is unsubscribed or expired, the notification manager will delete it from the memory. If the subscription is unsubscribed, the subscription data will also be deleted from the repository.

If heartbeat is requested in the “subscribe” message, a heartbeat event will be sent in a fixed interval if there is no event from the event source. The Heartbeat generator is also an independent loop thread strarted when the service launches. It generates all heartbeat events in the system. Like the notification manager thread, if there is a heartbeat event, the heartbeat generator will also create a notification sender to send the event to the event sink.

So the notification manager consists of a notification manager thread, a notification sender and the shared heartbeat generator.

[image missing]

⚠️ **GitHub.com Fallback** ⚠️