- Launchpad Entry: NovaSpec:melange-notifications
- Contributors: troy-toman
This spec is derived directly from the Nova Notifications System spec. NotificationSystem
Melange has a need to make notifications available to users in as close to a real-time manner as is feasible. The proposed solution is to implement a PubSubHubbub (PSH) mechanism where Melange will create notifications in standard Atom 1.0 format and notify the PSH hub, and clients subscribe to the appropriate notifications to receive updates when their are notifications waiting.
Melange should not implement a hub from scratch, since there are several reference hubs available. In most cases, it will just talk to the same hub that would be set up for Nova.
We need to be consistent in how we push notifications with the other OpenStack components (notably Glance and Nova.)
As a Melange administrator, I need to receive notifications in a timely manner so that I can respond to emergencies.
As a Melange administrator, I need to support multiple clients for content easily so that I do not need to use my resources to develop individual interfaces.
As a systems integrator, I want to receive timely updates of usage data and disperse them to various customers (both internal and external) for billing, decision support, and analytic purposes.
- Services or components that produce notifications MUST make those notifications available in Atom 1.0 format.
- There MUST be a central configuration setting that defines zero or more hubs to be used for notifications.
- If there is at least one hub defined for notifications, then the service or component Atom feed MUST contain the link to the hub: <link rel="hub" … />
- If there is at least one hub defined for notifications, then the service or component SHOULD notify the hub when new notification(s) are available. See http://code.google.com/p/pubsubhubbub/wiki/PublisherClients for example code.
- The PSH hub MUST behave according to the PSH specification (with the possible exception of the access controls defined below).
- The <atom:content> element SHOULD contain structured data in a standard format (technically, this is a requirement on the service producing the notification; however, the notification service should validate that the <content type=""> is valid).
Following the Nova convention, there will not be an API for events. Events will be available in the queue only.
Melange should not have to develop a hub from scratch; a number of hubs have been implemented and are available in open-source format. This page lists some available hub implementations:
While the PSH protocol does not formally support access control (it is, of course, intended to be a publication system), some users have implemented ACLs on top of it. Melange should implement one of those systems on top of its chosen hub.
- PSH for Private Feeds
- Suprfeedr uses a publisher callback mechanism. See also http://blog.superfeedr.com/pubsubhubbub-api/, where they describe the publisher callback extension in more detail.
- Discussion on access controls at the PSH website
The implementor should choose one of these methods that best fits the current Melnage authentication pattern(s).