The ObjectBox C API is here, as requested by IoT C/C++ developers. ObjectBox’s efficiency is a perfect match for the Internet of Things with its resource-restricted devices and need for offline capability.

The ObjectBox C API allows C/C++ developers to create data-driven apps that run cross-platform including all major x64 and ARM32 platforms. With its ARMv6 and ARMv7 support, it provides a superfast and scalable database for devices like the Raspberry Pi (from low-end Pi Zero to the Pi 3B+). At the same time, you can also target desktop and server apps running on Linux, MacOS, or Windows.

To get started, please have a look at the objectbox-c GitHub page. Here’s the TL;DR version for your bash:

This will clone the repository, download ObjectBox binaries for your platform, and run a script that compiles a test project and runs it. At the end of the output, you should see a line like this:

As next steps, you could have a look at the README.md and the provided example.

We did some quick performance tests with a Raspberry Pi 3B and benchmarked typical database operations with bulk data. The metric is objects per second (compares to ~records/rows of relational databases):

  • Put (insert data): ~110,000
  • Get (load data): ~2.8 million
  • Remove (delete data): ~350,000

As you can see, ObjectBox allows you to operate on hundreds of thousands of data points per second. For “get”, you can operate on millions of objects per second. This is where ObjectBox is “cheating”: a get is almost a no-op; it just provides an object address with zero copy semantics. Thus, if object data is already available in RAM, it behaves similarly to an in-memory database. Of course, ObjectBox uses the disk when necessary. All this happens automatically and adapts to the resources of a device. These efficiency gains are also a great way to reduce power consumption.

P.S.: Over the next weeks, we will announce several IoT related products and also release more benchmarks. Stay tuned!

P.P.S.: As always, please continue to share your feedback with us.

 

Get your free Data Sync Trial now 
x