[openstack-dev] Treating notifications as a contract

Chris Dent chdent at redhat.com
Wed Sep 10 21:04:52 UTC 2014


On Wed, 10 Sep 2014, Jay Pipes wrote:


> There would be an Oslo library that would store the codification of the 
> resource classes and actions, along with the mapping of (resource_class, 
> action, version) to the JSONSchema document describing the payload field.

This seems reasonable with two caveats:

* What Sandy says about making sure the _actual_ codification was in
   a language neutral format of some kind.
* That we don't limit my other concern (the macro one requoted
   below): Anybody should be able to rock up and dump _new_ notifications
   on the bus given suitable credentials and configuration with
   neither writing of local custom code nor centralized reviewing of global
   code. (I'd really like it to be possible to publish the notifications
   with _only_ credentials and no config and have a reasonable
   expectation of them being captured, but I understand that's not
   very robust and rather pipe dreamy.)

I think it ought to be possible to accomplish both by:

* Having the library you suggest but it reads schema from
   <somewhere> rather than embedding in code.
* Same library can read additional files which contain 'local'
   customizations.

Endpoints then know how to compose and decompose a vast swath of
notifcations.

A nice to have would be that the schema are inheritable.

>>>       * At the macro level standardize a packaging or envelope of all
>>>         notifications so that they can be consumed by very similar code.
>>>         That is: constrain the notifications in some way so we can also
>>>         constrain the consumer code.

Or maybe we should just use RDF and produce a super upper ontology
and consume all the world's knowledge as events? That's been super
successful in other contexts...

-- 
Chris Dent tw:@anticdent freenode:cdent
https://tank.peermore.com/tanks/cdent



More information about the OpenStack-dev mailing list