Semantic Blockchain to Improve Scalability in the Internet ...

16
c 2017 by the authors; licensee RonPub, L ¨ ubeck, Germany. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/). Open Access Open Journal of Internet of Things (OJIOT) Volume 3, Issue 1, 2017 http://www.ronpub.com/ojiot ISSN 2364-7108 Semantic Blockchain to Improve Scalability in the Internet of Things Michele Ruta, Floriano Scioscia, Saverio Ieva, Giovanna Capurso, Eugenio Di Sciascio SisInfLab (Information Systems Laboratory), Department of Electrical and Information engineering, Polytechnic University of Bari, Via Edoardo Orabona, 4, I-70125 Bari, Italy, {michele.ruta,floriano.scioscia,saverio.ieva,giovanna.capurso,eugenio.disciascio}@poliba.it ABSTRACT Generally scarce computational and memory resource availability is a well known problem for the IoT, whose intrinsic volatility makes complex applications unfeasible. Noteworthy efforts in overcoming unpredictability (particularly in case of large dimensions) are the ones integrating Knowledge Representation technologies to build the so-called Semantic Web of Things (SWoT). In spite of allowed advanced discovery features, transactions in the SWoT still suffer from not viable trust management strategies. Given its intrinsic characteristics, blockchain technology appears as interesting from this perspective: a semantic resource/service discovery layer built upon a basic blockchain infrastructure gains a consensus validation. This paper proposes a novel Service-Oriented Architecture (SOA) based on a semantic blockchain for registration, discovery, selection and payment. Such operations are implemented as smart contracts, allowing distributed execution and trust. Reported experiments early assess the sustainability of the proposal. TYPE OF PAPER AND KEYWORDS Regular research paper: Blockchain, Service-Oriented Architecture, Semantic Web of Things, Semantic Web, Internet of Things, Matchmaking, Ubiquitous Computing 1 I NTRODUCTION Talking about blockchain technology, the most popular evidence is taken by Bitcoin currency 1 , which is also the most controversial implementation of it, due to a billionaire worldwide hidden market of anonymous transactions outside the official regulatory control. However, in spite of the Bitcoin reputation, 1 https://bitcoin.org/ This paper is accepted at the International Workshop on Very Large Internet of Things (VLIoT 2017) in conjunction with the VLDB 2017 Conference in Munich, Germany. The proceedings of VLIoT@VLDB 2017 are published in the Open Journal of Internet of Things (OJIOT) as special issue. blockchain is an intrinsically positive technology with large affordability witnessed by several years of flawless adoption in disparate fields. It is grounded on a basic and fundamental concept: The trust of transactions in the digital world is strictly related to the confidence on a given “authority”. It has to be noticed that today the assets made in a virtual way are more and more increasing. This is true not only for big companies, but also for private citizens relying on the digital world even more relevant elements of their daily life (personal information, photos, preferences profile, working career) a part from not negligible endowment amount. The fact that certification authorities could be hacked and counterfeit poses serious security and privacy issues to the diffusion of any dematerialized transaction. This 46

Transcript of Semantic Blockchain to Improve Scalability in the Internet ...

Page 1: Semantic Blockchain to Improve Scalability in the Internet ...

c© 2017 by the authors; licensee RonPub, Lubeck, Germany. This article is an open access article distributed under the terms and conditions ofthe Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).

Open Access

Open Journal of Internet of Things (OJIOT)Volume 3, Issue 1, 2017

http://www.ronpub.com/ojiotISSN 2364-7108

Semantic Blockchain to Improve Scalabilityin the Internet of Things

Michele Ruta, Floriano Scioscia, Saverio Ieva, Giovanna Capurso, Eugenio Di Sciascio

SisInfLab (Information Systems Laboratory), Department of Electrical and Information engineering,Polytechnic University of Bari, Via Edoardo Orabona, 4, I-70125 Bari, Italy,

{michele.ruta,floriano.scioscia,saverio.ieva,giovanna.capurso,eugenio.disciascio}@poliba.it

ABSTRACT

Generally scarce computational and memory resource availability is a well known problem for the IoT, whoseintrinsic volatility makes complex applications unfeasible. Noteworthy efforts in overcoming unpredictability(particularly in case of large dimensions) are the ones integrating Knowledge Representation technologies to buildthe so-called Semantic Web of Things (SWoT). In spite of allowed advanced discovery features, transactions inthe SWoT still suffer from not viable trust management strategies. Given its intrinsic characteristics, blockchaintechnology appears as interesting from this perspective: a semantic resource/service discovery layer built upona basic blockchain infrastructure gains a consensus validation. This paper proposes a novel Service-OrientedArchitecture (SOA) based on a semantic blockchain for registration, discovery, selection and payment. Suchoperations are implemented as smart contracts, allowing distributed execution and trust. Reported experimentsearly assess the sustainability of the proposal.

TYPE OF PAPER AND KEYWORDS

Regular research paper: Blockchain, Service-Oriented Architecture, Semantic Web of Things, Semantic Web, Internetof Things, Matchmaking, Ubiquitous Computing

1 INTRODUCTION

Talking about blockchain technology, the most popularevidence is taken by Bitcoin currency1, whichis also the most controversial implementation of it,due to a billionaire worldwide hidden market ofanonymous transactions outside the official regulatorycontrol. However, in spite of the Bitcoin reputation,

1 https://bitcoin.org/

This paper is accepted at the International Workshop on VeryLarge Internet of Things (VLIoT 2017) in conjunction with theVLDB 2017 Conference in Munich, Germany. The proceedings ofVLIoT@VLDB 2017 are published in the Open Journal of Internetof Things (OJIOT) as special issue.

blockchain is an intrinsically positive technology withlarge affordability witnessed by several years of flawlessadoption in disparate fields. It is grounded on a basicand fundamental concept: The trust of transactions inthe digital world is strictly related to the confidence ona given “authority”. It has to be noticed that todaythe assets made in a virtual way are more and moreincreasing. This is true not only for big companies,but also for private citizens relying on the digital worldeven more relevant elements of their daily life (personalinformation, photos, preferences profile, working career)a part from not negligible endowment amount.

The fact that certification authorities could be hackedand counterfeit poses serious security and privacy issuesto the diffusion of any dematerialized transaction. This

46

Page 2: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

is the reason why blockchain could prove to be helpful.A blockchain is basically a database distributed andshared among several parties which records possibletransactions happened in a given time span. Thereliability of such a structure comes from the factthat every transaction is trusted by consensus of themajority of entities acting in the system through theexecution of smart contracts [3], i.e., software stubswhich automatically process locally the terms of acontract. When a pre-configured condition in a smartcontract is verified then general actions related to theagreement (e.g., payments) are automatically performed.

As thought, blockchain technology is interesting fromthe Internet of Things (IoT) perspective: IoT suffersfrom the unpredictability of nodes inherited from thevolatility of actors and appliances, which makes trustmanagement difficult. Hence, scalability is kept lowand possible applications are limited. Most importantefforts in overcoming unpredictability focus on re-designing resource discovery approaches. Noteworthyis the integration of Knowledge Representation theory –and particularly Semantic Web technologies– at resourcediscovery level in IoT stacks. This effort starts off the so-called Semantic Web of Things (SWoT) [19]. It enablessemantic-enhanced pervasive computing by embeddingintelligence in both objects and ambient through thedissemination of a large number of micro-devices,each conveying a small fragment of semantically richinformation.

