This post is a part of course From beginner to expert in IoT, so if you’re interested, more information you will find inside the link.
When I’m thinking about IoT, first that come to mind are devices and cloud. Why? Most of the devices are connected to the Internet, but most of them don’t need any specific traits to connect to the Internet, such as smartphones, because we as people can manipulate them manually.
What about sensors or other specific objects that are residing inside the machine? Can you manage them? Yes. Is it easy to do that? No. Here’s come problem, we will build own infrastructure to handle this? Probably, no. It’s expensive to build and additionally manage the whole infrastructure that adds extra expenses.
So, what about “borrow” some features or infrastructure from another company? It’s called cloud computing.
Cloud has many benefits, but for me, scalability is the most valuable. It’s mean that for this same service in your own data center you will pay less than in cloud? It depends. Cloud will remove fixed costs, but transfer it to variable costs, this is scaling.
So, why it’s a good way to transfer or start working with cloud and IoT together? Most of the solutions are implemented on Azure, AWS or GCP, and you don’t need to reinvent a wheel again. For me as a developer, it’s a huge speedup of deployment a solution and scale devices and messages as I want without worrying that I will not have enough power to compute data that come from sensors.
The last time colleague told me about a project where he implemented the solution in cloud gathering 10 million events per second. How much of it is? IoT Hub in Azure with the highest configuration provided by Microsoft for 24 h was empty in less than 5 minutes! So, with the highest permissions (10 IoT Hubs per account) this project not even warmed up 🙂
So question to you. You have enough resources to build your own data center to handle this?
Security is taken seriously, very seriously. The device can be rejected because contain USB port that project doesn’t need. During the building infrastructure, we can extract four roles:
Integrator – the manufacturers of IoT hardware that provide your device on which you will work. Integrator watching for whether it is hardware has minimum requirements is tempered proof, build around secure hardware such as encrypted storage and devices provide secure updates.
Developer – working on adapting devices with the cloud, manufacture by developing business concepts. The main aim of developers is using the right language, platform, tools or open-source frameworks.
Deployer – a third role which deploys solutions to devices, cloud and if needed, in the field. Deployer secure devices in unsecured places, check device temper-proof of the device and secure authentication keys for each device even after deployment
Operator – the role of maintenance, which working on holding infrastructure. The operator keeps the system up-to-date, audit, protect cloud credentials or against vector attacks.
Most know the implementation of security aspects in transferring data from A to B is TSL (Transport Layer Security) which is the next generation of protocol that deprecated SSL (Secure Sockets Layer). We need some kind of verification of our connections to prevent others to listen, steal or change data that come to the system. One of the solutions is asymmetric encryption or X.509 Certification which is supported by TSL.
We can send raw data to the system, we can process these data on board so we need some verification methods to prevent unauthorized access. This brings us to answer the question, where data are processed or when I should process our data?
Cloud and Edge computing
Cloud and Edge computing describe how you can build your own solution based on requirements. How to lower the cost of infrastructure and where you can place one of these approaches.
Cloud computing is most known, all we need to just put everything in the cloud and we can celebrate a win! Not exactly. Cloud-based requirements can be tricky, you can pay more than before (of course, if you have own data center) due to “data” you want to transfer or hold in the cloud. Most of the data is useless, only after preparation, you can say you have good data to work on.
What do I understand by useless data? Data that nothing change in the system or after a few second is incorrect, you want to hold logs that are okay, or filter and looking at an unusual one, such as alerts or critical errors? On the other hand, some system work in the real-time environment, where is unacceptable is to perform request few seconds, we want these data now. What’s the solution?
Edge computing is this kind of solution where we have a central unit which connects devices with cloud and performs changes on data that come through this device. Do you want to have basic data analytics in real-time? Okay, edge computing will process it for your devices and then send data for further deep understanding patterns in the cloud, but at this moment you have a lot of savings due to preprocess data and apply filters. Good example gave Olivier Bloch with Cameron Tomisser in the implementation of Vision AI.
How does it look like from my point of view? How much work do I need to implement and deploy a simple project? Good question, here comes “as a service” to deal with it.
IaaS, PaaS, SaaS or serverless?
IaaS(Infrastructure as a Service) can be described as, here’s you have everything that you need, good luck. In most cases, it’s meant that you need rent server to emulate virtual machines to do certain work.
PaaS(Platform as a Service) is this kind of service where you know how infrastructure can be implemented, but you don’t want to develop each part on your own. Gateway to connect devices with cloud – IoT Hub or Cloud IoT Core. Prediction? Azure Machine Learning or Cloud ML, and so on.
SaaS(Software as a Service) is the next approach in a row, in this approach you don’t need to develop anything, you just pay for software. Office 365 or IoT Central are examples of this approach.
Serverless for me is a special kind of “service” because it’s some kind of bridge between PaaS and SaaS. In this approach, you can create small pieces of code, put them in the cloud and will do their work. One of the examples is the Azure Function which is very useful in IoT. I used functions somehow as a message broker to prepare them as input for analytics and application.
Device Management can be divided into two ways, we are building own system or we use an existing one. PaaS vs SaaS, which one wins? If you have enough resources to build your own system that fits into your requirements, but you will need a cross-functional team from embedded developers (building firmware for devices) through developers to build system and end on cloud architects.
I’ve tried each one role. I used C/C++ to build firmware for devices, C# for the application (system), Azure with architecture to build a whole system which can interact D2C (Device to Cloud) and with commands C2D (Cloud to devices). With D2C mostly you will send raw data (or through edge computing) and with C2D invoke commands such as reboot, change intervals of messages, update or change mode as I did with my devices, which devices can switch between client (send data), server (gather data from other devices) or both.
The second option is SaaS, at this moment I know two solutions Azure IoT Suite and IoT Central. IoT Suite can be deployed without any knowledge and ready to go after a few minutes, if you want to dig deeper inside the system, you can download the source code from Github and change this architecture as you want. IoT central is a full SaaS approach where you need a developer that will implement firmware on devices, that’s it from hard work.