<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hey guys,</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Monsyne Dragon and myself are proposing an implementation for notifications going forward. Currently my branch exists under <a href="https://code.launchpad.net/~cerberus/nova/nova_notifications">https://code.launchpad.net/~cerberus/nova/nova_notifications</a>. you'll
 see that's it been proposed for merge, but we're currently refactoring it around changes proposed at the summit during the notifications discussion, which you can see at
<a href="http://etherpad.openstack.org/notifications">http://etherpad.openstack.org/notifications</a></div>
<div><br>
</div>
<div>At the heart of the above branch is the idea that, because nova is about <span style="font-weight: bold">
compute</span>, we get notifications away from Nova as quickly as possible. As such, we've implemented a simple modular driver system which merely pushes messages out. The two sample "drivers" are for pushing messages into Rabbit, or doing nothing at all. There's
 been talk about adding Burrow as a third possible driver, which I don't think would be an issue.</div>
<div><br>
</div>
<div>One of the proposals is to have priority levels for each notification. What we're proposing is emulating the standard Python logging module and providing levels like "WARN' and "CRITICAL" in the notification. Additionally, the message format we're proposing
 will be a JSON dictionary containing the following attributes:</div>
<div><br>
</div>
<div>
<div>publisher_id - the source worker_type.host of the message.</div>
<div>timestamp - the GMT timestamp the notification was sent at</div>
<div>event_type - the literal type of event (ex. Instance Creation)</div>
<div>priority - patterned after the enumeration of Python logging levels in</div>
<div>               the set (DEBUG, WARN, INFO, ERROR, CRITICAL)</div>
<div>payload - A python dictionary of attributes</div>
</div>
<div><br>
</div>
<div>
<div>Message example:</div>
<div><br>
</div>
<div>    { 'publisher_id': 'compute.host1',</div>
<div>      'timestamp': '2011-05-09 22:00:14.621831',</div>
<div>      'priority': 'WARN',</div>
<div>      'event_type': 'compute.create_instance',</div>
<div>      'payload': {'instance_id': 12, ... }}</div>
</div>
<div><br>
</div>
<div>There was a lot of concern voiced over messages backing up in any of the queueing implementations, as well as the intended priority of one message over another. There are couple of immediately obvious solutions to this. We think the simplest solution is
 to implement N queues, where N is equal the number of priorities. Afterwards, consuming those queues is implementation specific and dependent on the solution that works best for the user.</div>
<div><br>
</div>
<div>The current plan for the Rackspace specific implementation is to use PubSubHubBub, with a dedicated worker consuming the notification queues and providing the glue necessary to work with a standard Hub implementation. I have a very immature worker implementation
 at <a href="https://github.com/Cerberus98/yagi">https://github.com/Cerberus98/yagi</a> if you're interested in checking that out. </div>
<div><br>
</div>
<div>We'll be going forward with this plan immediately, but we'd love feedback if you have it. Questions, comments, concerns are very much welcomed!</div>
<div><br>
</div>
<div>Matt Dietz</div>
</body>
</html>