BMO/Pulse

From MozillaWiki
< BMO
Jump to: navigation, search

NOTE: This service has been disabled and replaced with a simpler, more secure mechanism.

Description

Christian Legnitto has done some excellent work in writing a Bugzilla extension which pushes Bugzilla changes to pulse. See bug 589322.

Synchronicity

Currently pushes from the extension are sent synchronously. As this may cause more delays when updating bugs, the extension needs to perform asynchronous pushing.

The simplest solution to this would be to insert events into a table, which is then processed in order by a new daemon, or by job-queue. This approach has several advantages:

  • no additional software required to be installed (such as RabbitMQ)
  • ensures messages are not pushed if the Bugzilla transaction is rolled back
  • offloads error management and retry from the main Bugzilla UI

Issues

A large issue with the current almost-complete implementation is the large number of dependencies the Net::RabbitFoot module has (see deps.cpantesters.org/?module=Net%3A%3ARabbitFoot&perl=5.8.8&os=any+OS). With upstream Bugzilla work we've learned that there are a lot of modules which are no longer under maintenance, so we always try to keep the dependencies down to a minimum (this is an issue we have encountered a large number of times). Concerns have been raised about this aspect of the implementation, and whether we're better off switching Net::RabbitFoot for a more simplistic (and lesser featured) AMQP module (such as a POE based daemon using POE::Component::Client::AMQP).

glob writes: My thinking on this is we split the module into two components: the BMO extension which will introduce no new dependencies to the webheads by itself; it will be triggered by events on bugs (as per the current code) and will write a serialized description of the event to a table. A POE daemon could easily be written using POE's AMQP client to poll the table for new entries, and push the updates to pulse. This will significantly reduce the initial deployment impact, and ongoing maintenance risk.

Development

The extention which Christian started has been rewritten to achieve the following goals:

  • simplifying the code by using perl's reflective capabilities
  • split the bugzilla hook/serialisation from the amqp sending code
    • the bugzilla extension inserts into a table, which is polled by a poe daemon
  • the push daemon will support multiple connectors:
    • pulse (amqp)
    • elastic search cache