By: Tim Harsch - tharsch
2004-03-23 19:11
Hi all,
My name is Tim Harsch, I've been working on a Perl interface to the DRMAA C binding. My approach is simple, use SWIG to
write a wrapper generator. I've just completed with alpha and plan to start calling for help from the Grid Engine
developers list, to review my progress.
Andreas asked me to post some comments from my experience about the API. I have no working knowledge of what has
discussed to come up with DRMAA, so this will be from a user stand point.
First, overall the spec is well defined and the documentation good. I feel there are places where the documentation of
the C binding could have been cleared up, mostly just a few places where the English and grammer were confusing.
I only things I can think of now that need improvement are:
* I believe for each use of a char * buffer that the user should not allocate the buffer themselves, but that DRMAA
should do it for them. This would remove the associated size_t buffer length parameter from the binding and all the
BUFFER_SIZE constants. and simplify the interface a lot, in some functions it would remove two parameters because there
are two buffers passed in (eg drmaa_wait )
* The attributes iterators lack some functionality (see SGE bug 908 for some background). Currently there attributes are
of two types, vector and non-vector. I would like to see one type, where non-vector are really just a vector of one.
And there would be functions to add and delete from the list of values for any one attribute. Any attribute where it
does not make sense to have more than one value would return an error if more than one were attempted to be set. Or just
silently ignore attempts to put a second value in attributes that can handle only one. This would reduce the number of
functions for dealing with attributes, the confusion of the naming of the functions for dealing with attributes ( It
took me awhile to comprehend which functions were for which type of attributes, because there are 'names' iterators,
'value' iterators and vector functions can use both, etc. ).
Well, I guess that's all I can think of for now... HTH