IWHD API Suggestions

Jeff Darcy jdarcy at redhat.com
Wed Sep 7 13:00:11 UTC 2011


On 09/07/2011 05:05 AM, Martyn Taylor wrote:
> I don't quite understand here.  Does Image and Build not have a 
> parent/child relation, at least in a RESTful resource sense?

I can't comment on what might or might not be true in a "RESTful
resource sense" but I feel compelled to ask: how many "parents" might an
object have?  In one sense an Image's parent might be its class, in
another sense it might be a Build, in another sense it might be
something else entirely.  Only one of these can be its parent as far as
iwhd is concerned - mapped onto a directory if the backing store is a
filesystem, a bucket if it's S3/Swift, etc.  Of particular import here
is how replication policies (inherited from parents) are defined.  If we
say that the Build is the parent, then how we define selective
replication policies that make sense?  Defining them on each Build
doesn't seem very useful, so we'd probably have to implement multi-level
inheritance from the Build's own parent.

Overall, I'd say that calling the Build a parent is misleading and
counterproductive.  We can talk about providing graph-DB functionality
to list inbound links etc. without turning every referrer into a parent,
and I think that is more likely to yield a useful result.


More information about the iwhd-devel mailing list