<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Blockchain Infrastructure for the Semantic Web of Things</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michele Ruta?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Floriano Scioscia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Saverio Ieva</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanna Capurso</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Agnese Pinto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eugenio Di Sciascio</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Polytechnic University of Bari</institution>
          ,
          <addr-line>via E. Orabona 4, Bari (I-70125)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Semantic Web of Things (SWoT) improves the Internet of Things power by increasing resource representation capabilities through knowledge management and reasoning technologies adapted from the Semantic Web. This promotes information interoperability and decision autonomy. Nevertheless, trust and reliability issues remain basically unsolved. Large-scale, decentralized and dynamic infrastructures su er from unpredictable volatility of nodes, which compromises resource availability. Trust and coordination are still di cult. Blockchain is increasingly used as a transactional data storage solution for distributed ledgers. It enables trustless collaboration by enforcing smart contracts and prevents data tampering by validating transactions through consensus protocols. This paper proposes a blockchain framework for SWoT contexts settled as a Service-Oriented Architecture. Nodes can exploit smart contracts for registration, discovery and selection of annotated services/resources. While semantic matchmaking enables relevant resource retrieval with logic-based ranking and explanation features, blockchain provides reliable transaction storage. A prototype has been developed by enhancing the standard Hyperledger Iroha framework. Application areas are discussed and experimental tests on a cluster of virtual nodes provide early insight on e ectiveness, performance and scalability.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web of Things tems</kwd>
        <kwd>Blockchain</kwd>
        <kwd>Smart contracts</kwd>
        <kwd>Semantic matchmaking</kwd>
        <kwd>Distributed transactional sys-</kwd>
        <kwd>Service-Oriented Architectures</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The Semantic Web of Things (SWoT) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] vision extends the Semantic Web
initiative to the Internet of Things (IoT) by improving the representation
capability of objects and environments through annotating them with semantically
rich languages. Knowledge representation models and languages de ned for the
Semantic Web can provide the basic substrate for interoperable information
modeling and sharing in the IoT. Machine understandability of adopted formalisms
allows applying automated inferences so that heterogeneous micro-devices, each
conveying a small amount of information, can interact autonomously to provide
high-level services to users, via decision support and task automation.
      </p>
      <p>
        Anyway, IoT su ers from unpredictability of node and resource availability,
