[Date Prev][Date Next] [Chronological] [Thread] [Top]

c-api comments



Dear all,

In the midst of authmeth crazyness I have some comments
on the c-api draft.


Some important and obviously implementation-dependent data-
types are correctly hidden from the api, especially the LDAP 
and LDAPMEssage types and there are those types where a lack
of  datatype hiding (again imho) is less of a problem; the
LDAPAPIInfo and the berval (see below for comments on BER)
for instance.

However the lack of datatype hiding for LDAPControl, ldapmod
and the underlying assumption throughout the document that
the only container of multiple elements of a given type is
an array of that type seems to be to be unwarranted. What
is the reason for not using more accessor-functions (which
in most cases can be replaced with macros at no performance
penalty)?

I am not making idle remarks, the ldap implementation I am
currently working on uses generic containers for arrays and
hashtables which greatly simplify memory management. Without
accessor-functions it is virtually impossible to adhere to the
c-api as it reads today.

Furthermore: what is the reason for including the BER encoding
and decoding specifications in section 15? Why standardize
this at all -- should not the api hide the details of the
encoding from the programmer anyway? Many studies indicate
that marshalling is often an important performance bottleneck
and it seems inapropriate to have a standard limit the ways in
which an implementor can increase marshalling performance without
there beeing a very compelling reason for doing so.

I have been mulling over this for a while and would very much
like to have some comments on this from the list and especially
from the authors of the c-api draft.


	Best Regards


Leif Johansson				Phone: +46 8 164541		
Department of Mathematics		Fax  : +46 8 6126717		
Stockholm University 			email: leifj@matematik.su.se 	

    <This space is left blank for quotational and disclamatory purposes.>