zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <br...@yahoo-inc.com>
Subject RE: ZooKeeper 3.1 and C API/ABI
Date Wed, 04 Feb 2009 23:01:54 GMT
you are correct we usually increment the version number on an API breakage. in the olden days
if you called a function with less parameters than expected, a null would get passed. if this
still happens we are ABI compatible. (i haven't tried it though...)

ben

________________________________________
From: Chris Darroch [chrisd@pearsoncmg.com]
Sent: Wednesday, February 04, 2009 11:27 AM
To: zookeeper-user@hadoop.apache.org
Subject: ZooKeeper 3.1 and C API/ABI

Hi --

   I notice that 3.1.0 is on its way and it includes ZOOKEEPER-255 which
adds the Stat structure as a parameter to the zoo_set() C call.  This is
a valuable change and I don't want to hold it up.

   However, I thought I should point out that this kind of change
breaks the API and ABI.  For major Apache C projects like the APR,
such breakage is allowed only with a major version number change:

http://apr.apache.org/versioning.html#source

   Following such guidelines, I suppose, the old zoo_*set() functions
would remain as-is until 4.0.0, and parallel zoo_*set2() or
zoo_stat_*set() functions would add the new functionality.


    Now, fair do's, ZooKeeper may not care as much as APR or httpd,
since it's mostly a Java project.  At a minimum, though, it would be
excellent if there was compile-time versioning information available
so that external projects could check and, at a bare minimum, fail to
compile if the API/ABI has changed.  APR has some useful guidelines
making compile-time constants (e.g., ZOO_MAJOR_VERSION) available:

http://apr.apache.org/versioning.html#vsncheck

   Speaking personally, one really nice aspect of working with APR
for me is the parallel installation framework.  Again, this might be
overkill for ZK, but I'll just point it out as well:

http://apr.apache.org/versioning.html#parallel

Chris.

--
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B

Mime
View raw message