SWoT opens the way toward an ontology-basedresource/service discovery leveraging semantics ofrequests and resource descriptions to refine retrievalstrategies. Unfortunately, such an approach alone leavesunsolved the problem of affordability of transactionsafter discovery has happened, which restrains a largeexploitation of SWoT solutions in multiple contexts.Particularly, scalability is the most problematic aspect tobe faced on when it comes to applications and scenariosinvolving large or very large IoT infrastructures. Fromthis standpoint, blockchain technology could incorporateSWoT approaches providing interesting potentialities.A SWoT blockchain basically amounts to a Service-Oriented Architecture (SOA) for regulating registration,discovery, selection and –in case– payment operations.These subsequent tasks are intended as distributed smartcontracts validated by consensus.

This paper proposes a possible framework forscalable large-dimensions SWoT systems. A semantic-based resource discovery layer is integrated in abasic blockchain infrastructure in a way that theblockchain adds verifiable records for every singletransaction. A distinguishing feature of the systemsis logic-based explanation of discovery outcomes,grounded on non-standard inference services for

semantic matchmaking. The proposed system preservesfundamental blockchain features, also when sizeincreases substantially. Particularly, the effective andsecure structure of the chain is capable of detectingerroneous or malicious changes on a transaction blockalso in case of large amounts of volatile nodes.The following algorithm types are used to achieveconsensus: (i) Proof-of-Work (PoW), based on solvinga cryptographic problem in order to sign and validatea block of transactions; (ii) Byzantine Fault-Tolerance(BFT), a state-machine replication protocol whichtolerates that among the N validating peers at mostf < N/3 could be malicious. In order to incorporatea semantic-based resource discovery within the chainoperations, annotations are registered as assets on theblockchain and nonstandard inference services in [20]are implemented as smart contracts, which are executedby validating peers.

A case study in the field of distributed and dynamicscheduling of production tasks for pharmaceuticalfactories is presented. It has the aim to clarify theproposal evidencing its benefits. In addition, theproposed framework has been implemented and testedon the Hyperledger Iroha2 platform which adopts aBFT consensus algorithm named Sumeragi. It has beenencapsulated in a Docker3 container to simulate a largeIoT infrastructure. Early experiments on the frameworkhave been carried out and basically assess the feasibilityof the approach.

The remainder of the paper is organized as follows.Next section highlights relevant background for theapproach. A functional and architectural description ofthe proposed framework is given in Section 3 and Section4 respectively. Section 5 proposes an exemplifiedcase study, followed by Section 6, where experimentalevaluation results are provided. Finally, Section 7surveys most interesting related work before closingremarks.

2 BACKGROUND

To make the paper clear and self-contained, some detailsabout blockchain technology and Semantic Web ofThings are provided in this section.

2.1 Blockchain Basics

Blockchain is a data structure and protocol fortrustless distributed transactional systems. In traditionaldistributed databases, a trusted intermediary is needed toguarantee irreversibility (i.e., no committed transaction

2 https://www.hyperledger.org/projects/iroha3 https://www.docker.com/

47

Page 3: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

…Hash of block

n-1

Transactions

Block n

Hash of blockn

Transactions

Block n+1

…Block n-1 Block n+2

Figure 1: Blockchain structure

can be reverted or altered) and preventing censorship(i.e., all valid transactions are committed). Blockchainsystems avoid intermediaries by approving transactionsthrough a distributed consensus protocol, whichguarantees no single node – or small group of colludingnodes4 – can force the addition, removal or modificationof data. Transactions approved in a given time period– again, the window size depends on the particularblockchain system– are grouped in blocks. As depictedin Figure 1, for each block a hash is appended andcomputed not only on the contents of the block, but alsoon the hash of the previous block, thus forming a chainof blocks. This prevents tampering even with old blockswithout consensus among the nodes.

Building on previous theoretical results on Proof-of-Work consensus algorithms [22], blockchain technologywas born with Bitcoin, an open source platform forelectronic currency. Bitcoin uses blockchain as aledger to store currency transfer transactions. Afterthe success of Bitcoin, many other blockchain-basedelectronic currency platforms have been introduced. Atthe same time, it has been realized that the underlyingblockchain technology is an inherently general-purposedistributed database, enabling trustless collaboration ofDecentralized Autonomous Organizations (DAOs). Thisfeature enables practical implementations of the SmartContract (SC) idea [21], i.e., programs encoding andenforcing cooperative processes among two or moreparties.

Originally, SCs required a trusted mediator,restraining a large development of the approach.Indeed, consensus about SCs in a blockchain is reachedthrough a parallel execution in the network, effectivelymaking every SC-enabled blockchain a general-purpose application platform based on a distributedVirtual Machine (VM). Many proposals have emerged,including proprietary platforms (Ethereum5 is perhapsthe most popular) and standardization efforts, such as theHyperledger6 initiative guided by the Linux Foundation.SC-based blockchains are being experienced in severalfinancial and industry sectors. Internet of Things (IoT)scenarios are expected to be among the main application4 Small is usually characterized as a maximum percentage of all

participating nodes; the actual value depends on the particularconsensus mechanism.

5 Ethereum Project: https://www.ethereum.org/6 Hyperledger: https://www.hyperledger.org/

areas in the near future, as discussed in Section 7.Several types of blockchain systems exist, based on

the following key design decisions:

Network access policy. A blockchain networkis permission-less if any node can join –evenanonymously– at any time, or permissioned if awhite-list of admitted nodes exists and nodes areuniquely identified. This choice has a deep impact onthe blockchain design: Permission-less chains usuallyhave to reward participants for their computationaleffort, e.g., Bitcoin allows nodes to generate (mine)and keep new currency for the validation of transactionblocks. Permissioned chains are instead adopted in morecontrolled collaboration contexts, where access itself isa reward, as it enables selling and buying services orresources.

Consensus algorithm. Permission-less systems requirestricter consensus methods, such as Proof-of-Work,which guarantee data security unless a large portionof nodes is colluding to subvert the blockchain.Permissioned systems –where each node is identifiableand accountable– may relax consensus constraints inorder to reduce the computational load, by selectingsimpler algorithms; Byzantine Fault Tolerance (BFT)variants [22] are often adopted.

Transaction model. In blockchain systems, assets canbe registered and exchanged. At any time, each nodetypically owns some assets in a certain quantity. In theunspent transaction outputs (UTXO) model, a transferfrom A to B is modeled as consuming (i.e., deleting)records for A’s spent assets and producing (i.e., adding)new ones for B’s received assets. In the account-basedmodel, instead, every node has an account reportingall its assets, which is updated by transactions. TheUTXO model is similar to a bank statement of account;it allows simpler reconstruction of current state from atransaction log and is typically adopted by e-currencysystems. The account-based model is more general, butit can make transaction processing slower; nevertheless,it is the only practical choice for general-purpose SC-based blockchains.

Smart contract language. Blockchains can adoptany formalism for SC specification and execution,such as procedural (imperative) languages or logical(declarative) languages or automata [9]. Industryproposals mostly adopt computationally completeprogramming languages, either existing (e.g., Java in theIroha framework of Hyperledger, exploited in this work)or created for the purpose (e.g., Ethereum’s Solidity).

Table 1 summarizes blockchain system features intypical e-currency and IoT solutions. A wider discussionof blockchain technology is in [3].

48

Page 4: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

Table 1: Typical blockchain features for e-currencyand IoT solutions

Feature E-currency IoTAccess policy Permission-less PermissionedConsensus algorithm Proof-of-Work BFT-likeTransaction model UTXO Account-basedSmart contracts No YesProgrammable No YesGeneral purpose No YesTransaction latency Lower Higher

