3.1. IoT Platforms and Blockchain Solutions
The model of Sensing-as-a-Service (S2aaS) consists of four conceptual architectural layers [6
]. Sensor and sensor-owners layer is the deepest layer, which consists of sensor devices that capture data and sensor-owners, who have ownership of the data captured and decide whether to publish the data publicly or not. On top of that lies the sensor publishers (SPs) layer, with main responsibility to detect available sensors, communicate with the sensor-owners, and obtain permission to publish the sensors in the cloud. The next layer is the extended service providers (ESPs) layer, which is an intelligent layer that communicates with multiple SPs and provides added value services, by serving high-level user requests with data provided by multiple SPs. The top layer is the sensor data consumers layer, consisting of all registered sensor data consumers with a valid certificate, who acquire data in return of a proposed fee or offer. Such a model can have a significant impact on computational distribution, increased data collection, and data democratization. However, certain challenges underlie.
The S2aaS concept can be integrated with blockchain by extending the above-mentioned architecture with an extra layer of blockchain on top [8
]. Blockchain uses smart contracts to handle user registration and guarantee anonymity through multiple pseudonyms for each of the users. At the same time, the extra layer handles transactions, managing the task of data purchase between data providers and consumers.
Apart from the S2aaS model, the general case of blockchain and IoT system integration shares a common architecture with that of the S2aaS. IoT is mostly modeled through a three-layer architecture, with a physical layer, a network layer, and an application layer. Each of these layers is vulnerable to certain types of attacks that challenge the security of IoT systems [9
]. Unauthorized access to the network resources, as well as trust management and authentication issues are regarded as some of the most important threats for the network and application layer.
At the same time, there are certain limitations. As is described in [11
], the fact that several nodes of a blockchain network store a full copy of the chain data leads to scalability and storage issues, since these nodes need to fulfill significant storage requirements. An oversized chain can cause negative effects on performance of the whole network processes. The latest work on the field takes into account these threats and limitations and attempts to produce solutions that tackle them.
A solution for blockchain and IoT systems that attempts to solve some common limitations of this combination and achieve scalability, high throughput, transparency and lightweight communication between the blockchain and the IoT devices is proposed in [12
]. A permissioned blockchain is deployed, where nodes in the network are fully mutually trusted, and apply lightweight and fast consensus algorithms like byzantine fault tolerance (BFT) to achieve high throughput. Additionally, they use RESTful interfaces for the communication between IoT and blockchain, offloading the blockchain network from the IoT devices. The transparency and security of transactions is handled through a strict authorization schema. Additionally, the proposed architecture is modular, allowing for changes to a certain layer without affecting the rest of the system.
In another work, the blockchain layer bridges the physical layer of sensor data capturing devices, with the top application layer that provides users with interfaces to access the system’s services [13
]. The blockchain layer combines multiple lightweight nodes that perform cryptographic functions to encrypt the data and provide access to the second part of the layer, which is the private blockchain. This allows authorized-only users to access the blockchain and perform transactions through certain smart contracts. Despite the robustness of this architecture, the fact that it uses an on-chain data storage schema may lead to scalability issues.
Besides scalability, Yu et al. stress the issues of data supervision and management, trust among participating entities, and device lifecycle management in IoT systems [14
]. In the area of smartwatch IoT devices, they propose a solution based on a permissioned Hyperledger Fabric blockchain, which uses smart-contracts to handle data ownership and trading between all stakeholders of this IoT ecosystem, smartwatch owners, manufacturers, and data analytics companies. Thus, the proposed solution addresses the issues of trust and data management and they agree that future research should explore issues of data-privacy and the tradeoff between public verifiability and privacy, as well as effective model delegation.
A great amount of research has focused on the privacy issues that arise, regarding the storage of sensitive personal user data on the blockchain, due to their irreversibility and transparency [15
]. They propose the use of the decentralized peer-to-peer repository, InterPlanary File System (IPFS), as the off-chain storage of the personal data, and they handle the access to this data through a private smart contract, only for administrator users.
A similar use of the IPFS has been proposed as an off-chain storage for sensitive medical data [16
]. IPFS is considered a great fit for this purpose due to the fact that it features high throughput, security with hash mapping of transactions, and concurrent access of transactions by peers in the network. In both [15
], only the content-addressed hash of the data needs to be stored on the blockchain, off-loading it from a great amount of information that can decrease its performance, since blockchains are inefficient for saving large-size data [17
3.2. IoT Sensor Data Handling and Blockchain
Many IoT systems have already been introduced with various sensing data in different use cases all over the world, but there are still many vertically integrated systems which cannot share sensing data horizontally. We have not reached the point yet, where people who need to utilize data from sensors all over the world can efficiently retrieve and use them. The Publish/Subscribe messaging model (Pub/Sub model) is effective as an IoT system that handles various kinds of sensing data. It is a model that matches supply and demand, which is common in such Internet businesses.
This messaging model provides the functionality of sending data to many clients at the same time. In addition, data senders (publishers) and receivers (subscribers) do not depend on each other in the context of this model. This is an important advantage, when many clients connect, aiming to exchange data, because they do not affect each other status. For instance, even if a publisher application is down, a subscriber is able to continue performing his regular operations. The reason behind this is that clients do not connect directly with each other, but via a broker server.
Currently, several Pub/Sub protocols are developed, such as XMPP [18
], MQTT [19
] and AMQP [20
], and more. These protocols are implemented based on the topic-based Pub/Sub model. The notion of a Topic is used and in the context of this paper, we use the Topic’s name to specify the sensor’s name. In our topic-based Pub/Sub model, clients specify the topic name and by the defined convention within a topic’s name, a “/” is used in the expression. For instance, for an environment sensor in a house, the topic name is expressed as “house/environment/temperature”. This way, the topic name is quite descriptive and provides sufficient information for the supported data.
However, if a subscriber is not aware of the different publishers and the sensor/topic names, he cannot find the topic name in which he wishes to subscribe to. To this direction, Yonezawa et al. developed SOXFire as a Pub/Sub model platform for sensors effectively handling the previously mentioned limitation [21
]. SOXFire is implemented based on Sensor-Over-XMPP [23
], and extends Openfire [24
]. This platform can support and manage complex sensors by extracting many different topics from a single compound topic.
To accomplish this, a topic on the platform is configured to have a “meta node” and “data node”. The most important features lie within the meta node, which has the information and metadata related to the topic. It additionally includes the sensor category and the unique name of the topic.
A complex sensor includes various values such as geolocation and information about some other sensors. At the platform, a sensor is managed as an independent transducer, so the complex sensor has many transducers. Subscribers can get the meta-information from SOXFire and easily confirm the information about the topic.
In addition, SOXFire uses XMPP [21
]. The overhead of this protocol is larger generally than AMAP and MQTT, but XMPP can more effectively handle various data types. The reason XMPP effectively treats textual data having high reliability is related to the implemented protocol for instant messages, while also being efficient for handling bigger objects such as pictures. In the context of this research work, we treat several information and topics as well, so using SOXFire has many advantages and allows us to manage those data effectively.
However, it is difficult to implement an advanced data commerce mechanism based only on SOXFire. The main reason lies in the fact that while Pub/Sub messaging model is good at handling data for many clients at the same time, this model does not guarantee enough security regarding the integrity of the data. In addition, in a Pub/Sub model-based platform, a sender cannot directly connect to a receiver, so while the receiver purchased the data of the sender, the sender cannot receive notifications about it. To this direction, in this research work, we are implementing a data-secure marketplace by collaborating SOXFire and another information technology like blockchain, as will be described in detail in the sections that follow.
3.4. Hyper-Connected Smart Cities: The Example of M-Sec
A great deal of state-of-the-art IoT systems in smart cities tends to be built around the concept of the integration of heterogeneous data streams within one or more infrastructures. This wave of IoT systems enables IoT systems to benefit from the scalability, performance, and capacity of the cloud, which has been proven very efficient for certain classes of IoT applications such as large-scale data processing problems. Nevertheless, these architectures promote a centralized data collection and processing approach, which introduces several limitations both in terms of the supported applications and in terms of the business models that they enable. In particular, smart city platforms are mainly centralized IoT/Cloud infrastructures
Today, we also have new approaches in P2P systems, cryptocurrencies (like Bitcoin, Ether and many others), blockchain ledgers that can provide a common reference for distributed, and decentralized systems for collaboration increasing the levels of trust in trustless environments. Blockchains at the same time can provide a tamper-proof framework for data to be exchanged between smart city platforms, while forming the underlying technology for building the internet of value that can make a marketplace of sensors in smart city context a reality.
An example of such an approach for smart cities is the M-Sec (https://www.msecproject.eu/
, accessed on 2 September 2021) project. M-Sec in particular makes use of today’s key technologic enablers by applying the blockchain concept to a highly decentralized IoT. A smart object, part of smart city IoT infrastructure, can be registered to a blockchain and the object remains a unique entity within the blockchain throughout its life. This gets even more apparent with plans for creating a disruptive way IoT will work in the next years, proposing new the business models and usage patterns of IoT infrastructures, providing the way where economic value can be generated from the devices for both the devices and humans.
By architecting approaches to develop different delivery and communication patterns such as P2P, publish/subscribe, message queuing for heterogeneous participants, etc. different objectives are in the focus such as:
(i) design the future decentralized architecture of IoT that will unlock the capacity of smart objects, by allowing to instantly search, use, interact, and pay for available assets and services in the IoT infrastructures.
(ii) enable seamless, highly autonomous, and secure interaction between humans and devices in the context of a smart city, through the use of blockchains and for business contexts relevant to specific smart city use cases enabling innovative machine–human and machine–machine interactions.
(iii) engineer new levels of security and trust in large scale autonomous and trustless multipurpose smart city platforms, define and implement trust-ensuring mechanisms that will enable virtual currency transactions with transparency and all necessary security aspects (authentication, authorization, accounting, etc.).
(iv) define, design, and implement a novel marketplace where smart objects can exchange, information, energy, and services through the use of virtual currencies, allowing real-time matching of supply and demand, enabling the creation of liquid markets with profitable business models of the IoT stakeholders.
In order to enable the M-Sec paradigm, the project defines and implements a platform (comprising middleware, protocols, and tools) for the implementation of applications involving peer-to-peer decentralized interactions between objects and people in a hyper-connected smart city context. The M-Sec project brings together two smart cities (Santander, Fujisawa) and five use cases, such as securing IoT devices to enrich strolls across smart city parks in Santander, cross-border handling of heterogeneous user data (e.g., photos), preventing attacks, and allowing trading in a secure environment during festivals and cultural events with the participation of local stakeholders, taking advantage of the M-Sec Token as a reward mechanism, as will be described in the following sections.