IoT Hub: What Use Case for WebSockets?
In this article, we look at why we need WebSockets, how they work and how you can benefit from their implementation in the Scaleway IoT Hub.
This article is the first in a series of articles about the world of the Internet of Things and our new IoT Hub platform, released in “General Availability” in June 2020. With our IoT Hub platform, we wanted to provide you with a robust and interconnectable service with other services so that you can quickly and easily start the development of your IoT solution.
The IoT Hub is available in three offerings: “shared” for free and based on shared infrastructure, “dedicated” for dedicated infrastructure, and “High Availability” for dedicated and replicated infrastructure.
Let us quickly recall what lies behind these three letters, IoT or Internet of Things: Initially called M2M or Machine to Machine in the 2000s, this concept was used to talk about connected machines. Since then, this term has evolved to give way to a new era, that of IoT or objects connected to the Internet, creating at the same time many new use cases.
An IoT solution is above all a 3-link chain.
First the connected object that captures data from the physical world and can act on it. The connected object depends on the environment in which it operates. Thinking about the design of your connected objects is therefore paramount. Is this object mobile, how long will it last, does it need a lot of computing power or on the contrary is it a simple sensor sending information, how much information and how often will it have to send this data, do I need several different types of objects for my solution to be implemented?
Answering all these questions will give you the keys to succeed in designing well the hardware part of your solution.
Then the platform that will centralize the messages sent by the objects and deliver them to the right recipients. Our platform IoT Hub is part of this second chain-link. This one is generic, meaning that it will be able to receive messages from any type of connected object (using MQTT, LoRa or Sigfox communication protocols for example), provide usage data and finally transmit these messages (often called payload) to the right recipient: the business application.
Finally, the application part, dependent on the sector of activity and use cases. It is through this application layer that the end user interacts. It is therefore important that it is adapted for its users, available when they need it, secure, etc...
The IoT Hub is therefore the central link, the IoT platform, which is used to route messages published by other links to their recipient (s).
To develop this platform, we relied on the publish/subscribe pattern which allows massively connected objects to be inter-connected. We have therefore integrated a market standard, the MQTT protocol.
For the short story around MQTT, this data transfer protocol has now become a standard in the communication of connected objects. This communication protocol was invented by two engineers — Andy Standford-Clark (IBM) and Arlen Nipper (Eurotech) to connect pipelines to unreliable satellite networks. At the time, they wanted to design a lightweight, low-bandwidth protocol with multiple service levels (QoS). These requirements are now identical to connected objects, which earned the success of this protocol released in 2011 and became a standard in 2013.
Behind the scenes of the IoT Hub you will find a managed MQTT broker... but not only!
Indeed, we have chosen to integrate other essential bricks to simplify the user journey and be compatible with other communication protocols.
For the messages coming from the connected objects - the inbound side - we find the IoT Networks. These allow you to ingest messages from the IoT networks MQTT, Sigfox and LoRa (through Actility). Other IoT Networks are also being integrated.
On the outbound side, we find the IoT Routes that allow messages to be transmitted to the bricks of the Scaleway ecosystem, to third-party applications or even to other CSP (Cloud Service Provider). #multicloud
Let's see three examples of IoT solutions illustrating how to use the IoT Hub:
We have also developed Kickstarts applications which are ready-to-use images so you can test and build your IoT applications as quickly as possible. Kickstarts will install and configure the tools and software required for you on a Scaleway virtual instance.
As the number of connected objects increases, the risk of a security breach also increases. While maintaining ease of use, we want to provide you with a robust security layer so you can generate a secure certificate key pair per object to establish a secure connection between your objects and your hub. By default, the secure connection is based on mutual authentication of Transport Layer Security (TLS).
To conclude, with the IoT Hub, we wanted to develop a robust, simple, production-ready service for all IoT players. Do not hesitate to test now, in a few minutes and at no cost, the IoT Hub with our "shared" offer. Happy discovery!
In this article, we look at why we need WebSockets, how they work and how you can benefit from their implementation in the Scaleway IoT Hub.
IoT devices are characterized by being smart, omnipresent, and connected. They handle and are conscient of sensitive data when integrated into users’ personal lives.