[openstack-dev] [Glance][Artifacts] Artifact dependencies: Strict vs Soft

Arnaud Legendre alegendre at vmware.com
Tue Feb 25 19:19:28 UTC 2014


Hi Alexander, Thank you for your input. 

I think we need to clearly define what a version means for an artifact. 
First, I would like to comeback to the definition of an artifact: this broader audience might not be aware of this concept. 
As of today, my understanding is the following: 
An artifact is a set of metadata without any pre-defined structure. The only contract is that these artifacts will reference one or many blocks of bits (potentially images) stored in the Glance storage backends. 
With that in mind, I can see two types of versions: metadata version and the version of the actual bits. 
I think the version you are talking about is a mix of two versions you I mention above. Could you confirm? 

Now, I have another question: you mention that you have can several versions of an artifact accessible in the system: does that mean that the previous versions are still available (i.e. both metadata and actual blocks of data are available)? Can I rollback and use version #1 if the latest version of my artifact is version #2? Based on your question, I think the answer is Yes in which case this comes with a lot of other issues: we are dealing with block of data that can have big sizes: you need to give the ability to the user to say: "I want to store only the last 2 versions and not the full history". So, to answer you question, I would like to see an API which is providing all the versions available (accessible) for a given artifact. Then, it's up to the artifact using it to decide which one it should "import". 

Thanks, 
Arnaud 



----- Original Message -----

From: "Alexander Tivelkov" <ativelkov at mirantis.com> 
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org> 
Sent: Tuesday, February 25, 2014 3:57:41 AM 
Subject: [openstack-dev] [Glance][Artifacts] Artifact dependencies: Strict vs Soft 

Hi folks, 

While I am still working on designing artifact-related APIs (sorry, the task is taking me longer then expected due to a heavy load in Murano, related to the preparation of incubation request), I've got a topic I wanted to discuss with the broader audience. 

It seems like we have agreed on the idea that the artifact storage should support dependencies between the artifacts: ability for any given artifact to reference some other artifacts as its dependencies, and the API call which will allow to retrieve all the dependency graph of the given artifact (i.e. its direct and transitive dependecies) 

Another idea which was always kept in mind when we were designing the artifact concept was artifact versioning: the system should allow to store different artifact having the identical name but different versions, and the API should be able to return the latest (based on some notation) version of the artifact. Being able to construct such a queries actually gives an ability to define kind of aliases, so the url like /v2/artifacts?type=image&name=ubuntu&version=latest will always return the latest version of the given artifact (ubuntu image in this case). The need to be able to define such "aliaces" was expressed in [1], and the ability to satisfy this need with artifact API was mentioned at [2] 

But combining these two ideas brings up an interesting question: how should artifacts define their dependencies? Should this be an explicit strict reference (i.e. referencing the specific artifact by its id), or it should be an implicit soft reference, similar to the "alias" described above (i.e. specifying the dependency as "A requires the latest version of B" or even "A requires 0.2<=B<0.3")? 
The later seems familiar: it is similar to pip dependency specification, right? This approach obviosuly may be very usefull (at least I clearly see its benefits for Murano's application packages), but it implies lazy evaluation, which may dramatically impact the performance. 
In contrary, the former approach - with explicit references - requires much less computation. Even more, if we decide that the artifact dependencies are immutable, this will allow us to denormalize the storage of the dependency graph and store all the transitive dependencies of the given artifact in a flat table, so the dependency graph may be returned by a sinle SQL query, without a need for recursive calls, which are otherwise unavoidable in the normalized database storing such hierarchical structures. 

Meanwhile, the mutability of dependencis is also unclear to me: ability to modify them seems to have its own pros and cons, so this is another topic to dicsuss. 

I'd like to hear your opinion on all of these. Any feedback is welcome, and we may come back to this topic on the Thursday's meeting. 


Thanks! 


[1] https://blueprints.launchpad.net/glance/+spec/glance-image-aliases 
[2] https://blueprints.launchpad.net/glance/+spec/artifact-repository-api 


-- 
Regards, 
Alexander Tivelkov 

_______________________________________________ 
OpenStack-dev mailing list 
OpenStack-dev at lists.openstack.org 
https://urldefense.proofpoint.com/v1/url?u=http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=5wWaXo2oVaivfKLCMyU6Z9UTO8HOfeGCzbGHAT4gZpo%3D%0A&m=p6%2F5LWbuDtV6ZeR2XDpWSDIAO91xoGxjIvFTiGSUsx8%3D%0A&s=28b9108941ca902bab4841c1cae5287ba4d253953b5b43f8d1b6ce13f8cc843d 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140225/a00eb2b1/attachment.html>


More information about the OpenStack-dev mailing list