Why We Need Virtual Devices in the Internet of Things

AKBlog, From our Fouder0 Comments

This is part a of a series where I elaborate on why software engineers in the IoT space need virtual devices, and why I think that problem is not solved yet. In my last post, I discussed where I came up with the solution.

In this post, I’d like to dive into why I don’t think that this problem is solved yet. I think that the way that we have to solve the current virtualization issues in IoT is with machine learning. Being a geek, I admit that I just plain like the idea of using machine learning in anything. Being an engineer, I like that machine learning is the simplest solution to a complicated problem.

That being said, it might seem a little like hitting a nail with a sledge hammer. It’s not. Just look at the alternatives to testing implementations of physical devices:

  1. Mocks and stubs

A mock is when you build yourself some mock data to use for testing. A stub is a programmatic stand in for your device. Ideally, both solutions are the bare minimum necessary to provide you with something to use to interact with your code before your device is ready.

Unfortunately, mocks and stubs are rarely “bare minimum” in reality. You can spend weeks on them, and because your human brain can’t think of all of the possible scenarios to use to test, they can still be fairly limited. They are good for unit tests, but not for any later stage testing, such as functional, integration, performance, or user acceptance because the scenarios in later stage testing are so complicated that writing good mocks and stubs for them is prohibitively time consuming.

2.  Simulation templates

There are many IoT platforms that provide simulations. I consider them to be dressed up mocks and stubs. The hard knowledge, all possible scenarios, still has to come from you. You just don’t have to provide as much of the code. Since you as a human are not going to know or have all possible scenarios cataloged, simulations run into the same late stage testing challenges as mocks and stubs. Again, good for early stage, bad for late stage.

3. Digital twins

Several of the big boys have their version of a digital twin device. This methodology emerged from device management. The twin must be tied to a physical device. Because of this, they don’t have the same flexibility in early design and testing. Unlike simulations, mocks, and stubs, they are great at late stage testing, but they are pretty bad at early stages. No device, no tests.

Plus, because they are tied to the physical device, they can be difficult to set up and tear down. If you are having to manage that, you might find yourself saying “I’m just going to go write me some mocks and stubs.”

4. Mathematical simulations

These are great. With a mathematical simulation, you build out a mathematical model of the data, run the model and use the resulting data to drive development and testing. They are amazing and super useful, but unfortunately, they need good mathematicians and a firm understanding of the underlying physical models. The development costs are front loaded here, you have the upfront cost of the mathematical model, and then its maintenance. While some vendors of simulation technology are building hooks to make it easier to integrate that data into your development and tests environments, it’s usually left to the developer to integrate and then maintain the integration of the model. The tools to do this are usually pretty expensive, so while this is the most realistic method of simulation, that realism does not come cheap. You have to spend a lot of cash on people and tools, putting it out of reach of most developers.

My team and I are building a different type of simulation tool. Using machine learning derived from the human genome, we are building “Adaptive Virtual Devices.” Adaptive virtual devices are better than mocks and stubs because they are more realistic. They are better than digital twins because they provide more flexibility during early stage testing, and they are easier to integrate than traditional mathematical simulations. If you’d like to use and play with some adaptive virtual devices, you can download my prototype today.

Thank you for reading, if you have a question, leave me a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *