← Back to team overview

launchpad-dev team mailing list archive

Re: RabbitMQ and codehosting

 



On Fri, Oct 9, 2009 at 6:10 PM, Gavin Panella <gavin.panella@xxxxxxxxxxxxx> wrote:
On Thu, 08 Oct 2009 17:21:20 -0400
Aaron Bentley <aaron@xxxxxxxxxxxxx> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bjorn Tillenius wrote:
> My question would be, why do you need to run Jobs on demand; what's the
> end-user visible change here?

The end-user visible change is that there is no lag between them
requesting an operation and the operation starting.

Do the various polling scripts have to connect to the database? If so,
and if the only message that needs to be sent is "there's something to
do", then PostgreSQL's LISTEN and NOTIFY might be enough to help
reduce lag without introducing new moving parts:

 http://www.postgresql.org/docs/8.4/interactive/sql-listen.html
 http://www.postgresql.org/docs/8.4/interactive/sql-notify.html

Stub might have reasons not to though, and I have no idea if it works
with replication.

I tend to think proper messaging infrastructure would serve us better and be more reliable though than implementing our own messaging system. We can work around the lack if we want (and have for the last few years using database tables and polling), but shouldn't we just do things properly?

So yes, listen/notify work fine. But by the time we have put together a decent interface and worked out how to handle disconnections and outages and written the tests and worked out how to monitor that listening processes actually are reacting as they should we are well on the way to cobbling together our own half-baked solution to avoid a moving part we know we are going to have to adopt anyway (for example to communicate with internal canonical systems such as the login service even if we don't make use of it ourselves).

--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/

Attachment: signature.asc
Description: OpenPGP digital signature


References