2.2 Fundamentals of Semantic Web of Things

In latest years, the Semantic Web of Things (SWoT)[19] vision is merging the Semantic Web and theInternet of Things. Its goal is embedding intelligenceinto ordinary objects and environments via semantic-enhanced pervasive computing. Large numbers ofheterogeneous micro-devices, each conveying a smallamount of information, can interact autonomously toprovide high-level services to users, via decision supportand task automation.

Addressed IoT scenarios require flexibility andinteroperability in information representation,management, exchange and discovery. Agents runningon mobile and embedded devices should be able todiscover dynamically the best available resourcesaccording to their requirements and preferences,in order to support user’s tasks in a context-aware way. The Semantic Web provides standardknowledge representation models and languages –formally grounded on Description Logics (DLs)–for interoperable information modeling, sharing andautomated inference.

Description Logics are a family of logic languages forKnowledge Representation in a decidable fragment ofFirst Order Logic [1]. Basic DL syntax elements are:

Concept (a.k.a. class) names, standing for sets ofobjects, e.g., medicine, shape, sweetening agent;

Role (a.k.a. object property) names, linking pairs ofobjects in different concepts, like hasDosage, hasShape;

Individuals (a.k.a. instances), specialnamed elements belonging to concepts, e.g.,Acetylsalicylic Acid Regular, Coated Caplet.

Logical constructors combine the above elementsto form concept and role expressions. Each DLhas a specific set of constructors. The conjunctionof concepts, usually denoted as u, is availablein all DLs; Some DLs also use disjunction tand complement ¬. Roles can be combined withconcepts by means of existential role quantification(e.g., medicine u ∃hasDosageForm.coated,

representing medications available in coated form)and universal role quantification (e.g., medicine u∀hasActiveIngredient.Acetylsalicylic Acid, whichdescribes the set of medications whose only activeingredient is acetylsalicylic acid). Other constructsinvolve counting, as number restrictions: coated u ≤2hasExcipient denotes coated medicines with atmost two excipients, and medicine u ≥3hasDosageForm describes available in at least threedosage forms. Concept expressions can be used ininclusion (a.k.a. subsumption) and definition (a.k.a.equivalence) axioms, which model knowledge elicitedfor a given domain. A set of such axioms is calledTerminological Box (TBox), a.k.a. ontology. A set ofindividual axioms (a.k.a. facts) constitutes an AssertionBox (ABox). TBox and ABox together form a KnowledgeBase (KB).

The proposed blockchain-based resource discoveryapproach leverages semantic matchmaking, i.e., theprocess allowing the retrieval and ranking of the mostrelevant resources for a given request, where bothresources and requests are concept expressions w.r.t.a common ontology T . Given a request R and aresource S, subsumption checks whether all featuresin R are included in S; satisfiability checks whetherany constraint in R contradicts some specification inS. Unfortunately these classic inference services enableonly a Boolean full match or no match approach. This isinadequate in advanced scenarios, because full matchesare rare and incompatibility is frequent when dealingwith detailed concept expressions. Complex reasoningand query answering problems such as semanticmatchmaking require further specialized reasoningservices.

Therefore, the proposal exploits the following non-standard inferences [20] to determine a semanticranking of resources w.r.t. a request and a logic-basedexplanation of outcomes:

Concept Contraction: if request R and resource S arenot compatible, Contraction determines which part ofR is conflicting with S. If one retracts conflictingrequirements in R, G (for Give up), a concept K (forKeep) is obtained, representing a contracted version ofthe original request, such that KuS is satisfiable w.r.t. T .The solution G to Contraction represents “why” D u Sproduces a clash.

Concept Abduction: when R and S are compatible butS does not imply R, Abduction determines what shouldbe hypothesized in S in order to completely satisfy R.The solution H (for Hypothesis) to Abduction represents“why” the subsumption relation does not hold. H can beinterpreted as what is requested in R and not specified inS.

49

Page 5: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

Table 2: ALN constructors

Name DL syntax Manchester syntaxTop > owl:ThingBottom ⊥ owl:NothingConcept C CRole R RConjunction C u D C and DAtomic negation ¬A not AUnqualified existential restriction ∃R R some owl:ThingUniversal restriction ∀R.C R only CUnqualified number ≥ n R R min nrestrictions ≤ n R R max n

Definition axiom A ≡ C Class:A EquivalentTo:CInclusion axiom A v C Class:A SubClassOf:C

If R and S are incompatible, one can use Contractionto extract the compatible part K and then Abductionto obtain the required HK for reaching a full match.Furthermore, penalty functions can be computed basedon the structure and number of concepts in G andHK [20], defining a well-founded semantic distancemeasure, which can be used to rank a set of resourcesby relevance (i.e., semantic affinity) w.r.t. the request.

In SWoT contexts, performance constraints ofcomputing devices are strict and require careful softwaredesign choices. Adding new constructors makes DLlanguages more expressive, but leads to an increasein computational complexity of inference services[2]. Hence a tradeoff is needed. This paper refersspecifically to the Attributive Language with unqualifiedNumber restrictions (ALN ) DL. It provides adequateexpressiveness, while granting polynomial complexityto both standard and non-standard inference services.ALN constructors are summarized in Table 2, alongwith the corresponding Manchester syntax serialization7

of the Web Ontology Language (OWL 2)8 core SemanticWeb standard.

3 INTEGRATING SEMANTICS INTOBLOCKCHAIN FRAMEWORKS

The proposed approach defines a semanticresource/service discovery layer (without loss ofgenerality, the word resource will be used from nowon) built upon a basic blockchain framework. An IoTblockchain is intended as a SOA enabling fundamentaloperations as registration, discovery, selection and finalexecution (payment). Such tasks are implemented as

7 OWL 2 Web Ontology Language Manchester Syntax (SecondEdition), W3C Working Group Note 11 December 2012, https://www.w3.org/TR/owl2-manchester-syntax/

8 OWL 2 Web Ontology Language Document Overview (SecondEdition), W3C Recommendation 11 December 2012, http://www.w3.org/TR/owl2-overview/

Peer

Storage

Application Programming Interface

Smart Contracts executor

Reasoning engine

Consensus engine

Figure 2: Framework architecture

Smart Contracts (SC), i.e., their accomplishment isdistributed and validation is gained by consensus.

As shown in the architectural sketch in Figure 2,the proposed framework is integrated in a standardblockchain system, retaining backward compatibilitywith existing Application Programming Interfaces(APIs) offered to application developers. Main featuresare summarized in what follows.

• Agents registered in the blockchain are identifiedby their public keys and associated with accounts.Each agent can perform a semantic-based resourcediscovery in order to take ownership and transferassets between accounts.

• Each asset can be semantically annotated w.r.t. adomain ontology. Agents can register one or moreassets by executing a sequence of transactions.

• Smart contracts can be semantically enhancedby exploiting the non-standard inference servicesdescribed in Section 2.2. Particularly, each

50

Page 6: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

peer locally integrates an embedded matchmakingand reasoning engine, allowing semantic resourcediscovery [20].

• The semantic-based transactions are tracked andvalidated transparently by the consensus engine.

• Semantic transactions are managed in a Merkletree, an efficient and secure storage for detectingerroneous or malicious changes on a transactionblock.

4 KNOWLEDGE-BASED BLOCKCHAIN:REACHING SCALABILITY FOR IOTINFRASTRUCTURES

