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).
A few weeks ago, we published ObjectBox for Azure Sphere. Today, we are adding IoT sensor data collection to this. It’s a working demonstration that you can run on your machine along with an Azure Sphere board. To jump straight to it, here is the repository.
Forwarding Sensor Data to ObjectBox Database
We added an example to the Azure Sphere ObjectBox repository illustrating how to read IoT sensor data and forward them to an ObjectBox database. For integrating the sensors, the example relies on the Grove Shield library from the manufacturers of Azure Sphere, Seeed Studio. This library makes reading sensor information super simple. Next, the collected sensor data is sent via an ObjectBox REST Client to a device running a ObjectBox database. Here, sensor data can be processed further.
The demo setup comes with a ready-made ObjectBox HTTP server for download. The Azure Sphere client application has to be built from sources as the IP of the server needs to be white-listed here. Please find a step-by-step guide in the repository.
Have a look at the general application architecture to get the gist of the demo:
Browsing collected Sensor Data
Once you collected sensor information like light intensity, temperature, and humidity, you may want to view it. The most simple option is the “ObjectBox Browser” that comes embedded with the ObjectBox HTTP server.
Let us know what you think
So, of course we are looking forward to your feedback again! Do you have a use case in mind that you want to discuss with us? Also, please feel free to open a new GitHub issue if you run into a problem or ask a question tagged ObjectBox on Stack Overflow. And finally, don’t hesitate to share your thoughts on ObjectBox / Azure Sphere with us via Twitter, Facebook, or Mail (contact [at] objectbox . io).
Centralized computing entails a central computer storing and processing all data with multiple machines (clients) accessing it. Decentralized computing has no central instance and data is stored and processed on the machine it is used on. The currently predominant computing paradigm, namely cloud computing, is centralized.
The Internet of Things (IoT) is pushing the industry once again towards a distributed computing paradigm. In this context it is called Edge computing. Edge Computing aims to store and process data on end devices (so called edge devices or nodes) like smartphones, routers, and the IoT end devices. We view Edge Computing as an extension of the cloud, adding value and functionality on the edge of the network.
The Azure Sphere is foremost an operating system for “small chips”, or more exactly, Internet-connected microcontroller units (MCUs). It was developed by Microsoft for Internet of Things (IoT) applications and comes with integrated cloud security services. As of today, it runs on a MT3620 MCU produced by MediaTek in collaboration with Microsoft.
Microsoft Azure, Microsoft’s cloud solution is closely related to the Azure Sphere. Security and user management, configuration and deployment can be analyzed and modified using that web interface.
ObjectBox on Azure Sphere
There were a couple of reasons why we at ObjectBox support Azure Sphere:
Edge Computing needs to work within an ecosystem from very small to medium sized devices in order to be scalable.
Furthermore, we looked at the lifetime costs: Firstly, we chose Azure Sphere, because it can save maintenance costs. Secondly, because there is one unified interface to the platform, the platform itself may be used for any task imaginable (e.g. facility management, real time inventory, etc.). Thirdly, Microsoft’s security solution provides Over-the-air (OTA) updates. Therefore, it takes care of keeping the operating system up to date for you.
These use cases exemplify a key consequence of using the Internet of Things in everyday devices: they may not only read and analyze sensor data, but also control the machine they are attached to, even autonomously. In connection with intelligent algorithms, these devices are able to make far-reaching decisions and thus maximize overall efficiency.
Benefits of ObjectBox on Azure Sphere
ObjectBox can greatly simplify the process of data collection, transmission, and processing. Let’s now see how ObjectBox is able to solve common problems encountered when integrating IoT into any kind of environment.
Let’s now see how ObjectBox is able to solve common problems encountered when integrating IoT into any kind of environment.
Scalability, i.e. integrating new devices into a fleet of existing ones, can be challenging because of the gigantic amount of data it generates and that must be transferred to a high-level entity. ObjectBox’s speed advantage provides a solution to this. Confirmed by 3rd party reviewers, ObjectBox outperforms alternatives in all areas. Thus, it offers higher rates for data transmission, storage and retrieval.
ObjectBox is created from developers for developers. Because ObjectBox’s programming interfaces are exceptionally easy to use, development time can be minimized and first prototypes can be delivered after a very short time.
Additionally, it is necessary to make sure data is always up-to-date and prevent unintentionally storing redundant or meaningless data. Our synchronization feature, coming up soon, will solve that out-of-the-box for you.
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 on Azure Sphere with us via Twitter, Facebook, or Mail (contact [at] objectbox . io).
Today, we are bringing the power of ObjectBox to Go. 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.
Speed: Processing on the device instead of sending to the cloud and waiting for an answer is way faster (latency)
Offline-capability: Edge devices can operate independent from a network / cloud connection
Real-time communication on the edge: Edge devices can communicate between each other directly, which can be done much faster due to the short distances and also more efficient as the power and information of several devices can be combined (for more info see: ultra low latency networks, peer-2-peer, M2M actions)
Vivien: What is EdgeX and where are you at with it?
Michael: EdgeX Foundry is a vendor neutral open source platform containing a collection of micro services that take care of different aspects of what you’re going to need to have an edge computing platform. If you’re making IoT devices, you don’t want to reinvent that layer of the stack. Having that common platform for IoT is something that is going to benefit everybody. The Linux Foundation is a neutral umbrella over EdgeX. Inside the project are all the member companies who are actually funding the development, putting developers and marketing resources in, to make it an actual, usable product for everybody. That’s the model of the project and the actual code itself. The main goal of EdgeX is processing and transporting data between IoT devices and sensors and things in the cloud and on the backend. The focus is on being able to respond locally as much as you can, so that you don’t have the latency of going on the cloud and back. And also, being able to continue working, if you loose that connection.
Jim: EdgeX is a an open source platform containing a collection of micro services that take care of different aspects of what you’re gonna have to do to have an edge computing platform. Any of those are semi-dependent: You can replace anything you need to replace. For the status of the project: We just had a year of fast pace growth and we have rewritten everything in Go, so all of our processes are a lot smaller and more efficient now.
Vivien: How are you currently tackling local on-device data persistence?
Jim: We currently use Mongo DB as the persistence engine although we could support almost any kind of persistence store at the edge as long as it was small enough. We also have used SQLite in the past for a couple of customers. However, Mongo DB is the largest element in our portfolio of services. There are a couple of reasons why we are probably going to offer an alternative to Mongo with our next big release in spring 2019: Footprint, licensing, and lack of support for ARM32.
Michael: As we are a collection of microservices, you can always swap out individual pieces depending on what your needs are.
Vivien: Is EdgeX and its components restricted to certain licenses?
EdgeX builds on Apache 2
Jim: EdgeX is an Apache 2 license open source project, so we prefer Apache 2 level or at least a compatible license, because we want to be very business friendly. We want people to take the application and use it in all sort of settings, including actually embeddeding it in gateways. We also want to be very decoupled at discrete points.
For example, if I’m a company like Dell and I use EdgeX. If some of my customers have an absolute demand that a certain database be at the heart, then I want to be able to choose the database, depending upon the customers, the use cases, and the environment that they find themselves in. EdgeX is all about the flexibility. So, for this example, we offer what we call a reference implementation database. Customers or users could take EdgeX and replace elements with their own technology, which may not be open source even.
Michael: You can take what’s open source and add proprietary file systems or hardware depending on what your specific needs are. EdgeX tries to be that common open source base. It provides all of the functionality in a open source license but that still lets you replace bits as needed with whatever it is that you want to run.
Vivien: Can you give us an example how and where EdgeX is currently used?
Jim: There are over 70 companies now that are part of the EdgeX community and each group is using it differently. There are some that are serving EdgeX as the Red Hat model: they are providing distribution, services and support behind EdgeX. A company like mine, Dell, we’re trying to find a platform that actually goes on our gateway. So we’re going to build a commercial version of EdgeX for our own platform. There will be pieces that we will replace based on better performing mechanism to some of our cloud based products. Then you have other groups out there that are proving particular services for EdgeX, for example edge analytics. There are lots of different service capabilities where we see potential replacements. Then there are companies like Samsung that uses EdgeX in their factory floor to help run their automation. So, they are users, but they also want to make sure EdgeX meets their needs. Our community is made of snowflakes, they are all very special *laughs* – common goals but different use cases for almost everybody that is part of the organization.
Vivien: That sounds really cool. In your opinion, moving the data to the edge, what is the edge, where do you see the data ending up, for example more on the sensor level or gateway level?
Latency concerns, cost of shipping up the data, and the ability to actuate locally are key reasons why you have to have edge software.
Vice Chair of the Technical Steering Committee, EdgeX
Jim: We absolutely believe EdgeX is a mechanism for the edge. While you could run pieces of EdgeX on the cloud, we do not believe is what the future holds. There are gonna be certain use cases where that works, but latency concerns, the cost of shipping up the data, and the ability to actuate locally are all key ingredients and reasons why you have to have edge software and edge platforms. Now, these are gonna get smaller. At Dell, we are manufacturing gateways of different sizes, because we know that certain use cases are gonna dictate a larger box and other are going to dictate something like a Raspberry Pi or even smaller. We have companies in our foundry that are looking at running parts of EdgeX in things like PLCs, to help address their realtime needs. So, we absolutely believe that the edge is very much going to be a part of our IoT environments. There are going to be use cases that dictate different levels of compute all the way up from sensors to cloud.
Michael: And all of our member companies see a need for that platform, but that platform is not going to be their product or their service. So everybody wants it to exist, so everybody is gonna work together to make it exist, so that they can build their own value-add on top of that or below their device level. Everyone agrees that this is an important thing, that we have to have a solution there for all the innovation that people see on the horizon.
Markus: So, small device level versus gateway – would you say your current focus is on the gateway?
Levels of Edge Computing
Jim: I would say that it really isn’t that one or the other is more important. You’re gonna have situations, as we know from a Dell perspective, where what we call a brownfield device (e.g. a 1979 modbus engine) needs a gateway, because it doesn’t have the ability to communicate into any kind network otherwise. So there has to be a gateway that provides that first level of compute. There are other things that are evolving in the industry: think of say windmill generators, where there is lots of capability right there at the device level, there is a lot of compute built right into those systems. So things will run at that level, and then you have everything in between. Even something like BLE or Zigbee type of environments where there is wifi and ability to connect directly to a network. Typically, we’re finding organizations are reluctant to allow those kind of things to connect into their major networks without some security, apparatus and analytics to see what’s going on, so as not to create problems in their larger networks. So even there, a gateway may be necessary, not because of hardwiring or physical connections, but because you want some insurances in place at the edge before that data leaks on up to your enterprise.
It’s the worst way to build our product except for all others.
Vice Chair of the Technical Steering Committee, EdgeX
Vivien: What’s the worse about open source that you’ve experienced?
Jim: *laughs* Now you are going to make me say some things in front of Brett and Michael as members of the Linux foundation… There is a quote by Winston Churchill that talks about democracy, saying it’s the worst form of government except all others. I kind of feel the same way about open source development. It’s the worst way to build our product except for all others. Because it does take time. It’s a community effort and anything done by a community automatically seeks a ground where it’s going to be the best and brightest product. So you get the best input from everybody, but it takes time. It’s easier for say something like Dell to go marching off and build a software solution that they think is the best. It will get there faster but it’s not necessarily going to get there in a way that the world and communities accept more easily. So anything built by many hands is going to take a little bit more time and a little bit more process. But it ends up getting a lot better results I think in the end.
Michael: Whenever you have a community building something you can’t just come in and say “This is what you’re gonna build” because they don’t have to do what you say. And that’s true even with EdgeX. Everybody who is working on it is working for a company invested in it, but there is no one person who can say this is what you’re all going to do. So it’s not enough to say just what you want done. You have to explain and justify why and get people to buy into that. And that takes more effort, but you have to know that what you’re proposing is the right solution, that it’s going to work. If you can’t explain that, you can’t communicate that to the community then it’s not going to get done. As Jim said, it takes time but at the end product is going to be better.
Jim: In this case with IoT, I will tell you that no one company will be able to provide it all. As Dell, we would love to be the company providing it all… (laughter) We have learnt the hard way that in an IoT landscape there are going to be certain things in the company that you can’t touch and IoT has to touch everything. Maybe it’s the network, hardware or operating systems, particular sensors and protocols. You can help to persuade customers to do some things in your way, but you’re never going to be able to get them to do everything in your way and that’s why IoT takes an ecosystem. Which is why we think the second part of EdgeX is so important; our product is important, but just as vital is the ecosystems. We have a collection of companies all trying to work together to provide for interoperability. That is just as important as the actual end product we develop.
No one company will be able to provide it all.
Vice Chair of the Technical Steering Committee, EdgeX
Vendor lock-in is not going to work in IoT.
Developer Advocate, Linux Foundation
Michael: Vendor lock-in is not going to work in IoT. There is no way any company is gonna be able to provide all the needs of somebody. So having an equal playing field for everybody, having that common ground that anybody can come to and interact with anybody else, is what’s going to allow us to fulfill the promise of IoT in general.