Tag Archives: C API

Using the FoundationDB C API

Click to Read

I’ve been wanting to spend some time lately sharpening my C coding skills and also diving deeper intoFoundationDB’s functionality. If you are unfamiliar with FoundationDB, it is a new breed of NoSQL database that I’m really excited about. As far as C programming goes, I consider myself on a beginner/intermediate-level – many of the nuances and such are not exactly obvious to me yet.

FoundationDB does expose a C API and the documentation is pretty robust in detailing what functionality is there and some best practices for what to do. While looking for some examples to study and base my code on, I found there really wasn’t much to go on. This is likely due to FDB’s own “disclaimer” that the C API truly is a low-level interface and let’s face it: you are probably going to use something a bit higher-level, like Python/Java/.NET to more efficiently crank out a usable app. However, I was able to find one example, which I was almost able to run as-is in my environment – a majority of the work to get it to run correctly involved configuring XCode to properly find the FDB library for linking.