The distinguishing feature of the proposal w.r.t. classicalblockchain architectures is the integration of semanticmatchmaking fostering the resource discovery. It allowsto compare a request with multiple resource descriptionsby taking into account semantics of their annotationsreferred to a shared ontology. As a result, a score isreturned which measures the semantic distance betweena DL concept expression annotating the request itselfand annotations of every available chain resource. Thislogic-based metric induces a well-founded relevanceranking of resources w.r.t. the request. The inferenceservices also provide a formal explanation of discoveryoutcomes, reinforcing user trust in the discovery process.SOA primitives and corresponding SCs are reported as inwhat follows.

A. Resource registration. Several resource domains co-exist and are tracked in the same blockchain. Everydomain is associated to a different ontology, whichprovides the reference conceptual vocabulary to annotateresources. Every ontology is uniquely identified bya Uniform Resource Identifier (URI), as per OWLspecifications. Each node can own a number of resourceinstances, characterized by the following attributes:

• a URI identifying the resource unambiguously –and possibly representing the resource fruitionendpoint, although this is not required;

• a semantic annotation in OWL language describingthe resource;

• the URI of the reference ontology;

• a resource price: the proposal is fully compatiblewith any type of currency unit, pecuniary orotherwise (e.g., in many IoT applications energy ortime may be useful currency choices).

In order to make a resource available for discoveryand usage, the owner node registers it as an asset on the

blockchain-based stream storage, via standard means.For greater efficiency, only the resource URI is storedon the blockchain in the registration transaction.

B. Resource discovery. The proposal adopts a gossip-based (a.k.a. epidemic) approach [10] to disseminatediscovery requests and aggregate results. This grantsprotocol simplicity and consequently low computationaloverhead, which is a primary requirement for systemscalability. The overall sequence of interaction steps isdepicted in Figure 3:

1. The requester randomly selects n nodes and sendsa multicast request with the discover smartcontract. Parameters of the SC are:

• URI of the reference ontology: this determinesthe resource domain as well as the vocabularyused to express both the request and the resourcesto be retrieved; nodes receiving the requestwill not process resources annotated w.r.t. otherontologies in the semantic matchmaking;

• semantic annotation of the request in OWLlanguage, specifying desired resource featuresand constraints;

• maximum price pmax the requester is willingto pay; resources with a price higher than thisthreshold will be skipped from matchmaking(thus reducing computational overhead);

• minimum semantic relevance threshold smin, asa floating-point number in the [0, 1] interval, witha value of 1 corresponding to a full match and0 to a complete mismatch (both rare situations inrealistic scenarios); after matchmaking, resourceswith a relevance score below this threshold willnot be returned, as deemed irrelevant to therequester;

• maximum number of results rmax to be returned.

2. Nodes receiving the original request perform twooperations in parallel:

• execute semantic matchmaking of their ownresources with the request: for this purpose,resource providers are assumed to be equippedwith an on-board lightweight matchmakingengine, implementing the non-standard inferenceservices in Section 2.2. A list of at most rmax

results is returned, ranked by relevance: eachoutcome Ri is characterized by: (i) resourceowner’s public key; (ii) resource URI ui; (iii)semantic relevance score si ≥ smin; (iv) costpi ≤ pmax, in platform currency;

• select other n nodes randomly and forward therequest.

51

Page 7: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

Requester

1-hop node

2-hop node

n Interaction step

Reply

Other node

Request

1 1

22

2

2

3

3

3

3

4

4

1 1 1 1

22

2

2

1 1

22

2

2

3

3

3

3

1 2

3 4

Figure 3: Discovery protocol interaction steps (for n = 2,m = 2)

3. Nodes receiving the forwarded requests behave inthe same way. When a search depth threshold mis reached (in hops from the original requester),nodes do not forward the request any further andjust perform matchmaking locally.

4. Each queried node returns results to the sender,which propagates them back to the originalrequester following the same route of the requests.In this way, each request will reach

∑mi=1 n

i

random nodes, with n and m tunable parameters: inthe current implementation they have been chosena priori at global level, but –with the proposedinfrastructure already in place– it is trivial toimplement them as variable on a node-by-nodebasis and/or dynamically adaptable in order tomaximize application-specific performance goals.

C. Explanation. The invocation of the explain SCis optional in a typical resource discovery workflow. Itis used when a requester needs a justification of thematchmaking outcome for a specific resource amongreceived results. This can be useful, e.g., to trigger arequest refinement process [18]. Parameters of the SCare (i) the semantic annotation of the request and (ii) theURI of the discovered resource. The recipient replieswith matchmaking outcome explanation, structured as:(i) semantic affinity score 0 ≤ si ≤ 1; conceptexpressions of G and K from Concept Contraction

and of H from Concept Abduction. If computationalcapabilities allow it, the resource owner can hosta local cache to store temporarily the matchmakingoutcomes from executed discover calls, in order toavoid computing them again –even though for just oneresource– in case of explanation request.

D. Resource selection. After receiving all results –or just a subset, if the response delay of some nodesis greater than a fixed timeout– the requester selectsthe best resource(s) with the select smart contract,sending a unicast message to the resource owner withthe resource URI and contextually a currency payment.The recipient answers with a properly usable resourcerepresentation, which depends on the actual kind ofresource and meaning of the URI, e.g., an interfaceendpoint to access a networked device or a further SCto be invoked. The proposal does not constrain resourcefruition in any way, leaving application-specific detailsto the semantic annotation of the resources themselves.

Resource discovery, explanation and selectiontransactions are recorded on the blockchain forrobustness, traceability and accountability purposes.

52

Page 8: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

5 CASE STUDY: VARIABLE SCALE IOT FORFACTORY AUTOMATION

Industry 4.0 is a key emerging sector of theIoT, which can greatly benefit from blockchaintechnologies [6]. Notably, in the pharmaceuticalindustry blockchain offers not only a decentralizedcollaboration infrastructure, but also a ledger formanufacturing process traceability and preventionof product counterfeiting [15]. A case study indistributed and dynamic scheduling of productiontasks in a pharmaceutical factory is presented to betterclarify capabilities of the proposed framework, alsohighlighting its benefits.

Let us consider a basic example where everyproduction task is accomplished in a fully autonomousenvironment by agents –representing production lines–driven by semantic-based reasoning. All agents aremodeled as blockchain nodes and are able to share assets.In the proposed approach, every asset is a specific servicewith a semantic annotation, accomplishing a productionstep in a certain way and with given preconditions andeffects. Assets are also associated to a pecuniary price;in the following examples, prices are normalized w.r.t.production quantity. Similar services can be exposed bydifferent providers for different prices, creating a suitableSOA-based marketplace. A provider node can offer itsservices if it is not already busy in another productionrun.

When a new order is submitted, distributed schedulingoccurs, aimed at covering the whole production processthrough semantic-based discovery and composition ofsequences of elementary tasks. Each task is modeledwith two semantic annotations, for preconditions andeffects respectively. Every single discovery step retrievesa logic-based ranking of available service instances for arequired production task. Additionally, the most suitableservice can be selected in a fully autonomous way,according to the current availability of providers and theprice. Thus, the overall scheduling process is performedin a top-down way: firstly, discovery finds the service(s)with the final requested output as effects; in turn, nodesproviding those services will discover other providersto satisfy their required preconditions, until services arefound which have no uncovered preconditions. Thisallows step-wise distributed discovery of a service chainto be executed (in reverse order) to get the requestedproduct, all without human intervention.

