[Planetlab-devel] design choices

Thierry Parmentelat thierry.parmentelat at sophia.inria.fr
Fri May 30 07:27:46 EDT 2008


At the present stage of 5.0, I have 3 similar mechanisms: attributes  
are attached to slices (or slivers); settings are attached to  
interfaces; and tags are attached to nodes. So there are 3 almost  
identical entities in the DB named SliceAttributeTypes,  
InterfaceSettingTypes, and NodeTagTypes.
There also are LinkTypes, that are used similarly in the [in]link  
mechanisms (I only have ilinks so far)

It seems rather easy and feasible to unify all this with a single  
notion, say TagType.
This would be a bit disruptive in terms of the API, but as Marc said,  
we can expect these features to be mostly used by admin people.

==
Moving forward in this direction, and to bring an older thread back to  
life, I have a very strong feeling that we should start designing the  
API into 2 levels. The low-level functions would be very close to the  
underlying (DB) implementation, possibly very generic and flexible,  
while the high-level would provide more strongly typed abstractions.  
For example the low-level would provide the routine Add/Update/Delete/ 
Get stuff, and the high-level stuff would use that; -or- we could keep  
the low-level stuff for 'simple' objects, and build the rest (nodes)  
in the upper-layer.
So far we only have one level, and that's what get published as an  
API; so changing the implementation inevitably impacts the API, and  
thus we're kind of stuck.

===
For example, even without talking of other types of nodes, right now  
it's extremely painful to set a tag on a node.

a. you'd like to say something like
SetNodeTag('onelab04.inria.fr','arch','x86_64')

b. but with the API at it is now, you need to
- check if the tagtype exists, or create it
- check if that node has the tagtype or not, create it if needed
- set the value

(of course, 'arch' is a special case, we could also add 'arch' in the  
set of fields that a node is supposed to have; that's how I expect it  
to look like ultimately)

====
If there's interest, we could meet on IRC later today, to talk about  
all this, and/or what's currently in the trunk in case of questions/ 
concerns/wishes etc..




More information about the Devel mailing list