FoundationDB

Upcoming C API changes planned for version 6.1

bindings

(A.J. Beamon) #1

We’d like to announce some planned C API changes for the upcoming 6.1 release that will in particular affect users of the C API (e.g. bindings writers). While code written against API version 600 will continue to work in 6.1, you will not be able to support API version 610 until you have adopted these changes. I don’t currently have a timeline for the release of 6.1.

The general idea behind these changes is to eliminate the Cluster object from our API, requiring users to directly create a Database instead. I believe the original purpose of the Cluster was to allow opening multiple named databases, but this feature is not implemented and the only database name supported is ‘DB’. There are no plans to support multiple named databases, so we are opting to simplify the API going forward.

More specifically, the changes affecting the C bindings are as follows:

  • fdb_create_cluster, fdb_cluster_create_database, fdb_cluster_set_option, fdb_cluster_destroy, and fdb_future_get_cluster have all been removed.
  • Added fdb_create_database that creates a new FDBDatabase object synchronously and removed fdb_future_get_database

To see the release notes for this change, which also detail the API changes for the bindings that are part of this repository, see here.

If interested, you can reference the updates in these bindings to see how the C API changes were incorporated and how backward compatibility was maintained (with a minor exception in the Java bindings). The full pull request is here. The changes have been merged in to the master branch, so you can begin testing your code with them immediately.

If you have any questions about how to incorporate these changes or concerns about the new API, feel free to ask them here.