The initial input consists of the semantic annotationof production request and a total currency budget.The given preconditions which must be satisfied bythe production task are compared with the effectsof available services, exploiting the non-standardinferences described in Section 2.2 and computing a

Table 3: Results of semantic matchmaking w.r.t.initial request R

Service Annotation Semantic relevanceASA Regimer E13 1.0ASA Regular E12 0.96ASA Extra E11 0.95

semantic relevance score. The preconditions of the bestservice become the new input for the next discovery step.This process is carried out iteratively until it reaches thefirst step of production. For the sake of simplicity, in thesubsequent example the availability of raw materials isassumed as an always met precondition. At each step,the total budget is reduced by the price of the selectedservice. If during the process the budget becomesnegative, backtracking is performed by selecting a lessexpensive service, even though with lower semanticaffinity. When the overall discovery ends, the dynamicscheduling of the production process is accomplished.

The following example focuses on the specificproduction of medications based on acetylsalicylic acid(ASA, a.k.a. aspirin). Different ASA concentrationscorrespond to different therapeutic uses, ranging fromlow-dose maintenance therapy to prevent recurring heartattacks or stroke, to regular or extra dose for normal oracute pain relief, respectively.

A private hospital requires the supply of a batchof ASA-based medications, to be used for therapeuticpurposes in elderly heart patients for secondaryprevention after an infarction event. The desiredconcentration for such therapy is between 75 and 100mg. The maximum available monetary budget is e 100per production batch. Using concepts defined in thedomain ontology –a relevant excerpt of it is shown inFigure 4– the request R is formalized as reported inFigure 5 in OWL 2 Manchester Syntax. It is the inputof the first semantic-based discovery step. Figure 5 alsopresents available services and their prices in the formSji ≡ 〈Eji, Pji, pji〉, where j denotes the productionstep and i the specific service instance. Effects Eji andpreconditions Pji are described w.r.t. the same domainontology.

Let us suppose a semantic affinity threshold smin

of 0.9: only services with at least this score will beconsidered. The first semantic matchmaking returns theranked list of services in affinity order reported in Table3. Overall match score s ranges from 0 to 1. It iscomputed by means of the formula:

f(x) =

