← Back to team overview

launchpad-dev team mailing list archive

Re: RabbitMQ and codehosting

 

-----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.

For a merge proposal, the ideal is that when they propose the merge, a
diff appears on the next page immediately, despite the fact that the
diff is generated on a separate machine.  We can use AJAX to get close
to that.

For upgrading a branch, the ideal is that it starts upgrading immediately.

> When we know that, is there maybe some
> other change we can do, instead of bringing in yet another moving part
> to Launchpad?

I don't think so.  It's no coincidence that Muharem presented a Job
system as a use case at the Epic.  Polling will never be as responsive
or efficient as messaging.

> For example, how often do you poll today? Can we increase the frequency,
> so that it is like on-demand.

I believe we usually poll every 5 minutes.  With bzr send handling, we
need two scripts to run, so the time is cumulative.

For update_preview_diff, we're polling every minute.  I think that
polling more frequently would not be a responsible use of resources.
These scripts take about 10 seconds to start up, so 10 seconds is the
lower bound for polling.

> Also, I don't know that much how RabbitMQ works. If you have that, how
> will RabbitMQ start the right Job?

There are a number of options:
- - We can specify the job type in the message
- - We can have a separate channel for each script
- - The job system can be updated so that it can run any Job.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrOV8wACgkQ0F+nu1YWqI27mgCfZC96cXPSb4nTRvh06XkY1y39
UM4AoIdYoHJIzK/2VxvuUbC/IRWGXPHH
=lwS7
-----END PGP SIGNATURE-----



Follow ups

References