As of today, you’ll be able to start using ObjectBox from the comfort of Python.
Whether you’re building an IoT solution, a desktop utility or a webservice, you’ll find the ObjectBox database handy to help you with data persistence on the edge. Among other features, ObjectBox provides implicit ACID transactions so there’s one less thing you have to worry about.
Let’s take a look at an example to see how ObjectBox lets you work with your data using Python:
Aside from x64 CPUs, ObjectBox supports ARMv6 and ARMv7, allowing you to benefit from a super-fast and scalable database on IoT devices, for example, the Raspberry Pi family (from the minimalistic Pi Zero to the high-spec Pi 3B+). You can also target desktop and server apps running on Linux, MacOS, or Windows using Python.
ObjectBox Python: How to get started
While this is still an early release in Python, it’s based on the proven ObjectBox core so you can already start building your applications today. Just install using
ObjectBox now runs on the EdgeX Foundry IoT Edge Platform. Utilizing ObjectBox’ speed and ease of use, EdgeX users can now compute millions of data points on the edge with minimal latency. ObjectBox’ small footprint of less than 1MB makes the database uniquely optimized for high performance on IoT edge devices and gateways, as well as fog nodes. Combining the speed and size advantages of ObjectBox on the EdgeX platform, we empower companies to analyze more data locally on the machine, faster than ever before.
As an object oriented database, ObjectBox is the perfect solution for structuring data within complex data models, from artificial intelligence and machine learning applications, as well as image recognition software that is beginning to be used more commonly on the edge.
With ObjectBox-backed EdgeX we’re bringing the efficiency, performance and small footprint of ObjectBox to all EdgeX applications. It is fully compatible, so you can use it as a drop-in replacement. And if you call against existing REST or Go EdgeX APIs, you do not need to change the code. Our version is based on the latest sources leading to EdgeX 1.0, which is scheduled for June. And once EdgeX 1.0 is finalized, we will be ready to upgrade the ObjectBox Edition to 1.0 right away.
Get started with ObjectBox EdgeX
The simplest way to get started is to fetch the latest docker-compose.yml and start the containers:
You can check the status of your running services by going to http://localhost:8500/. At this point, you have the REST services running at their respective ports, available to access from your EdgeX applications.
Last not least, we are always happy to hear from you. Post any questions you may have on stack overflow tagged ObjectBox. Please share your thoughts on ObjectBox EdgeX with us via Twitter, Facebook, or Mail (contact [at] objectbox . io).
If you’ve ever needed a database for your iOS app, you’ve probably had to manage schemas, tables, query strings and all sorts of overhead. Moreover, whenever you wanted to modify the structure of your database, you had to write migration code so that your users’ data would be upgraded to fit the new structure.
Wouldn’t it be nice if your database just did all that for you, automatically? That was what we thought when we designed ObjectBox. ObjectBox thinks the way a Swift developer does: You take your objects and stick them in a box. You use regular Swift methods and operators to search for objects in your database. You add or remove fields and the database just copes with it. And you can use it right now.
We’re happy to share our first Swift version of the ObjectBox database for iOS and macOS! We want to give you a Swift “native” API without any ObjectiveC legacy shining through, which is why we decided to put Swift, with its unique language features, first. We really want your feedback on this to improve swiftly, for example on our query API (more details below):
Today, we are bringing the power of ObjectBox to Golang. Whatever solution you are building, be it a web service, an IoT/IIoT solution, or any data-driven application, you will benefit from the efficiency and speed of ObjectBox (see benchmarks below). Let us know what you think!
Let’s look at some code, and see how ObjectBox persists Go structs (objects):
The ObjectBox Go API allows you to create data-driven cross-platform apps. ObjectBox supports x64 and 32 bit ARM (ARMv6 and ARMv7) CPUs, enabling you to benefit from a super-fast scalable database on IoT devices, industrial edge gateways or, for example, the Raspberry Pi family (from the minimalistic Pi Zero to the high-spec Pi 3B+). At the same time, you can now target desktop and server apps running on Linux, MacOS, or Windows using Go.
How to get started
To get started, please have a look at the ObjectBox Go docs. Here’s the TL;DR version for your bash:
go install github.com/objectbox/objectbox-go/cmd/objectbox-gogen/
go test github.com/objectbox/objectbox-go/...
This will clone the repository to your GOPATH, download the objectbox-c library and install the ObjectBox code generator.
At this point you can start using ObjectBox in your project – just define a struct you want to persist, add
//go:generate objectbox-gogen comment in the same file and run go generate ./… on your project. See Getting started for more details.
We have done some quick CRUD performance tests to give you an impression about the speed ObjectBox provides. On a i7-8850H CPU, ObjectBox consistently processes over 1.5 million CRUD operations per second with 4.4 million object reads per second:
To put these numbers into perspective, we also did a comparison using an edge computing platform and two leading NoSQL databases. We won’t spill the names and final numbers just yet, as we are going to release all the details very soon. ?
Disclaimer: ObjectBox was the only database running in embedded mode, which is not supported by the others in this setup. Obviously this can have a significant impact on performance. On the other hand, this is the most resource friendly mode of operation (RAM and CPU), which might be very relevant if you target restricted ARM32 devices.
This is the first public version of ObjectBox for Go and we are more than excited to get your feedback on it. We have prepared a short questionnaire for you, which should only take 1-2 minutes. Your feedback is extremely valuable to make ObjectBox a fun tool to use.
While this initial release covers all basic features, the native core of ObjectBox offers much more than what is currently exposed to Go. For example, a complete set of query conditions and relations between objects. Also, we will introduce a client/server operation mode. This will allow ObjectBox to run in Containers (e.g. Docker) and in classic server setups. As a major theme, the ObjectBox team is also working on data synchronization across devices. This keeps edge devices and gateways “in-sync”. Sync also enables seamless integration with mobile apps (Android and iOS) pushing relevant data to mobile clients and back. Of course sync will also be available for Go. You can sign up here for updates on sync.
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.