[Openstack] Metadata schema design
Justin Santa Barbara
justin at fathomdb.com
Mon Feb 14 18:29:26 UTC 2011
I've coded support for metadata on instances. This is part of the
CloudServers API, and I needed it for my idea about metadata hints to the
However, Jay Pipes has raised some (very valid) design questions on the
I called the table/entity 'Metadata', and it has two main attributes: 'key'
and 'value'. There's a foreign key to Instances, and long term I'd expect
we'd add more foreign keys to other parent entities. I expect only one of
those parent foreign keys would be populated per row.
1. Are those words too overloaded? Jay suggested (Instance)Properties.
However, then the question arises about the 'core properties' (zone, image,
instance_type for a machine) and why they are not stored in the 'properties'
collection. This is really metadata, and the CloudServers API calls it
metadata. What do people think these should be named? "Metadata"?
2. I imagine that Volumes will also have metadata (long term, probably
everything will - networks, images, instance types, network objects). So
should we have one entity/table or multiple entities (one per parent type)?
I like the idea of one entity, because I think it will yield better code
with less code duplication. From a SQL viewpoint, one per parent entity is
probably more normal though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openstack