due to the volatility of actors and appliances. This makes trust and coordination
management di cult and these limits are inevitably inherited by the SWoT:
their burden is particularly evident when reliable and trustworthy applications
are needed. Blockchain technology is interesting from this perspective. In
conventional distributed databases, a trusted intermediary is needed to guarantee
irreversibility (i.e., committed transactions cannot be altered or reverted) and
prevent censorship (i.e., all valid transactions are committed). Blockchain is a
data structure and protocol for trustless distributed transactional systems: they
avoid intermediaries by approving transactions through a distributed consensus
protocol, which guarantees no single node {or small group of colluding nodes{
can force the addition, removal or modi cation of data [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Blockchain could
incorporate SWoT approaches providing interesting possibilities for large-scale
distributed trustless systems. A SWoT blockchain basically amounts to a
ServiceOriented Architecture (SOA) for regulating registration, discovery and selection
operations. These tasks are intended as distributed and validated by consensus.
      </p>
      <p>
        This paper proposes a framework for SWoT blockchain systems. A
semanticbased resource discovery layer is integrated in a basic blockchain infrastructure,
adding veri able records for every single transaction. A distinguishing feature
of the systems is logic-based explanation of discovery outcomes, grounded on
non-standard inference services for semantic matchmaking [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The proposed
system preserves fundamental blockchain features, also when size increases.
Particularly, the e ective and secure structure of the chain is capable of detecting
erroneous or malicious changes on a transaction block, also in case of large
amounts of volatile nodes. Annotations are registered as assets on the chain and
non-standard inferences in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] are executed by validating peers. The proposed
framework has been implemented and tested on the Hyperledger Iroha1
platform. It has been encapsulated in a cluster of Docker 2 containers to simulate a
large SWoT infrastructure. Experiments on the framework assess the feasibility
of the approach.
      </p>
      <p>The remainder of the paper is reported hereafter. Section 2 recalls relevant
background, while a functional and architectural description of the proposed
framework is given in Section 3. Experimental results are provided in Section
4, followed by an overview of application areas for the approach in Section 5.
Conclusion closes the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>In what follows some relevant background is surveyed in order to make the paper
self-contained.</p>
      <sec id="sec-2-1">
        <title>1 https://www.hyperledger.org/projects/iroha</title>
      </sec>
      <sec id="sec-2-2">
        <title>2 https://www.docker.com/</title>
        <p>Block n-1</p>
        <p>Block n
Transactions
Hash of block
n-1</p>
        <p>Block n+1
Transactions
Hash of block
n</p>
        <p>Block n+2
Transactions
Hash of block
n+1</p>
        <p>
          Block n+3
The blockchain technology was born in 2009 with Bitcoin, an open source
platform for electronic currency exploiting previous theoretical results on
Proof-ofWork consensus algorithms [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. Bitcoin relies on blockchain as a ledger of
currency transfers. In a blockchain, transactions approved in a given time window
are grouped in blocks. Figure 1 shows each block also contains a hash,
computed from both the content of the block and the hash of the previous block.
This forms a chain of blocks, preventing tampering even with old blocks without
node agreement. Transactions are validated through consensus algorithms where
all network nodes behave as peers, holding a copy of current blockchain status.
        </p>
        <p>
          Many blockchain-based e-currencies have been proposed in latest years due
to the worldwide success of Bitcoin. Furthermore, nance, industry and research
communities have been increasingly experimenting with blockchain as a
generalpurpose distributed database enabling practical implementations of Smart
Contracts (SCs) [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] i.e., programs encoding and enforcing multi-party agreements
and coordinated activities. While a trusted mediator is required in the
original SC concept {restraining real-world deployments{ blockchain consensus-based
approach allows trustless collaboration of Decentralized Autonomous
Organizations (DAOs) through parallel execution of SCs among network nodes. Every
SC-enabled blockchain can thus be seen as a general-purpose application
platform based on a distributed Virtual Machine (VM): emerging proposals include
proprietary platforms (e.g., Ethereum3) and standardization e orts, such as the
Hyperledger 4 initiative steered by the Linux Foundation.
        </p>
        <p>
          From a technical viewpoint, blockchain systems can be classi ed based on
the following core design decisions:
{ Network access policy. A blockchain network is permissioned if a white-list
of allowed nodes exists and nodes are uniquely identi ed, or permission-less if
any node can join at any time, even anonymously.
{ Consensus algorithm. Permission-less systems require stricter consensus
methods, such as Proof-of-Work, which is based on solving a cryptographic
problem and guarantee data security unless a large portion of nodes is colluding to
subvert the blockchain. Permissioned systems {where each node is accountable{
may relax consensus constraints in order to reduce the computational load, by
selecting simpler algorithms. State-machine replication protocols such as
Byzantine Fault Tolerance (BFT) variants [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] are often adopted. The Iroha framework
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>3 Ethereum Project: https://www.ethereum.org/</title>
      </sec>
      <sec id="sec-2-4">
        <title>4 Hyperledger: https://www.hyperledger.org/</title>
        <p>
          adopted for the experiments of this paper uses a BFT consensus algorithm named
Sumeragi.
{ Transaction model. In typical blockchain systems, assets are registered and
exchanged, so that at any time each node owns some assets in a given
quantity. In the Unspent Transaction Outputs (UTXO) model, a transfer from A to
B consumes (i.e., deletes) records for A's spent assets and produces (i.e., adds)
new ones for B's received assets. In the account-based model, instead, every node
has an account reporting all its assets, which is updated by transactions.
{ Smart contract language. Blockchains can adopt any formalism for SC
speci cation and execution, such as procedural (imperative) languages or
logical (declarative) languages or automata [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. Current proposals mostly adopt
computationally complete programming languages, either existing (e.g., Java in
the Iroha framework of Hyperledger, exploited in this work) or created for the
purpose (e.g., Ethereum's Solidity ).
        </p>
        <p>
          Internet of Things (IoT) scenarios are expected to be among the main
application areas in the near future. Blockchain applications in IoT contexts are
mostly focused on supply chain [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] and Industry 4.0 [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The integration of
Semantic Web technologies in blockchain has been discussed e.g., in [
          <xref ref-type="bibr" rid="ref3 ref6">3, 6</xref>
          ], while [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]
proposed defeasible logics for SC de nition and implementation. Nevertheless, to
the best of our knowledge this paper presents the rst full blockchain framework
integrating logic-based resource discovery.
2.2
        </p>
        <sec id="sec-2-4-1">
          <title>Semantic Web of Things</title>
          <p>
            Knowledge representation and reasoning in the SWoT are formally grounded on
Description Logics (DLs), a family of logic languages in a decidable fragment of
First Order Logic [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ]. Basic DL syntax elements are: concepts (a.k.a. classes ),
standing for sets of objects; roles (a.k.a. object properties ), linking pairs of
objects in di erent concepts; individuals (a.k.a. instances ), special named elements
belonging to concepts. Each DL has a speci c set of logical constructors for
combining the above elements in concept and role expressions. Concept expressions
can be used in inclusion (a.k.a. subsumption) and de nition (a.k.a. equivalence)
axioms, which model knowledge elicited for a given domain. A set of such axioms
is called Terminological Box (TBox), a.k.a. ontology. A set of individual axioms
(a.k.a. facts) constitutes an Assertion Box (ABox). TBox and ABox together
make up a Knowledge Base (KB).
          </p>
          <p>
            The approach proposed in this paper leverages semantic matchmaking, i.e.,
the retrieval of the most relevant resources for a given request, where both
resources and requests are annotated with concept expressions w.r.t. a common
ontology T . Given a request R and a resource S, subsumption checks whether all
features in R are included in S; satis ability checks whether any constraint in R
contradicts some speci cation in S. Unfortunately these classic inference services
enable only a Boolean \full match or no match" approach. This is inadequate in
complex scenarios, because full matches are rare and incompatibility is frequent
when dealing with detailed resource descriptions. Therefore, non-standard
inferences in [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] help to determine a semantic ranking of resources w.r.t. a request
and a logic-based explanation of outcomes:
{ Concept Contraction: if request R and resource S are not compatible,
Contraction determines which part of R is con icting with S. If one retracts
conicting requirements in R, G (for Give up), a concept K (for Keep) is obtained,
representing a contracted version of the original request, such that K and S are
compatible w.r.t. T . G represents \why" R and S clash.
{ Concept Abduction: when R and S are compatible but S is not a full match
for R, Abduction determines what should be hypothesized in S in order to
completely satisfy R. The solution H (for Hypothesis ) to Abduction is a concept
representing \why" the subsumption relation does not hold. H can be
interpreted as what is requested in R and not speci ed in S.
          </p>
          <p>
            If R and S are incompatible, the matchmaking process uses Contraction to
extract the compatible part K and then Abduction to obtain the required HK
for reaching a full match. Furthermore, penalty functions are computed based
on the structure and number of elements in G and HK [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ], de ning a
wellfounded semantic distance metric, which can be used to rank a set of resources
by relevance (i.e., semantic a nity) w.r.t. the request.
          </p>
          <p>In SWoT contexts, computation resources of devices are strictly constrained
and require careful software design. Adding more constructors makes DL
languages more expressive, but leads to an increase in computational complexity of
inference services, hence a tradeo is needed. This paper refers to the moderately
expressive Attributive Language with unquali ed Number restrictions (ALN )
DL, which grants polynomial complexity to all the above standard and
nonstandard inferences.
3</p>
          <p>Semantic-enhanced Blockchain for unpredictable
scenarios
The proposed framework de nes a semantic-based discovery layer built upon a
standard blockchain system, retaining full backward compatibility.
3.1</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>Framework architecture</title>
          <p>{ Peer agents registered in the blockchain are identi ed by their public keys
and associated with accounts. Each agent can perform a semantic-based
resource discovery in order to take ownership and transfer assets between
accounts.
{ Assets are annotated w.r.t. a domain ontology. They can represent physical
or digital resources, as well as service instances. Peers can register assets
through speci c transactions, and annotations are stored in the blockchain.
{ Smart contracts are enhanced by exploiting non-standard inference
services described in Section 2.2. Particularly, each peer locally integrates an</p>
          <p>Semantic</p>
          <p>Blockchain
Peer 1</p>
          <p>Peer 2</p>
          <p>Peer
N</p>
          <p>Peer</p>
          <p>Application Programming Interface
Smart Contracts</p>
          <p>Processor
Consensus
engine</p>
          <p>Reasoning engine</p>
          <p>
            Storage
embedded matchmaking and reasoning engine, allowing semantic-based
resource discovery [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ].
{ Consensus engine tracks and validates semantic-based transactions in a
standard and transparent way.
{ Storage for all transactions, including semantic ones, exploits Merkle trees,
a data structure commonly adopted in blockchains for e cient detection of
erroneous or malicious changes on a transaction block.
3.2
          </p>
          <p>How to make smarter contracts: put semantics in the consensus
protocol
The SWoT blockchain proposal is intended as a SOA enabling fundamental
operations as registration, discovery, selection and nal execution (payment).
Such tasks are implemented as smart contracts, i.e., their accomplishment is
distributed and validation is reached by consensus. The distinguishing feature of
the proposed approach w.r.t. basic blockchain infrastructures is the integration of
advanced resource/service discovery grounded on semantic matchmaking. It
allows computing a score measuring the semantic distance between the request and
each available chain resource, both described w.r.t. the same domain ontology.
This logic-based metric induces a relevance-ranked list of annotated elements
w.r.t. the request. The non-standard inference services also provide a formal
explanation of discovery outcomes, reinforcing user con dence in the discovery
process. SOA primitives and corresponding SCs are outlined hereafter.</p>
          <p>A. Resource registration. Multiple resource domains can coexist and be
tracked in the same blockchain. Each domain is associated to a di erent ontology,
providing the reference conceptual vocabulary for annotating resources. Resource
instances are characterized by the following attributes:
{ a Uniform Resource Identi er (URI) featuring the resource unambiguously
(and possibly denoting its fruition endpoint, although this is not mandatory);
{ a semantic annotation in Web Ontology Language (OWL 2)5 describing the
resource;
{ the URI of the reference ontology, in order to cope with the co-existence of
several resource domains in the same blockchain;
{ a resource price: the framework supports any type of currency unit,
pecuniary or otherwise (e.g., in SWoT applications energy or time could be
chosen).</p>
          <p>By means of the Registration SC the owner node will register a resource as an
asset on the blockchain storage, in order to make it available for discovery and
usage.</p>
          <p>B. Resource discovery. In order to search for a (set of) item(s), the
requester randomly selects n peers and sends a multicast request specifying:
{ URI of the reference ontology: this determines the resource domain, i.e.,
the vocabulary used to express annotations of request and resources to be
retrieved; the nodes receiving a request will not process resources annotated
w.r.t. other ontologies in the semantic matchmaking;
{ OWL semantic annotation of the request, specifying desired resource features
and constraints;
{ maximum price pmax the requester is willing to pay; resources with a price
higher than this threshold will be skipped from matchmaking in order to
reduce computational overhead;
{ minimum semantic relevance threshold smin, as a oating-point number in
the [0; 1] range, where 1 corresponds to a full match and 0 to a complete
mismatch (both rare situations in realistic scenarios); after matchmaking,
resources with a relevance score below this threshold will not be returned,
as deemed irrelevant to the requester;
{ maximum number of results rmax to be returned;
{ requester's address.</p>
          <p>
            The proposal adopts a gossip-based (a.k.a. epidemic) approach [
            <xref ref-type="bibr" rid="ref5">5</xref>
            ] to
disseminate discovery requests and aggregate results as in Figure 3. This grants protocol
simplicity and low computational overhead, which is a primary requirement in
SWoT contexts. Nodes receiving the request execute semantic matchmaking of
it with their own resources through an on-board matchmaking engine [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ],
implementing the non-standard inference services in Section 2.2. A list of at most
rmax results satisfying both semantic relevance and price constraints is returned,
ranked by relevance. Nodes also select other n random peers and forward the
request. Nodes receiving forwarded requests behave in the same way, up to a
search depth threshold m. Each queried node returns results directly to the
original requester at the speci ed address.
          </p>
          <p>C. Explanation. This is an optional step in a typical discovery process,
invoked when a requester needs a justi cation of the matchmaking outcome. This</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>5 OWL 2 Web Ontology Language Document Overview (Second Edition), W3C Rec</title>
        <p>ommendation 11 December 2012, http://www.w3.org/TR/owl2-overview/</p>
        <p>RequesterNode 
:BlockchainNode</p>
        <p>ReceiverNodeN 
:BlockchainNode</p>
        <p>ReceiverNodeN+1 
:BlockchainNode
 towards n peers
discovery (ontologyURI,  
semanticDescription, </p>
        <p>maxPrice,
minSemanticRelevance,</p>
        <p>maxResult, ,
requesterNodeIP)  
matchmaking on
owned resources
return resources ranked list</p>
        <p>if m is not reached
forward discovery (ontologyURI, 
semanticDescription,</p>
        <p>maxPrice,
minSemanticRelevance,</p>
        <p>maxResult,
requesterNodeIP)   matchmaking on</p>
        <p>owned resources
return resources ranked list</p>
        <p>optional
explanation (resourceURI,</p>
        <p>semanticDescription)  
return semantic explanation
selection (resourceURI)</p>
        <p>
          ACK
can be useful, e.g., to trigger a request re nement process [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], as it can make the
requester aware of further features it did not include in its original request but it
may be interested in. The requester node sends a unicast request containing: (i)
the semantic annotation of the request; (ii) the URI of the discovered resource.
The receiving node replies with the matchmaking outcome explanation,
structured as: (i) semantic a nity score in the [0; 1] interval; (ii) concept expressions
of G and K from Concept Contraction and of H from Concept Abduction. G, K
and H can be cached from the previous discovery step, if storage of the resource
owner allows it.
        </p>
        <p>D. Resource selection. After receiving all results {or just a subset, if the
response delay of some nodes is greater than a xed timeout { the requester selects
the best resource(s) by means of select SC. A unicast message is delivered to
the resource owner specifying the resource URI and a currency payment. The
recipient answers with a properly usable resource representation: this depends on
the actual kind of resource and meaning of the URI, e.g., an interface endpoint
to access a networked device or a further SC to be invoked. The proposal does
not constrain resource fruition in any way, leaving application-speci c details to
the semantic annotation of the resources themselves.</p>
        <p>The resource discovery and retrieval interaction sequence is shown in Figure
3. Each associated transaction is recorded on the blockchain for robustness,
traceability and accountability purposes.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Performance assessment</title>
      <p>
        In order to assess e ectiveness and scalability of the proposed approach, an
experimental evaluation campaign has been carried out starting from the Iroha
framework from Hyperledger. The implemented prototype enhanced Iroha as in
what follows:
{ the server API has been extended with support for semantic matchmaking;
{ the SCs described in Section 3.2 have been implemented and the Mini-ME
reasoning and matchmaking engine [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] has been integrated;
{ zlib6 compression library has been exploited to cope with the well-known
verbosity of ontology languages as OWL.
      </p>
      <p>In order to reach a quantitative performance analysis, small, medium and
large scale chain scenarios have been considered, respectively with 50, 150 and
500 nodes. In each of them nodes have been split in two sets materially executing
SC transactions with semantic-based discovery (see Section 3.2): producers, i.e.,
providers of annotated resources, registered in the blockchain; consumers, i.e.,
resource requesters.</p>
      <p>The following experiment parameters have been set: (i) duration of 300 s;
(ii) consumer/producer ratio of 0.1; (iii) 20 randomly-generated annotations per
producer; (iv) each consumer sends a new randomly-generated request every 10 s;
(v) each request can be forwarded to 4 nodes at most; (vi) a request is aborted if
no match is found after 2 hops; (vii) the minimum threshold of semantic a nity is
0.9. Each scenario is executed several times by varying the following parameters:
(i) the discovery timeout has been set to 2, 6 and 10 s; (ii) the explanation SC,
described in Section 3.2, has been either enabled or disabled.</p>
      <p>The experimental campaign has leveraged the adoption of Docker platform
to deploy the testbed, by performing the following steps:
{ the prototype has been compiled as a Docker image, to create all the scenarios;
{ each node has been executed as a container instance of the compiled image;
{ a Docker Swarm mode cluster has been deployed on 6 VirtualBox virtual
machines running on a workstation7, with an overlay network con gured to
allow communications among the Iroha nodes;
{ the execution of experiments has been managed via the Docker API SDK8.</p>
      <p>The following performance metrics have been calculated: (i) average request
processing time, both as all-out and split by task; (ii) average hit ratio per node,
i.e., percentage of requests with at least one resource satisfying the constraints
within the given timeout. Experimental results are reported later on.</p>
      <p>Time. Average turnaround times can be deemed as very low in experiments
involving 50 and 150 nodes, as Figure 4 and Figure 5 show. the growth exhibits
a linear trend, suggesting proper scaling. With 500 nodes, instead, absolute time
reach the timeouts as depicted in Figure 6, due to the needed consensus about
among a larger number of entities. Furthermore, in all the experiments the time
of discovery process dominates the ones of explanation and selection phases.
This could be due to the fact that matchmaking is the most computationally
intensive task, despite the optimization of the adopted reasoning engine.</p>
      <sec id="sec-3-1">
        <title>6 http://zlib.net/</title>
        <p>7 Intel Xeon E5-2643 CPU at 3.30 GHz, 48 GB of RAM and Ubuntu 16.04 (64bit)
operating system.</p>
      </sec>
      <sec id="sec-3-2">
        <title>8 https://github.com/spotify/docker-client</title>
        <p>Hit ratio. Figure 7 shows average results are closely related to the number
of nodes. The best outcomes have been obtained in the small and medium
scenarios with timeouts high enough. Conversely, in the 500 nodes case the average
hit ratio is noticeably lower. The increased resource miss ratio is partially due to
Docker Swarm deployment on a single host instead of adopting a more proper
cluster computing environment: the large number of containers on the same host
led to Docker resource contention issues a ecting the CPU, le system and
network load. Furthermore, the inherent complexity of consensus algorithms tends
to increase at higher scales, leading to higher processing times and consequent
increased probability of timeout expiration.</p>
        <p>Early results supported the feasibility of the proposal, as performance is
basically satisfactory for small-to-medium permissioned blockchains. Larger-scale
scenarios could not be setup on the reference testbed due to the above limits
with Docker Swarm deployment in a single-host environment. Testbed migration
toward a computer cluster will be performed to re-evaluate semantic-enhanced
blockchain performance in the same scenarios as well as to allow larger-scale
simulations.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Applications</title>
      <p>
        Semantic-enhanced blockchain systems enable discovery infrastructures for
generalpurpose machine-to-machine trustless marketplaces with minimal or no human
intervention across multiple DAOs. This has several possible applications with
potential transformation impact on relevant sectors.
{ Logistics. Asset tracking and supply chain are among the most popular
blockchain applications, due to the easy t with existing industry standards.
The simplest approaches rely on transactional ledgers for asset transfer [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
Semantic-enhanced SC-based blockchains further allow any application logic to
be implemented, and also support discoverable, composable and veri able
multistep business processes in multi-party SOAs [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
{ Industry 4.0. IoT-based manufacturing bene ts from blockchain
technologies [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], granting not only a decentralized collaboration infrastructure, but also
a ledger for process traceability of production and quality assurance.
Semanticbased blockchain evolution can provide greater composition exibility and
rigorous process formalization.
{ Utility markets. Energy, water and natural gas provisioning are increasingly
relying on sensor networks, low-level digital control and high-level decision
support. Semantic-enhanced blockchains can strongly support the Smart Grid, by
providing both resource discovery and a robust ledger for contracts and
payments, which are needed in large-scale peer-to-peer decentralized marketplaces.
{ Public sector. Many public services can be made faster, cheaper and less
error prone through process and data dematerialization. Blockchain technology
can assist in the interfacing of the information systems of several independent
branches and levels of the public administration. Furthermore, it plays the role
of veri able registry in property transfers as well as authentication and notary
services. Semantic-based querying capabilities make information and
functionalities more accessible to both citizens and decision-makers.
{ Financial services. Traditional banks and nance institutions, private and
public alike, are experimenting with blockchain technology to reduce operating
costs of nancial transactions management. Semantic-based approaches enable a
marketplace of nancial services, where atomic building blocks can be
automatically discovered, compared and composed in order to provide the most suitable
personalized solutions.
6
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>The paper proposed a framework redesigning resource discovery for SWoT
scenarios thanks to an underlying blockchain infrastructure. Registration, discovery,
selection and nalization tasks have been revisited as smart contracts with
opportunistic and distributed execution, exploiting validation by consensus.
Logicbased explanation of discovery outcomes is an important feature of the proposal,
granted by non-standard inferences for request-resource matchmaking.</p>
      <p>Future aims are basically directed to migrate the testbed toward a cluster
of physical nodes, in order to remove bottlenecks biasing results and increase
simulation scale. Development of case studies within the envisioned application
areas is at an early stage and will be completed to fully validate bene ts and
possible limitations of the proposal in realistic settings.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This work was supported in part by Italian PON project ERHA (Enhanced
Radiotherapy with HAdrons).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mc</surname>
            <given-names>Guinness</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Nardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Patel-Schneider</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>The Description Logic Handbook</article-title>
          . Cambridge University Press (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Christidis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Devetsikiotis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Blockchains and Smart Contracts for the Internet of Things</article-title>
          .
          <source>IEEE Access 4</source>
          ,
          <issue>2292</issue>
          {
          <fpage>2303</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>English</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Auer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Domingue</surname>
            ,
            <given-names>J.: Block</given-names>
          </string-name>
          <string-name>
            <surname>Chain</surname>
            <given-names>Technologies</given-names>
          </string-name>
          &amp;
          <article-title>The Semantic Web: A Framework for Symbiotic Development</article-title>
          . In: Lehmann,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Thakkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Halilaj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Asmat</surname>
          </string-name>
          ,
          <string-name>
            <surname>R</surname>
          </string-name>
          . (eds.) Computer Science Conference for University of Bonn Students. pp.
          <volume>47</volume>
          {
          <issue>61</issue>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Idelberger</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Governatori</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riveret</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sartor</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Evaluation of logic-based smart contracts for blockchain systems</article-title>
          .
          <source>In: International Symposium on Rules and Rule Markup Languages for the Semantic Web</source>
          . pp.
          <volume>167</volume>
          {
          <fpage>183</fpage>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Jelasity</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montresor</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Babaoglu</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Gossip-based aggregation in large dynamic networks</article-title>
          .
          <source>ACM Transactions on Computer Systems (TOCS) 23(3)</source>
          ,
          <volume>219</volume>
          {
          <fpage>252</fpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>H.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laskowski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Towards an Ontology-Driven Blockchain Design for Supply Chain Provenance (</article-title>
          <year>2016</year>
          ), https://ssrn.com/abstract=2828369
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Korpela</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hallikas</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dahlberg</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Digital Supply Chain Transformation toward Blockchain Integration</article-title>
          .
          <source>In: Proceedings of the 50th Hawaii International Conference on System Sciences</source>
          . pp.
          <volume>4182</volume>
          {
          <issue>4191</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Norta</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Creation of smart-contracting collaborations for decentralized autonomous organizations</article-title>
          .
          <source>In: International Conference on Business Informatics Research</source>
          . pp.
          <volume>3</volume>
          {
          <fpage>17</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Ruta</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Di</given-names>
            <surname>Sciascio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Scioscia</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          :
          <article-title>Concept Abduction and Contraction in Semantic-based P2P Environments</article-title>
          .
          <source>Web Intelligence and Agent Systems</source>
          <volume>9</volume>
          (
          <issue>3</issue>
          ),
          <volume>179</volume>
          {
          <fpage>207</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Scioscia</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruta</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Building a Semantic Web of Things: issues and perspectives in information compression</article-title>
          .
          <source>In: Semantic Web Information Management (SWIM'09)</source>
          .
          <source>In Proceedings of the 3rd IEEE International Conference on Semantic Computing (ICSC</source>
          <year>2009</year>
          ). pp.
          <volume>589</volume>
          {
          <fpage>594</fpage>
          . IEEE Computer Society (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Scioscia</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruta</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loseto</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gramegna</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ieva</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Di Sciascio</surname>
          </string-name>
          , E.:
          <article-title>A Mobile Matchmaker for the Ubiquitous Semantic Web</article-title>
          .
          <source>International Journal on Semantic Web and Information Systems (IJSWIS) 10(4)</source>
          ,
          <volume>77</volume>
          {
          <fpage>100</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Szabo</surname>
          </string-name>
          , N.:
          <article-title>Formalizing and securing relationships on public networks</article-title>
          .
          <source>First Monday</source>
          <volume>2</volume>
          (
          <issue>9</issue>
          ) (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Vukolic</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The quest for scalable blockchain fabric: Proof-of-work vs. BFT replication</article-title>
          . In: International Workshop on Open Problems in Network Security. pp.
          <volume>112</volume>
          {
          <fpage>125</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>