launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04808
Re: generic job queue cronjob?
-
To:
launchpad-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Ian Booth <ian.booth@xxxxxxxxxxxxx>
-
Date:
Mon, 27 Sep 2010 23:43:13 +1000
-
In-reply-to:
<AANLkTi=HQD6Ha1C22t6b79-NAtVO70i2ow+OuX2jODRg@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11pre) Gecko/20100927 Shredder/3.1.5pre
>
> Right. I was wondering if Launchpad was going to (now, or later)
> change to just sending "this branch tip changed" and then have the
> recipients decide what to do with that. For instance, we want to
> update precalculated mp preview diffs when the branch changes.
> Ideally, in a message system, the branch scanner wouldn't need to know
> anything about that, only the job that's subscribed to those events.
> If we want to take that direction perhaps it's better not considering
> it only as a task dispatch system?
>
This of course is the standard publish/subscribe pattern and one I am
personally fond of. It can and does work well in many situations where
there is a need for true decoupling between producer and consumer. Care
is needed however not to overuse the pattern or use it as a panacea for,
or in lieu of, proper workflow modelling and, where needed, direct
point-point handoff or other coupling mechanisms. I've been on projects
where overuse of this pattern has lead to race conditions, data
consistency issues and other such nasty effects. Don't get me wrong -
the pub/sub pattern definitely has its place - but if it hasn't already
been done we should ensure that the various collaborating services and
associated dataflows are well understood. As a perhaps contrived example
based on the quoted email above, there would be issues if a branch
change event triggered a diff update as well as downstream task which
itself expected the diff update to be completed before it runs. There
would obviously need to be some coordination between the two downstream
consumers of the branch change event publication.
I don't think this has been mentioned yet (?) but another reason why a
message queuing implementation is often used for this type of purpose is
to handle things like: load balancing, quaranteed message delivery (ie
when the recipient is down), quality of service requirements etc. These
features of course contribute towards high availability and allowing
SPOF to be designed out of the system.
Just some more 2c from me.
References
-
generic job queue cronjob?
From: Edwin Grubbs, 2010-09-16
-
Re: generic job queue cronjob?
From: Julian Edwards, 2010-09-17
-
Re: generic job queue cronjob?
From: Aaron Bentley, 2010-09-17
-
Re: generic job queue cronjob?
From: Julian Edwards, 2010-09-21
-
Re: generic job queue cronjob?
From: Aaron Bentley, 2010-09-21
-
Re: generic job queue cronjob?
From: Robert Collins, 2010-09-21
-
Re: generic job queue cronjob?
From: Ian Booth, 2010-09-23
-
Re: generic job queue cronjob?
From: Aaron Bentley, 2010-09-23
-
Re: generic job queue cronjob?
From: Martin Pool, 2010-09-23
-
Re: generic job queue cronjob?
From: Aaron Bentley, 2010-09-24
-
Re: generic job queue cronjob?
From: Martin Pool, 2010-09-24