Upcoming C API changes planned for version 6.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.

4 Likes

Since you have re-design ‘fdb_create_database()’:
Maybe it would be possible to pass “fdb.cluster” via memory?

I can see the appeal of making changes to the API simultaneously, but I don’t think that this feature will be able to land in time for that to happen. It’s something that I think requires some discussion to make sure that we’re happy with what we end up with, but it’s not currently in the priority list for things to be changed in 6.1, and I don’t believe we intend to add much else to that release that’s not currently in the roadmap for it.

My hope is that this won’t be too big of a deal API-wise, though, because this proposed feature would be an addition rather than a change.