{1− p, 1− p > smin

0, otherwise(1)

53

Page 9: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

Figure 4: Excerpt of the ontology engineered for thecase study

with the semantic penalty function p computed as:

p =w · penaltyc + (1− w) · penaltya

penaltymax(2)

Where penaltyc is the penalty calculated by ConceptContraction between the request R and each annotationof service effects Ei, while penaltya is the penaltyvalue of the Concept Abduction procedure between theconsistent part K of the request R and Ei. The valueof p is normalized w.r.t. penaltymax i.e., the maximumpossible semantic distance (which is the one between Rand the most generic > concept, and depends only onaxioms in the reference domain ontology [18]). Theparameter w ranges from 0 to 1: it determines therelative weight of explicitly conflicting elements in Ei

w.r.t. R. The chosen value in the following example is0.6, to penalize services having conflicting features withrequests.

The first semantic matchmaking step aims to selectthe medicine, which is distinguished essentially bythe active ingredient concentration. The hospitalnode on the blockchain invokes the discover

Request: R ≡ (hasActiveIngredient onlyAcetylsalicylic Acid) and (hasASAConcentrationmin 75) and (hasASAConcentration max 100)

S11: Acetylsalicylic Acid Extra ≡ 〈E11, P11, p11〉≡ 〈{(hasActiveIngredient min 1) and(hasActiveIngredient only (Acetylsalicylic Acidand Caffeine) and (hasASAConcentration min500) and (hasASAConcentration max 500)},{(hasDosageForm min 1) and (hasDosageForm onlyCoated)}, e20〉

S12 : Acetylsalicylic Acid Regular ≡ 〈E12, P12, p12〉≡ 〈{(hasActiveIngredient min 1) and(hasActiveIngredient only Acetylsalicylic Acid)and (hasASAConcentration min 325) and(hasASAConcentration max 325)}, {(hasDosageFormmin 1) and (hasDosageForm only Chewable)},e25〉

S13 : Acetylsalicylic Acid Regimer ≡〈E13, P13, p13〉 ≡ 〈{(hasActiveIngredientmin 1) and (hasActiveIngredient onlyAcetylsalicylic Acid) and (hasASAConcentrationmin 81) and (hasASAConcentration max 81)},{(hasDosageForm min 1) and (hasDosageForm onlyEnteric Coated)}, e30〉

Figure 5: Initial request and services in the firstmatchmaking step

Table 4: Results of semantic matchmaking w.r.t.request P13

Service Annotation Semantic relevanceEnteric Coated Caplet E21 1.0

Coated Tablet E23 0.93Coated Caplet E22 0.93

Chewable Tablet E24 0.86

smart contracts on suppliers’ nodes providing finishedproducts. The product best matching the requestis Acetylsalicylic Acid Regimer and the budget isupdated to e 70.

When manufacturing medicines for daily use inmaintenance therapy, it is good practice to adopt acapsule dosage form with enteric coating to preventgastric irritation. In order to discover the most suitableprovider for medicine dosage form, a new semanticrequest is submitted to available nodes. The requestannotation corresponds to the preconditions of thepreviously selected service, as depicted in Figure 6.Results are shown in Table 4. The most suitable dosageform is Enteric Coated Caplet. On the other hand,Chewable Tablet will never be considered because itsscore is less than the affinity threshold. The price ofservice S21 shall be deducted from budget, leaving e 35.

In the selection of excipients guaranteeing theproperties associated with the dosage form, the medicinerelease profile must be considered. Release must occur inthe intestinal tract rather than in the stomach. By joining

54

Page 10: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

Request: P13

S21: Enteric Coated Caplet ≡ 〈E21, P21, p21〉≡ 〈{(hasDosageForm min 1) and(hasDosageForm only Enteric Coated) and(hasImprint min 1) and (hasImprint onlyOne Side Active Ingredient Dosage) and(hasShape min 1) and (hasShape only Round)},{(hasExcipient min1) and (hasExcipient only(Hypromellose and Polymethacrylates))}, e30〉

S22: Coated Caplet ≡ 〈E22, P22, p22〉 ≡〈{(hasDosageForm min 1) and (hasShape min1) and (hasDosageForm only Coated) and(hasImprint min 1) and (hasImprint onlyOne Side Logo) and (hasLineScored min 1) and(hasLineScored only One Side Line Scored)and(hasShape only Caplet)}, {(hasExcipientmin 1) and (hasExcipient only Hypromellose)},e25〉

S23: Coated Tablet ≡ 〈E23, P23, p23〉 ≡〈{(hasDosageForm min 1) and (hasDosageForm onlyCoated) and (hasImprint min 1) and (hasImprintonly Both Side Logo) and (hasShape min 1) and(hasShape only Round)}, {(hasExcipient min 1)and (hasExcipient only Hypromellose)}, e25〉

S24: Chewable Tablet ≡ 〈E24, P24, p24〉 ≡〈{(hasDosageForm some) and (hasDosageFormonly Chewable) and (hasImprint some)and (hasImprint only One Side Logo) and(hasShape some) and (hasShape only Round)},{(hasExcipient some) and (hasExcipient only(Flavor and Sweetening Agent)}, e30〉

Figure 6: Request and services in the secondmatchmaking step

the coating agent (e.g., hypromellose) with specific film-forming agents (e.g., polymethacrylates), it is possibleto release in specific intestinal sites. Figure 7 showsannotation P21, which has become the new request forthe next discover SC calls to excipient suppliers, andavailable semantic service descriptions.

As summarized in Table 5, the bestsemantic affinity score is given byDelayed Release Tablet Excipients effects.Coated Tablet Excipients missed the requestedpolymethacrylates excipient, while chewable tabletsmissed also hypromellose. The final budget is e 0,so allocated currency is enough to cover the overallproduction process. Production can now start in acompletely automatic way, by invoking select SCsin the reverse order of the semantic-based compositionprocess.

Notice that semantic annotations in the aboveexamples have been simplified for the sake ofunderstandability, as evident by the fact that relevancescores are generally high. In real blockchain-basedindustrial IoT scenarios, more complex requests andservice descriptions are expected, and semantic-based

Request: P21

S31: Orange Chewable Tablet Excipients ≡〈E31, P31, p31〉 ≡ 〈{(hasExcipient min 1)and(hasExcipient only (Corn Starch and Dextroseand FDC yellow 6 aluminum lake and Orange Flavorand Sodium Cyclamate)}, {owl:Thing}, e25〉

S32: Cherry Chewable Tablet Excipients ≡〈E32, P32, p32〉 ≡ 〈{(hasExcipient min 1)and (hasExcipient only (Cherry Flavorand Corn Starch and Dextrose andFDC red 3 aluminum lake and Sodium Cyclamate)},{owl:Thing}, e30〉

S33: Delayed Release Tablet Excipients ≡〈E33, P33, p33〉 ≡ 〈{(hasExcipient min 1)and (hasExcipient only(Carnauba Wax andCorn Starch and Croscarmellose Sodiumand Hypromellose and Lactose Monohydrateand Microcrystalline Cellulose andPolymethacrylates)}, {owl:Thing}, e35〉

S34: Coated Tablet Excipients ≡ 〈E34, P34, p34〉≡ 〈{(hasExcipient min 1) and (hasExcipientonly (Corn Starch and Hypromellose andPowdered Cellulose and Triacetin)},{owl:Thing},e25〉

Figure 7: Request and services in the lastmatchmaking step

Table 5: Results of semantic matchmaking w.r.t.request P21

Service Annotation Semantic relevanceDelayed ReleaseTablet Excipients

E33 1.0

Coated TabletExcipients

E34 0.93

Orange ChewableTablet Excipients

E31 0.87

Cherry ChewableTablet Excipients

E32 0.83

discovery will be even more important to rank resourcesbased on their specific features.

6 EXPERIMENTS

This section collects and presents early experimentalresults devoted to assess effectiveness and scalabilityof the proposed approach. Implementation andperformance evaluation were carried out exploiting theIroha framework of Hyperledger. Iroha is implementedin C++ and provides the following components:

• Iroha core includes the distributed ledgerinfrastructure, the consensus algorithm, thepeer-to-peer communication and the smart contractenvironment. Particularly, the Sumeragi BFTconsensus algorithm is used, inspired by B-Chain[5].

55

Page 11: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

• Native iOS/Android libraries provide functionsfor interacting with the blockchain (e.g., digitallysigning transactions).

The developed prototype provided the followingenhancements w.r.t. the basic Iroha environment:

• The server API was extended with support forsemantic matchmaking.

• The SCs described in Section 4 were implementedin Java. The Mini-ME reasoning and matchmakingengine [20] was integrated to execute inferencetasks.

• zlib9 compression library was exploited to copewith the well-known verbosity of ontologylanguages such as OWL.

Unfortunately, comparative evaluations could not becarried out, as no other blockchain-based resourcediscovery approaches have been found in literature or inthe market. Furthermore, so far semantic-based SmartContract approaches exist as theoretical proposals, asdiscussed in Section 7, but they have not been integratedyet in blockchain implementations.

Materials and methods. In order to obtaina quantitative performance analysis of the proposedframework, various parameters were measured andevaluated. Small, medium and large scale scenarioswere considered, respectively with 10, 50 and 150nodes. In each scenario nodes were split in twosets: producers, i.e., providers of annotated resources,registered in the blockchain; consumers, i.e., resourcerequesters which execute smart contracts to performsemantic-based discovery, as described in Section 4.

The following parameters were set: (i) experimentduration was 300 s; (ii) the consumer/producer ratiowas 0.1; (iii) each producer registered 20 randomly-generated annotations; (iv) each consumer sent a newrandomly-generated request every 10 s; (v) each requestcould be forwarded to a subset of four nodes; (vi) arequest was aborted if no match was found after thesecond hop; (vii) the minimum threshold of semanticaffinity was 0.9.

Each scenario was executed several times by varyingthe following parameters: (i) the discovery timeout wasset to 2, 6 and 10 s; (ii) the explanation SC, described inSection 4 was either enabled or disabled. Experimentswere performed on a workstation with Intel Xeon E5-2643 CPU at 3.30 GHz, 48 GB of RAM and Ubuntu16.04 (64bit) operating system.

The Docker platform was used to deploy the testbed,by performing the following steps:9 http://zlib.net/

Figure 8: Processing time for tasks on 10 nodes

Figure 9: Processing time for tasks on 50 nodes

Figure 10: Processing time for tasks on 150 nodes

• the prototype was compiled as a Docker image,used to create all the scenarios;

• each node was executed as a container instance ofthe compiled image;

• a Docker network was created to allowcommunications among the nodes;

• the Docker API SDK10 was used to manage theexperiments execution.

10https://github.com/spotify/docker-client

56

Page 12: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

Figure 11: JVM average memory usage per node

The following statistics were collected: (i) averageprocessing time for computing tasks on a given request;(ii) average turnaround time for accomplishing requests;(iii) average Java Virtual Machine (JVM) memory usageper node; (iv) average hit ratio per node. Hit ratiois defined here as the percentage of requests whichretrieve at least one resource satisfying both price andsemantic relevance constraints within the given timeout.Experimental results are reported hereafter.

Time. There were no substantial differences betweenaverage turnaround time for requests in experimentsinvolving 10 and 50 nodes, as Figure 8 and Figure 9show. Absolute time values can be deemed as very lowwith the small and medium scenarios, while with 150nodes turnaround time reached the timeouts at 2 and 6seconds, as depicted in Figure 10. Processing times tendto increase at higher scales due to the needed consensusabout computation results among a larger number ofnodes. Furthermore, in all the experiments the time ofdiscovery process dominates explanation and selection.This was expected, as semantic matchmaking is the mostcomputationally intensive task, even if performed withan optimized reasoning engine [20].

Memory. RAM consumption per node is mainlyrelated to Java Virtual Machine requirements for theIroha framework. No RAM constraints were imposedin the configuration of the JVM and Docker. Themain reason for that was to avoid affecting otherperformance metrics. As reported in Figure 11 andFigure 12, the average and maximum memory usageper node decreased slightly for larger scenarios. Thiscan be explained with memory management policies ofthe testbed host, which must divide RAM among anincreasing number of nodes.

Hit ratio. Figure 13 shows average hit ratio isclosely related to the number of nodes. The bestresults were obtained in the 50 nodes scenario. The10 nodes scenario had a lower average hit ratio, likelydue to fewer semantic resources available on the wholenetwork, making it more difficult to retrieve a resource

Figure 12: JVM maximum memory usage per node

Figure 13: Average hit ratio depending to timeout

satisfying both price and semantic affinity constraints.Finally, in the 150 nodes scenario the average hit ratiowas clearly lower. In part, this was due to Dockerresource contention issues affecting the CPU, file systemand network when the number of containers on thesame host grew (as Iroha nodes are rather resource-consuming processes). This compounded overhead withthe inherent complexity of consensus algorithms, leadingto the turnaround time issues already discussed. Theeffect was an increased probability of timeout expirationand consequent resource miss. In Figure 13, indeed, itcan be noticed that with 150 nodes the larger the timeoutthe higher the hit ratio.

Globally, experimental outcomes show the approachis effective and sustainable for small-to-mediumpermissioned blockchains. Higher scalability can beachieved by properly setting the discovery protocolparameters concerning breadth and width of requestpropagation as well as response timeout, based on theexpected number of participating nodes.

By comparing the relative duration of resourcediscovery and selection sub-tasks, it can be inferredthat the semantic-based proposed enhancementcauses an increase of about an order of magnitude.This may be considered high, but the case studyin Section 5 demonstrates how many advanced

57

Page 13: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

blockchain applications and scenarios in the IoT willbe impossible without the intelligence and flexibility ofservice/resource discovery provided by a sophisticatedapproach.

Larger-scale scenarios could not be set up on thereference testbed due to the above issues with Docker. Anew testbed based on a computer cluster will be set up tore-evaluate semantic-enhanced blockchain performancein the same scenarios –possibly removing the single-hostbias– as well as to run larger networks.

7 RELATED WORK

Centralized information, service and device managementmodels are clearly not scalable enough for the ever-growing IoT. In addition to cost and performanceissues, they pose security and trust problems. In[17] the transparent trustless peer-to-peer modelsenabled by blockchain technologies are proposed asa viable approach to sustain the current and futureexpansion of reliable IoT networks and applications.Emerging distributed file systems, billing servicesand other blockchain-based tools can be leveraged asan application-agnostic machine-to-machine middlewarelayer for running IoT resource/service marketplaces withminimal or no human intervention [3].

Industrial research is experimenting with manypossible scenarios within Industry 4.0, deemed asa prominent IoT-based use case for blockchain [6].Asset tracking and supply chain are among the mostpopular applications, due to the widely recognizedbenefits of trustless DAO collaboration [13, 14, 15]and the easy fit of blockchain solutions in existingindustry standards for information-sharing distributedinfrastructures, most notably the Electronic ProductCode Information Services (EPCIS) [11]. The simplestapproaches rely on transactional ledgers for assettransfer, which grant high troughput with low costs[3]. Blockchain networks based on SCs enable moreflexible systems, allowing any application logic to beimplemented and embedded in the blockchain [3], andalso supporting discoverable, composable and verifiablemulti-step business processes in multi-party service-oriented architectures (SOA) [16]. The proposedapproach clearly falls in this category.

Unfortunately, the benefits of smart contracts come ata not-negligible cost in terms of concurrent execution oftransactions and, consequently, system throughput [3].This occurs because in the general case, before executinga smart contract, a node cannot know what computingresources it will need –even possibly including othersmart contracts– and what its effects will be on thesystem state. That makes it impossible to run all

transactions in a block in parallel. In Bitcoin-style assettransfer blockchains, on the contrary, transaction havea fixed inherent semantics: conditions for transactiondependencies and ordering are simpler and known inadvance, leading to the possibility to execute (usuallymost of) the transactions in a block concurrently andthus achieve higher throughput and scalability. This isa significant barrier to advanced blockchain applicationsin the IoT, which require freely specifiable businesslogic and low-latency high-throughput transactions at thesame time.

Research on blockchain scalability is very active,mainly by optimizing performance of consensusprotocols [22] and by introducting parallelism in ablockchain through sidechains and/or sharding [4].Basically, the use of sidechains will transform the chainstructure in a direct acyclic graph. On the otherhand, sharding is a parallelization technique borrowedfrom Database Management Systems, consisting insplitting data elements (e.g., rows in relational databases)horizontally across node subsets in a cluster. Researchresults, however, are not mature enough [23] for buildingefficient, robust, large-scale IoT-oriented blockchains.In this respect, the approach proposed here aimed tomitigate scalability issues by providing a semantic-enabled SOA above contract-based blockchains: whileenabling general-purpose service/resource discovery andretrieval, this layer has a finite set of smart contracts asprimitives, which do not have recursive calls.

Many opportunities exist for exploiting logic-basedtechnologies in blockchains. In [6] a prototypicalontology was proposed to annotate transactions withLinked Data [7] in order to make contents of theblockchain easier to explore for humans throughsemantic-enabled user agents. The ontology-based smartcontract design of a proof-of-concept blockchain systemin [12] enabled traceability in supply chains. Besidesacting as design guidelines, logical languages can beused to specify formally and execute smart contracts.Several logical frameworks have been applied to theproblem of SC specification and execution. The workin [9] used defeasible reasoning, a well-known approachto formalize legal regulations and contracts. On the otherhand, [8] endorsed the usage of Linear Temporal Logic(LTL), which is implemented in a large number of modelchecking systems. This allows formal verification thatthe behavior of a SC satisfies specific conditions. Theneed for formal verification of SCs in business-orientedblockchains was also highlighted in [16].

In the present work DLs are used to enablediscovery and composition of services/resources on ablockchain. This is a relevant issue in blockchain-based marketplaces, and particularly in upcoming IoTapplications [8]. To the best of our knowledge no

58

Page 14: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

other automated semantic-based discovery approach forblockchain systems exists; we claim it has the potentialof a clear improvement in flexibility and quality ofdiscovery w.r.t. existing discovery approaches mutuatedfrom the Domain Name System (DNS) [3].

8 CONCLUSION AND FUTURE WORK

Given typical scalability issues in large and very largeIoT infrastructures, the paper proposed a frameworkredesigning resource discovery thanks to the basicblockchain infrastructure. Registration, discovery,selection and finalizing operations have been revisited assmart contracts in order to comply with an opportunisticand distributed execution leveraging validation byconsensus. An important feature of the proposalresides on the logic-based explanation of discoveryoutcomes, obtained through non-standard inference formatchmaking among request and resources. Earlyexperiments on the Hyperledger Iroha framework havebeen carried out and have been presented to assessfeasibility of the approach.

Future work will be essentially directed to migratethe testbed toward the Docker Swarm scheduling tool incluster computing environments, in order to increase thesimulation scale of several order of magnitude nodes.

ACKNOWLEDGMENTS

The authors acknowledge partial support of Apuliaregion project PERSON (PERvasive game forperSOnalized treatment of cognitive and functionaldeficits associated with chronic and Neurodegenerativediseases).

REFERENCES

[1] F. Baader, D. Calvanese, D. Mc Guinness,D. Nardi, and P. Patel-Schneider, The DescriptionLogic Handbook. Cambridge University Press,2002.

[2] R. Brachman and H. Levesque, “The Tractabilityof Subsumption in Frame-based DescriptionLanguages,” in 4th National Conference onArtificial Intelligence (AAAI-84), 1984, pp. 34–37.

[3] K. Christidis and M. Devetsikiotis, “Blockchainsand Smart Contracts for the Internet of Things,”IEEE Access, vol. 4, pp. 2292–2303, 2016.

[4] K. Croman, C. Decker, I. Eyal, A. E. Gencer,A. Juels, A. Kosba, A. Miller, P. Saxena, E. Shi,E. G. Sirer et al., “On scaling DecentralizedBlockchains,” in International Conference onFinancial Cryptography and Data Security, 2016,pp. 106–125.

[5] S. Duan, H. Meling, S. Peisert, and H. Zhang,“BChain: Byzantine Replication with HighThroughput and Embedded Reconfiguration,”in Principles of Distributed Systems - 18thInternational Conference, OPODIS 2014,December 2014, pp. 91–106.

[6] M. English, S. Auer, and J. Domingue, “BlockChain Technologies & The Semantic Web: AFramework for Symbiotic Development,” inComputer Science Conference for University ofBonn Students, J. Lehmann, H. Thakkar, L. Halilaj,and R. Asmat, Eds., 2016, pp. 47–61.

[7] T. Heath and C. Bizer, Linked data: Evolvingthe Web into a Global Data Space, ser. Synthesislectures on the semantic web: theory andtechnology. Morgan & Claypool Publishers, 2011.

[8] R. Hull, V. S. Batra, Y.-M. Chen, A. Deutsch,F. F. T. Heath III, and V. Vianu, “Towards aShared Ledger Business Collaboration Languagebased on Data-Aware Processes,” in InternationalConference on Service-Oriented Computing, 2016,pp. 18–36.

[9] F. Idelberger, G. Governatori, R. Riveret,and G. Sartor, “Evaluation of Logic-BasedSmart Contracts for Blockchain Systems,” inInternational Symposium on Rules and RuleMarkup Languages for the Semantic Web, 2016,pp. 167–183.

[10] M. Jelasity, A. Montresor, and O. Babaoglu,“Gossip-Based Aggregation in Large DynamicNetworks,” ACM Transactions on ComputerSystems (TOCS), vol. 23, no. 3, pp. 219–252, 2005.

[11] A. Kennedy, M. Southall, G. Morgan, K. Traubet al., “EPC Information Services (EPCIS)Specification,” GS1, Tech. Rep., May 2014,available: http://www.gs1.org/epcis/epcis/1-1.

[12] H. M. Kim and M. Laskowski, “Towardsan Ontology-Driven Blockchain Designfor Supply Chain Provenance,” 2016,https://ssrn.com/abstract=2828369.

[13] K. Korpela, J. Hallikas, and T. Dahlberg, “DigitalSupply Chain Transformation toward BlockchainIntegration,” in Proceedings of the 50th HawaiiInternational Conference on System Sciences,2017, pp. 4182–4191.

[14] J. Mattila, T. Seppala, and J. Holmstrom, “Product-centric Information Management: A Case Study ofa Shared Platform with Blockchain Technology,”in Berkeley Roundtable on the InternationalEconomy, 2016.

59

Page 15: Semantic Blockchain to Improve Scalability in the Internet ...

Open Journal of Internet of Things (OJIOT), Volume 3, Issue 1, 2017

[15] M. Mettler, “Blockchain Technology in Healthcare:The Revolution Starts Here,” in IEEE 18thInternational Conference on e-Health Networking,Applications and Services (Healthcom), 2016, pp.1–3.

[16] A. Norta, “Creation of Smart-ContractingCollaborations for Decentralized AutonomousOrganizations,” in International Conference onBusiness Informatics Research. Springer, 2015,pp. 3–17.

[17] V. Pureswaran and P. Brody, “Device Democracy:Saving the Future of the Internet of Things,” IBMInstitute for Business Value, Tech. Rep., September2014, available: http://www-935.ibm.com/services/us/gbs/thoughtleadership/internetofthings.

[18] M. Ruta, E. Di Sciascio, and F. Scioscia, “ConceptAbduction and Contraction in Semantic-basedP2P Environments,” Web Intelligence and AgentSystems, vol. 9, no. 3, pp. 179–207, 2011.

[19] F. Scioscia and M. Ruta, “Building a Semantic Webof Things: Issues and Perspectives in Information

Compression,” in Semantic Web InformationManagement (SWIM’09). In Proceedings of the3rd IEEE International Conference on SemanticComputing (ICSC 2009), 2009, pp. 589–594.

[20] F. Scioscia, M. Ruta, G. Loseto, F. Gramegna,S. Ieva, A. Pinto, and E. Di Sciascio, “AMobile Matchmaker for the Ubiquitous SemanticWeb,” International Journal on Semantic Web andInformation Systems (IJSWIS), vol. 10, no. 4, pp.77–100, 2014.

[21] N. Szabo, “Formalizing and SecuringRelationships on Public Networks,” First Monday,vol. 2, no. 9, 1997.

[22] M. Vukolic, “The quest for Scalable BlockchainFabric: Proof-of-Work vs. BFT Replication,” inInternational Workshop on Open Problems inNetwork Security. Springer, 2015, pp. 112–125.

[23] H. Wang, K. Chen, and D. Xu, “A Maturity Modelfor Blockchain Adoption,” Financial Innovation,vol. 2, no. 12, 2016.

60

Page 16: Semantic Blockchain to Improve Scalability in the Internet ...

M. Ruta, F. Scioscia, S. Ieva, G. Capurso, E. Di Sciascio: Semantic Blockchain to Improve Scalability in the Internet of Things

AUTHOR BIOGRAPHIES

Michele Ruta received themaster’s degree in ElectronicsEngineering from thePolytechnic University ofBari in 2002 and the Ph.D.in Computer Science in 2007.He is currently associateprofessor. His research interestsinclude pervasive computingand ubiquitous web, mobilee-commerce applications,

knowledge representation systems and applicationsfor wireless ad-hoc contexts. On these topics, he hasco-authored more than 100 papers in internationaljournals, edited books and conferences. His papersat the ICEC-2007 and SEMAPRO-2010 conferencesreceived the best paper award. He is involved in variousresearch projects, he is Program Committee member ofseveral international conferences and workshops andeditorial board member of journals in areas related to hisresearch interests.

Floriano Scioscia received themaster’s degree in InformationTechnology Engineering withhonours from PolytechnicUniversity of Bari in 2006,and the Ph.D. in InformationEngineering in 2010 from thesame institution. He is currentlya post-doc research fellowat the Information SystemsLaboratory (SisInfLab) in

the same university. His research interests includeknowledge representation systems and applications forpervasive computing and the Internet of Things. Heco-authored about 70 papers in international journals,edited books and conferences, and received the bestpaper award at the ICEC-2007 and SEMAPRO-2010Conferences.

Saverio Ieva received themaster’s degree in InformationTechnology Engineering fromPolytechnic University of Bari in2007. He is currently a researchassistant at the InformationSystems Laboratory (SisInfLab)in the same university. Hisresearch interests includepervasive computing and theInternet of Things, knowledge

representation systems and applications for navigationsystems. On these topics, he has co-authored papers ininternational journals and conferences.

Giovanna Capurso received themasters degree in InformationTechnology Engineering withhonours from PolytechnicUniversity of Bari in 2016.She is currently a Ph.D.student in Electrical andInformation Engineering inthe same institution. Herresearch interests include

knowledge representation systems, reasoning andapplications for pervasive computing and ubiquitoussmart environments.

Eugenio Di Sciascio receivedthe master’s degree with honoursfrom University of Bari, andthe Ph.D. from PolytechnicUniversity of Bari. He iscurrently full professor ofInformation Systems at the sameuniversity, where he is servingas Rector. He leads the researchgroup of the InformationSystems Laboratory. Formerly,

he has been an assistant professor at University ofLecce and associate professor at Polytechnic Universityof Bari. His research interests include multimediainformation retrieval, knowledge representation ande-commerce. He is involved in several national andEuropean research projects related to his researchinterests. He co-authored papers that received bestpaper awards at the ICEC-2004, IEEE CEC-EEE-2006, ICEC-2007, SEMAPRO-2010 and ICWE-2010conferences.

61