Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This proposal is to introduce an in-process event bus in the management server and by which achieve event notifications. Scope of the event bus is only with in the management server, so only CloudStack components and extension plug-in's can be subscribers to the events. Goal of this proposal is to have bare minimum mechanism in the CloudStack code, using which more powerful notification mechanism (like SMS, email etc) can be built as CloudStack extensions.

Ideal requirements for such event bus is to be

  • light weight (a library)
  • provide simple interface
  • decouple the publisher and subscriber so that they need not be aware of other
  • powerful enough to provide filters for events of a type to wildcard (all events)

In order for CloudStack be able to generate rich set of events and have clean mechanism to generate events, its important to have state machine associated with every resource that is managed by CloudStack. So another goal of this proposal is to associate with every resource (User VM, Volume, Nic, Network, public IP, snapshot, template etc) with a state machine and generate events as part of the state change.

So the publisher in CloudStack will become that StateListeners associated with the resource.

  • introduce a state machine for all the virtual and physical resources which CloudStack manages and generate an event on state transition
  •  
  • Introduce a light weight event bus
  • wildcard subscription

Use cases

  • Usage/billing engines
  • AMQP
  • CMDB
  • pub/sub notification service

...