On Wed, Jan 11, 2012 at 10:31:02AM -0700, Pete Zaitcev wrote:
Hi, Matt:
I am looking at a possible reduction in functionality of iwhd
(e.g. replacing it with Glance, for example). This means ditching
the universal query. So, I'm wondering if it is possible to obtain
a master list of all queries that Conductor issues.
I'm not sure if there's a complete list of all queries that we use.
Martyn could probably speak a little more authoritatively to this than I
could about what's used.
In the logs it looks like Conductor only uses a small set, like
these:
Dec 06 11:16:07 iwhd[31534]: 127.0.0.1.48930 "POST /builds/_query" 50
AND
COMPARISON
OBJECT FIELD target_image
STRING 899459d3-7251-4fab-8de5-3f9ca6efa06e
COMPARISON
OBJECT FIELD provider
STRING mock
If that is all, the whole power of Mongo is not excercised and I can
substitute a simple fixed-form API with no impact on Conductor.
I think we use this _query syntax in a handful of places, to find
objects by linked attributes where a direct query isn't possible. This
is a relatively recent change; we were previously doing horrible queries
equivalent to multiple table scans -- fetch all images, find the one
referencing a particular target image, and so on...
What part of the code is responsible for forming queries? Maybe I
can
just read the code (although it's Ruby).
We use aeolus-image-rubygem for this:
https://github.com/aeolusproject/aeolus-image-rubygem
Most (if not all) of the relevant code lives in
lib/aeolus_image/model/warehouse
I believe Image Factory makes calls into Warehouse as well, though.
-- Matt