<!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 Peer-to-Peer Notification System for Distributed Online Social Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michele Amoretti</string-name>
          <email>michele.amoretti@unipr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lorenzo Gandolfi</string-name>
          <email>lorenzo.gandolfi@studenti.unipr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michele Tomaiuolo</string-name>
          <email>michele.tomaiuolo@unipr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Parma</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>142</fpage>
      <lpage>148</lpage>
      <abstract>
        <p>-Current social networking systems are almost al- However, such P2P systems have to confront with the most ways centralized systems. This architecture poses issues about convenient features provided by current social platforms, both privacy, censorship and control of personal data. On the other in terms of functionalities and responsiveness. While some hwaitnhd,apdedeirti-oton-apleaerrcshyistteecmtusrcaalncoomveprlceoxmitey.thTehsies ipssaupeesr, idneesxccrhibaensgae trade-offs are certainly to be considered, it is necessary to peer-to-peer system provided with a spanning tree for distributing allow users of distributed social platforms to develop fluent online notifications inside a group of interested peers. These online discussions, with notifications of new activities received notifications may regard discussion messages for a chat system, with short and acceptable delays. opprearraftoincryumlakerdi,ndbwyeofudseuesprcsdraiobtfee amanDedsisstacrogibmesuptfeaodrreOsdpnirflifenearedeinSntogcmisaoelccNihaaelntwaiscomtrivksi.tfiIoenrs vidIendtwhiisthpaapsepra,nwniengdetrseceribfoer sdpiestcriifibcuatilnlyg aonPli2nPe nsyostitfiemcatipornosthe creation and management of the spanning tree. inside a group of interested users. These notifications can Index Terms-Distributed Systems, Online Social Network, regard discussion messages for a chat system, or any kind Peer-to-Peer, Notification Systems. of update messages for spreading social activities performed by users of a Distributed Online Social Network (DOSN) [7]I. INTRODUCTION [10]. In particular, we describe and compare some mechanisms for the creation and management of the spanning tree. With respect to similar approaches, our spanning tree does not rely on a specific P2P architecture, and does not require that all nodes of the underlying P2P network are fully involved in the DOSN. Any structured P2P network (such as Chord, Kademlia, or Pastry) could be used as a substrate for several partially overlapping spanning trees, each one corresponding to a specific group of users. The manuscript is organized as follows. Section II analyzes the state of the art for P2P publish-subscribe systems. Section IV illustrates and proposes some algorithms for the creation and management of a tree structure among peers. Section V shows the results obtained by comparing the proposed different mechanisms and policies. Finally, some concluding remarks are provided in Section VI.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Social media attracts millions of people, who in fact spend
most of their online time social networking, for a variety
of everyday actions. Accordingly, these social platforms are
assuming different forms and aims, including distribution of
news, sharing of photos and videos, direct messaging, group
discussions, etc. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Together with their mass spreading and
also in consequence of big scandals, social platforms are also
raising concern and criticism. In particular, many users are
wary of privacy threats coming from other users, external
entities, and also directly from the service providers.
      </p>
      <p>
        In fact, even if the social networking systems are greatly
dissimilar in their user base and functionality [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], they are
almost always centralized systems, which often allow service
providers to: (i) mine user provided data for advertisements
and other purposes, (ii) guide their users into “walled gardens”,
without full control over their own information [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], (iii)
perform a-priori or a-posteriori censorship [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], (iv) disclose all
the information they have to other entities, either motivated by
selfish interests or forced under legal terms and other forms
of pressure.
      </p>
      <p>
        Conversely, in exchange with additional architectural
complexity, peer-to-peer (P2P) systems essentially achieve
automatic resource scalability, in the sense that the availability of
resources is proportional to the number of users [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Moreover,
without a central entity, nobody is in the position of censoring
data systematically. Privacy can also be achieved, by means
of key systems and cryptography. In a P2P system, if global
trusted third parties are avoided, no entity has the ability to
disclose a user’s private key or other sensible credentials.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. RELATED WORKS</title>
      <p>
        Castro et al. proposed Scribe [
        <xref ref-type="bibr" rid="ref12">11</xref>
        ], an application level
multicast infrastructure on top of the Pastry DHT, which is
used in a number of projects for peer-to-peer collaboration
and dissemination of information. Scribe creates and manages
multicast groups on top of Pastry. Any Scribe node can create a
group, providing a group ID and some credentials to be used
for access control. Other nodes can then join the group or
send multicast messages, which are delivered to all members.
Multicast messages are delivered by some forwarder nodes,
which form a multicast tree. Forwarder nodes themselves are
not required to be part of the group, instead they automatically
become forwarders if they are on the Pastry route of some new
member of the group, when it sends a join request.
      </p>
    </sec>
    <sec id="sec-3">
      <title>FeedTree [12] is an RSS (Real Simple Syndication) feed</title>
      <p>distribution service based on P2P subscription mechanisms.
FeedTree proposes a transition toward pushing RSS items over
a P2P network, distributing the load over the nodes of a group
multicast tree. For this purpose, FeedTree exploits Pastry and
Scribe.</p>
      <p>
        Xu et al. introduced Cuckoo [
        <xref ref-type="bibr" rid="ref14">13</xref>
        ] as a decentralized and
socio-aware online micro-blogging service. It follows a hybrid
approach consisting of: (i) a structured overlay network,
Pastry, and a gossip protocol for disseminating micro-news among
users with the same interests; and (ii) support for centralized
dedicated services, like Twitter, which in fact still store user
profiles and other data. Friend nodes help each other to balance
load, thus creating a sort of virtual node. Notifications are dealt
with direct push, in the case of normal users, or with gossip
propagation, in the case of celebrities and broadcasters.
      </p>
      <p>
        Perfitt &amp; Englert proposed Megaphone [
        <xref ref-type="bibr" rid="ref15">14</xref>
        ] as a
microblogging system, based on an optimized, trustworthy
peer-topeer network. In fact, nodes are enabled to sign and encrypt
each piece of content they publish, making it verifiable and
confidential for subscribers. The basic distribution mechanism
is based on Scribe multicast trees. Thus, a subscriber node has
to know in advance the node ID of the posters to follow, or
at least it has to be able to generate it. The poster’s node
ID corresponds exactly to a Scribe multicast group ID. In
Megaphone, the node ID is a hash of its public key, and the
couple of public/private keys is generated autonomously by
each node.
      </p>
      <p>
        Messina et al. introduced HySoN [
        <xref ref-type="bibr" rid="ref9">15</xref>
        ], based on an overlay
network of software agents, which exploits a gossip protocol.
HySoN allows users to locally maintain sensitive user’s data,
satisfying the privacy requirements preserving sensitive data.
Indeed, the properties involved in the HySoN user aggregation
are inferred by local data not published in the social network.
      </p>
      <p>
        Though some research works exist, for building a
notification system exploiting the Pastry DHT, very few works try
to exploit the Kademlia DHT, which is used in BitTorrent
and other content sharing systems, including the Blogracy
platform [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Matl et al. [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] deal with group communications
in overlay networks based on the Kademlia distributed hash
tables (DHT), considering three cases:
• Anycast, to deliver a message to any member of the
group;
• Multicast, to deliver to all members;
• Manycast, to deliver to a particular subset of the group.
The article describes some abstract solutions, based on tree
structures built on top of the Kademlia layer. The advantages
of these structures are better exploited if the branches are
balanced. Additional maintainance tasks are required to guarantee
robustness and reliability, also in the case of frequent
disconnections of nodes. These tasks require periodical monitoring
of links and recovery mechanisms, for reconnecting the whole
tree and avoiding loosing messages.
      </p>
      <p>With respect to the aforementioned approaches, our
spanning tree does not rely on a specific P2P architecture.
Moreover, it does not require that all nodes of the underlying
P2P network are fully involved in the DOSN. Structured P2P
networks like Chord, Kademlia, or Pastry, could serve as a
substrate for partially overlapping spanning trees, each one
corresponding to a specific group of users. That is, one peer
may belong to different groups at the same time.</p>
    </sec>
    <sec id="sec-4">
      <title>III. DISTRIBUTED SOCIAL ARCHITECTURES</title>
      <p>The diffusion of online social networks is opening new
scenarios for envisaging novel kinds of applications, either to
support new social networking activities, or to exploit
established relationships among users and use them to offer
higherlevel services. Software agents are a natural fit for mediating
access to local software- or hardware-based services, including
access to data, sensors, monitors, printers and various kinds
of actuators. Given their ability to negotiate and plan in a
dynamic social context, software agents are also good for
composing locally available services and resources, following
existing trust relationships with other persons and agents
located in the users proximity area. New trust relationships
can also be created, on the basis of reputation and mutual
acknowledgement, through the incremental and controlled
exchange of profile data.</p>
      <sec id="sec-4-1">
        <title>A. Autonomous agents for DOSNs</title>
        <p>Especially in the case of completely distributed or federated
social networking platforms, multi-agent systems can play
an important role. Indeed, one of the very specific features
of multi-agent systems is the sociality of agents, i.e., their
ability to communicate in a semantic way and to develop
trust relationships among them. Moreover, agents can (i)
express their communication acts by means of acknowledged
standards for interoperability among diverse systems, like
FIPA; (ii) and exchange messages directly, in a peer-to-peer
way. Therefore, it is not surprising that these two technologies
are often applied together for developing advanced social
platforms. In particular, multi-agent systems have been used as
(i) an underlying layer, or middleware, for developing social
networking platforms; and (ii) a technology to increase the
autonomous and intelligent behavior of existing systems.</p>
        <p>For the first type of solutions, many of the distinguishing
features of multi-agent systems can be fully exploited.
Multiagent systems provide semantic communication among agents,
which is handy for expressing all the different actions that
users can perform in a social platform. The different types of
messages can be understood according to their meaning and
applied according to existing trust relations among the users
and their respective agents. In addition, complex negotiation
protocols help creating acknowledgements and trust among
users, in an automatic or assisted way, without exposing
sensitive data. Mobility can also be useful for moving the
computation closer to data, if massive analysis is needed, but
it can also be handy for adding functionality to a node of a
distributed social platform or to a users client application.</p>
        <p>
          In the second case, agents are mainly used because of their
proactive and reactive behaviors that can provide
recommendations of both users and content, and that can enable the
personalization of results. Reactive abilities are particularly
important in a social networking environment where events
happen continuously and users can be easily distracted by
the huge information flow, which is associated with highly
connected social networks [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. Sensing the environment and
executing automatic tasks can reduce this overload
significantly. Goal-oriented behaviors, on the other hand, can support
users in prosecuting their long term objectives about friend and
content discovery, i.e., to discover known persons registered
in the network, to make new acquaintances with users with
common interests, to find interesting content hidden in less
relevant data or from new sources.
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Blogracy</title>
        <p>
          Blogracy [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] is a distributed social networking system which
uses many of the services and techniques described above,
with the aim to provide adaptive and composite services
on top of its core features. At the lower level, Blogracy
uses widespread and stable peer-to-peer technologies, such
as distributed hash tables and the BitTorrent protocol, for
coping with the intrinsic defects of centralized architectures
and to become the basis of solid distributed social networking
platforms. At the higher level, it takes advantage of multi-agent
systems for simplifying the implementation of social network
services in a decentralized setting.
        </p>
        <p>The architecture of the application is modular and composed
of two basic components: (i) an underlying module for basic
file sharing and DHT operations, built as an extension of
existing implementations, and (ii) an OpenSocial container,
i.e., a module providing the services of the social platform
to the local user through a Web interface. Additionally, the
system supports autonomous agents for providing (i)
recommendations of both users and content, (ii) personalization of
results, and (iii) trust negotiation mechanisms.</p>
        <p>The Blogracy system itself relies only on users nodes for its
operation and users need to perform background tasks on their
own, in a distributed way. A layer of autonomous agents takes
charge of assisting the user in finding new interesting content
and connections, and in pushing the local users activities to
followers.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>IV. DESIGNED ALGORITHMS</title>
      <p>As demonstrated by the systems described is Section II,
a practical approach for implementing distributed
publishsubscribe systems is to organize a group of peers in a
treelike structure. In this way, each node has the duty to forward
messages to a limited number of intermediate destination
nodes, which are directly linked to it. Section V will discuss
some guidelines for the organization and functioning of these
trees, obtained through simulations of various algorithms and
configurations, which are introduced in this section.</p>
      <p>Since P2P systems have to scale to a very large number of
nodes, as a first feature to configure it is necessary to choose
the degree of nodes, i.e., the maximum allowed number of
children nodes, for each parent node. The aim is to obtain the
best performance, without creating excessive burden for each
involved node. Higher values of this parameter lead to less
deep trees, but increase the number of messages to forward at
each step.</p>
      <p>
        A node that intends to join a group, and thus its associated
logical tree, has to find a node of the tree and send a
join request to that node. There are various possibilities for
performing both steps of the process. A connection point is
a node to which a join request can be sent. We suppose that
each node participating to a group, registers under the group
identifier into the P2P network. As described by Matl et al.
[
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] with reference to the Kademlia network, it is possible for
a new node to contact some other node, already in the group,
without finding and contacting the root node. In particular,
we have defined the following two connection policies: (i)
the join request is only sent to the root node (root strategy);
(ii) the join request is sent directly to the first node found,
which already participates to the tree (first strategy). In the
first case, the join request is sent only after finding the root
node. Sending the request to the root node can lead to a more
balanced tree, under some conditions. In the second case, the
join request is sent more easily as soon as any node of the
tree is found. In this way, the workload on the root node is
reduced, consequently removing a possible bottleneck.
      </p>
      <sec id="sec-5-1">
        <title>B. Connection</title>
        <p>After a node n has been chosen as an entry point to the
group, a join request is sent to it, for being accepted as a
new child node. Node n checks if it can accept one more
child node, according to the node degree k of the tree (i.e.,
the maximum number of children each node may have). If
the answer is positive, the connection is successful. Else, if n
does not have room for one more child node, it is necessary to
find another possible entry point. In fact, in its refusal answer,
n also inserts a reference to an alternative connection point,
which is chosen among its own children. Simple possible
policies for this choice include: (i) the minimun XOR distance
between the chosen node and the new one, similarly to the
other protocols of a Kademlia network; or (ii) a random
selection, which may be a simplistic approach, but could
nevertheless provide surprisingly good results in some cases.
However, also the new connection point can be unavailable,
thus the process goes on iteratively, till finding a suitable
connection point.</p>
        <p>Algorithms 1 and 2 illustrate the procedures for sending and
handling join requests, respectively.</p>
        <p>Algorithm 1 Join request, followed by acceptance or refusal.
Require: a ref erence to a node of the tree
response = ref erence.ConnectionRequest()
while not response.connectionAccepted() do
ref erence = response.getAlternativeN ode()
response = ref erence.ConnectionRequest()
end while
Algorithm 2 Management of a join request. numChildren
represents the children count, maxChildren is the maximum
degree set for the tree.</p>
        <p>Require: request f rom node n
Ensure: request response
if numChildren &lt; maxChildren then
buildConnection()
numChildren = numChildren + 1
return ConnectionAccepted
else
response = ConnectionRef used
response.setAlternativeN ode()
return response
end if
(a)
(b)
in green and blue) remains unaltered till the new connection.
Only nodes n2 and n3 are involved in finding a new connection
point to the main tree.</p>
        <p>
          The last recovery algorithm we propose is denoted as
recursive election. The previous algorithms do not guarantee
to solve the problem of the disconnection of the root node.
This particular case can be solved with an election of a
substitute node among the former children of the disconnected
root. This election can be performed efficiently with the bully
algorithm [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. For the election, we have considered two
different policies:
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Once the tree structure has been established, it is necessary</title>
      <p>to ensure its maintainance. In fact, in a P2P environment, each
element can suddenly disconnect or disappear. If a node of the
tree fails, some mechanisms need to be in place to assure the
reachability of all remaining nodes, including the children and
descentants of the failed node.</p>
      <p>First of all, some mechanisms need to be adopted to
periodically check connections. This can be enforced in practice
by sending periodical ping requests from each node to its own
direct neighbours. If a ping request is not answered before a • distance, the elected node is the one with the closest
timeout, the node has to be supposed to be missing. identifier to the group identifier, according to the XOR</p>
      <p>A disconnection can lead to two fundamental problems. If a distance;
leaf node disconnects, the problem is limited and it is sufficient • lifetime, the elected node is the one which has been
to remove its link with the parent node. Instead, if a node with connected for the longest time, thus coherently assigning
children diconnects, an additional problem is represented by a more important role to the more reliable and continuous
the reachability of the children and descendants; in fact, it is nodes.
necessary to reconnect all those nodes to the main tree, i.e., to To complete the election process, it is necessary that each
reconstruct the tree. To solve the problem of the reconstruction child maintains a reference to all its own siblings. Such
of a tree, we have devised various algorithms. references have to be kept fresh and constantly updated.</p>
      <p>The subtree breakout algorithm is the simplest procedure, Once a new root node is elected, it takes charge of all its
from the logical point of view. It simply consists in assigning former siblings. Instead, its own previous children may have
to each node in the broken branch the duty to reconnect to to reconnect to the tree, if their parent node is no more able
the tree, individually. A node that finds its own parent to be to keep them, according to the maximum allowed degree for
disconnected, tells its children to find a new entry point. It then the tree.
removes all its own links and autonomously tries to reconnect For their reconnection, these nodes can break or maintain
to the tree. Each child and descendant acts in the same way, the structure of their own branch, according to one of the
till all nodes are reconnected. policies described above. However, an alternative solution</p>
      <p>The subtree preservation algorithm is more conservative is to apply the same mechanism described to replace the
with respect to the broken branches, after their parent node root node, with an election among siblings according to the
disconnects. In fact, it is based on a mechanism of reconnec- bully algorithm. And similarly, this approach can be applied
tion, in which the topmost node is assigned the responsibility recursively at each level of the disconnected branch. In this
to reconnect to the main tree, possibly without affecting its case, each node, at each level of the structure, has to keep
descendants. references to all its own siblings. Moreover, since each node</p>
      <p>Figure 1 shows the two cases. Case (a) represents the subtree could have to substitute its own parent, in case of being
breakout algorithm. Node n1 fails; the different colors of elected, it has to keep a reference to its parent and to the
the descendants of n1 indicate a fragmentation of the sub- node immediately above it, in the tree.
structure, after which each node reconnects autonomously. Figure 2 represents some executions of the recursive
elecCase (b) is related to the subtree preservation algorithm. After tion algorithm after a node disconnects. To ease the
represennode n1 fails, the structure of its former branches (colored tation, the node degree k is supposed to be 3.
nodes A and B is defined as τ = τA + τB. Each node’s
contribution is a continuous random variable with uniform
distribution in the interval [τmin, τmax]. In our simulations,
we adopted the following values: τmin = 10 [ms], τmax = 20
[ms]. We define the propagation delay π as the time that is
necessary for the message to reach all nodes in the tree.</p>
      <sec id="sec-6-1">
        <title>A. Group Join</title>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>To analyze the group join strategies denoted as root and first, illustrated in Section IV, we have compared the performance indicators defined above, by taking into account different values for the node degree k.</title>
      <p>In a first group of simulations, whose results are illustrated
in Figure 3, a tree with 4000 nodes has been constructed using
the root strategy and k ∈ {2, 4, 8, 16, 32, 64}. Then, the same
experiment has been performed using the first strategy. For
each value of parameter k, the simulation has been repeated 10
times, with different pseudorandom number generation seeds.
Fig. 2. Executions of the recursive election algorithm. At time t0 the root
node r fails. Node n3 is elected as a substitute. At time t1, node n3 is no more
available for its previous role and must be substitued. Node n4 is elected as
substitute. At time t2, node n4 is no more available and node n7 substitutes
it. No election is required in this case. At time t3, the structure is completely
reorganized, with all nodes connected.</p>
    </sec>
    <sec id="sec-8">
      <title>V. SIMULATIONS</title>
    </sec>
    <sec id="sec-9">
      <title>To evaluate the proposed algorithms, we used DEUS,</title>
      <p>
        general-purpose discrete event simulation environment [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ],
which is available as open source [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. DEUS enables the
simulation of large and highly dynamic networks, with the
desired detail level. DEUS is particularly suitable to study
P2P architectures, focusing on overlay protocols [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]–[
        <xref ref-type="bibr" rid="ref23">23</xref>
        ].
      </p>
      <p>Tree construction algorithms are compared in terms of
• workload ditribution on network nodes,
• quickness,
• communication robustness.</p>
      <p>To this purpose, the following performance indicators are
taken into account.</p>
      <sec id="sec-9-1">
        <title>1) Number of control messages ν.: Tree construction and</title>
        <p>maintenance require that nodes exchange control messages.
In our simulations, each node has its own counter ν, which
is incremented by 1 every time a control message is delivered
to the node. In this way, it is possible to characterize the
amount of network traffic both locally and globally. A large
total number of control messages implies high consumption of
network bandwidth, and poor user experience due to delayed
tree construction and maintenance.</p>
        <p>2) Tree depth δ.: Tree depth, defined as the maximum
distance between the root node and any leaf node, is a very
important metric. Given two trees with N nodes each, but
different depths δ1 &lt; δ2, the one with depth δ1 is more balanced
than the one with depth δ2. Higher balancing is preferable, as
it means reduced total delays and better parallelism.</p>
        <p>
          3) Propagation delay π.: According to a widely used
approach [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ], the communication delay between any two
        </p>
        <p>The variation of number of requests and tree depth with
respect to k is evident. The higher k, the higher the balancing
of the tree and the efficience in terms of message traffic. It is
also worth noting than this behavior is more accentuated with
the first strategy. The root strategy produces slightly lower
depth values, with respect to the first strategy, for any k value.
Taking into account all these aspects, the first strategy is better
than the root one. Thus, in the following, all presented results
are those regarding the first strategy.</p>
        <p>In Figure 4, the propagation delay as a function of k
is reported. Also for this performance indicator, the higher
variation is achieved for low k values, up to k = 8. Thus,
considering all the performance indicators, the best tradeoff
between performance and complexity is k = 8.</p>
        <p>We recall that for the strategy that imply node election after
a root node failure, the XOR distance has been used as the
winner selection metric. More specifically, the node with lower
distance is the one that gets selected.</p>
      </sec>
      <sec id="sec-9-2">
        <title>B. Connection</title>
        <p>When a node receives a connection request, there may be
two different scenarios. In the first one, the node is able to
accept a new child and acknowledges the connecting node.
In the second scenario, the node has already k children, thus
cannot accept a new one but can suggest another parent to the
connecting node, according to either the distance or random
strategy (described in Section IV).</p>
        <p>To evaluate the performance of the aforementioned
strategies, we performed 50 simulations for each one, considering
the construction of a tree with 4000 nodes, with node degree
k = 8 and first strategy or group join. The results reported in
Table I show that the random connection strategy is slightly
better that the distance one.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>The results related to the subtree breakout strategy are</title>
      <p>illustrated in Table II. We can observe that tree depth remains
small even for the largest group of failed nodes. However,</p>
      <p>TABLE I the number of requests increases too much (427% when 50%
PERFORMANCE EVALUATION OF THE CONNECTION STRATEGIES. nodes fail).</p>
      <p>sdtirsatatengcye 6.δ93 7.ν68 preTsheneteredsuinltsTraebllaeteIdIIt.oWthiteh sruebstpreecet ptroesseurbvtaretieonbrsetaraktoeugty, tahree
random 6.00 7.20 tree depth increases considerably (by 44.26% in the worst
cade). The reason is that not breaking the tree may cause a
branch to be reconnected to a node that is already very deep
C. Tree Reconstruction in the tree. Fortunately, the increase of network traffic is lower</p>
      <p>The strategies for tree reconstruction, illustrated in Section (163.7% in the worst case).</p>
      <p>IV, are subtree breakout, subtree preservation and recursive The recursive election strategy is a compromise between
election. Their performance has been evaluated with respect to the previous ones. This is confirmed by the results reported
the disconnection of different groups of nodes, which are 1%, in Table IV. Facing a node group failure, tree depth slightly
5%, 10%, 20% and 50% of the total number of nodes in the changes and the number of requests has a very limited
intree, respectively. We considered a tree with 4000 nodes, k = crease. For these reasons, the recursive election strategy has
8, first group join strategy and random connection strategy. to be preferred.</p>
    </sec>
    <sec id="sec-11">
      <title>VI. CONCLUSION</title>
    </sec>
    <sec id="sec-12">
      <title>In this paper, we described and compared a number of</title>
      <p>mechanisms for creating and managing a spanning tree, hosted
by a generic structured P2P network. The adopted decentraized
approach is motivated by the need to solve issues about
privacy, censorship and control of personal data in DOSNs.</p>
      <p>According to our simulations, tree robustness is guaranteed
by the following mix of strategies: first for group join, random
for connection, and recursive election for tree reconstruction
in case of node failures.</p>
      <p>
        Regarding future work, we plan to implement the proposed
algorithms in the Blogracy platform [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and test them over
the PlanetLab facility. Furthermore, we plan to improve the
agorithms by means of adaptive strategies, e.g., for online
tuning of the node degree k.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>G.</given-names>
            <surname>Angiani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fornacciari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mordonini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          , and E. Iotti, “
          <article-title>Models of participation in social networks,” in Social Media Performance Evaluation and Success Measurements</article-title>
          .
          <source>IGI Global</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>196</fpage>
          -
          <lpage>224</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>E.</given-names>
            <surname>Franchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          , “
          <article-title>Social media for online collaboration in firms and organizations</article-title>
          ,”
          <source>International Journal of Information System Modeling and Design</source>
          , vol.
          <volume>7</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>31</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>Shankland</surname>
          </string-name>
          , “
          <article-title>Facebook blocks contact exporting tool</article-title>
          ,”
          <source>Retrieved January 26</source>
          ,
          <year>2014</year>
          ,
          <year>2010</year>
          . [Online]. Available: http://news.cnet.com/8301- 30685
          <fpage>3</fpage>
          -
          <lpage>20076774</lpage>
          -264/facebook-blocks
          <article-title>-contact-exporting-tool/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Berners-Lee</surname>
          </string-name>
          ,
          <article-title>“Long live the web</article-title>
          ,
          <source>” Scientific American</source>
          , vol.
          <volume>303</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>80</fpage>
          -
          <lpage>85</lpage>
          ,
          <year>2010</year>
          . [Online]. Available: http://www.scientificamerican.com/article.cfm
          <article-title>?id=long-live-the-web</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Salve</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Mori</surname>
          </string-name>
          , and L. Ricci, “
          <article-title>A survey on privacy in decentralized online social networks</article-title>
          ,
          <source>” Computer Science Review</source>
          , vol.
          <volume>27</volume>
          , pp.
          <fpage>154</fpage>
          -
          <lpage>176</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          , “
          <article-title>A dht-based multi-agent system for semantic information sharing</article-title>
          ,
          <source>” Studies in Computational Intelligence</source>
          , vol.
          <volume>439</volume>
          , pp.
          <fpage>197</fpage>
          -
          <lpage>213</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>B.</given-names>
            <surname>Guidi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Amft</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. De Salve</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Graffi</surname>
          </string-name>
          , and L. Ricci, “
          <article-title>DiDuSoNet: A P2P architecture for distributed Dunbar-based social networks</article-title>
          ,
          <source>” Peerto-Peer Networking and Applications</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>E.</given-names>
            <surname>Franchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          , “
          <article-title>Blogracy: A peer-to-peer social network</article-title>
          ,”
          <source>International Journal of Distributed Systems and Technologies (IJDST)</source>
          , vol.
          <volume>7</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>37</fpage>
          -
          <lpage>56</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>F.</given-names>
            <surname>Messina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Pappalardo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Rosaci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Santoro</surname>
          </string-name>
          , and G. Sarne´, “
          <article-title>Hyson: A distributed agent-based protocol for group formation in online social networks,” in Multiagent System Technologies (MATES</article-title>
          <year>2013</year>
          ), Lecture Notes in Computer Science,
          <year>2013</year>
          , pp.
          <fpage>320</fpage>
          -
          <lpage>330</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>Guidi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Michienzi</surname>
          </string-name>
          , and G. Rossetti, “
          <article-title>Dynamic community analysis in decentralized online social networks,” in Euro-Par 2017:</article-title>
          <source>Parallel Processing Workshops</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>517</fpage>
          -
          <lpage>528</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fornacciari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mordonini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rosi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          , “
          <article-title>Local-first algorithms for community detection</article-title>
          ,”
          <source>in CEUR Workshop Proceedings 1748, KDWeb2016</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Castro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Druschel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kermarrec</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A. I. Rowstron</surname>
          </string-name>
          , “
          <article-title>Scribe: A large-scale and decentralized application-level multicast infrastructure,” IEEE Journal on Selected Areas in communications</article-title>
          , vol.
          <volume>20</volume>
          , no.
          <issue>8</issue>
          , pp.
          <fpage>1489</fpage>
          -
          <lpage>1499</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D.</given-names>
            <surname>Sandler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mislove</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Post</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Druschel</surname>
          </string-name>
          , “Feedtree:
          <article-title>Sharing web micronews with peer-to-peer event notification,” in P2P Systems IV, ser</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>340</volume>
          . Springer,
          <year>2005</year>
          , pp.
          <fpage>141</fpage>
          -
          <lpage>151</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Fu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Hui</surname>
          </string-name>
          , “
          <article-title>Twittering by cuckoo: decentralized and socio-aware online microblogging services,” in ACM SIGCOMM Computer Communication Review</article-title>
          . ACM,
          <year>2010</year>
          , pp.
          <fpage>473</fpage>
          -
          <lpage>474</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>T.</given-names>
            <surname>Perfitt</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Englert</surname>
          </string-name>
          , “
          <article-title>Megaphone: fault tolerant, scalable, and trustworthy p2p microblogging,” in Internet and Web Applications</article-title>
          and
          <source>Services (ICIW)</source>
          ,
          <source>2010 Fifth International Conference on. IEEE</source>
          ,
          <year>2010</year>
          , pp.
          <fpage>469</fpage>
          -
          <lpage>477</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>L.</given-names>
            <surname>Matl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Cerny</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Donahoo</surname>
          </string-name>
          , “
          <article-title>Effective Manycast Messaging for Kademlia Network,”</article-title>
          <source>in Proc. of the 30th Annual ACM Symposium on Applied Computing (SAC '15)</source>
          ,
          <year>2015</year>
          , pp.
          <fpage>646</fpage>
          -
          <lpage>652</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>G.</given-names>
            <surname>Lombardo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fornacciari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mordonini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Tomaiuolo</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          , “
          <article-title>A multi-agent architecture for data analysis</article-title>
          ,
          <source>” Future Internet</source>
          , vol.
          <volume>11</volume>
          , no.
          <issue>2</issue>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>H.</given-names>
            <surname>Garcia-Molina</surname>
          </string-name>
          , “
          <article-title>Elections in a distributed computer system</article-title>
          ,
          <source>” IEEE Trans. on Computers</source>
          , vol. C-
          <volume>31</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>48</fpage>
          -
          <lpage>59</lpage>
          ,
          <year>1982</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Picone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Zanichelli</surname>
          </string-name>
          , and G. Ferrari, “
          <article-title>Simulating mobile and distributed systems with DEUS and ns-3,”</article-title>
          <source>in Proc. of the 2013 International Conference on High Performance Computing and Simulation (HPCS</source>
          <year>2013</year>
          ),
          <year>2013</year>
          , pp.
          <fpage>107</fpage>
          -
          <lpage>114</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          , “DEUS on GitHub,” cited
          <year>June 2019</year>
          . [Online]. Available: https://github.com/dsg-unipr/deus
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M.</given-names>
            <surname>Martalo</surname>
          </string-name>
          `,
          <string-name>
            <given-names>M.</given-names>
            <surname>Picone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          , G. Ferrari, and
          <string-name>
            <given-names>R.</given-names>
            <surname>Raheli</surname>
          </string-name>
          , “
          <article-title>Randomized network coding in distributed storage systems with layered overlay,”</article-title>
          <source>in Proc. of the 2011 Information Theory and Applications Workshop (ITA</source>
          <year>2011</year>
          ),
          <year>2011</year>
          , pp.
          <fpage>324</fpage>
          -
          <lpage>330</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M.</given-names>
            <surname>Picone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Zanichelli</surname>
          </string-name>
          , “
          <article-title>Evaluating the robustness of the DGT approach for smartphone-based vehicular networks,”</article-title>
          <source>in Proc. of the 36th Annual IEEE Conference on Local Computer Networks (LCN</source>
          <year>2011</year>
          ),
          <year>2011</year>
          , pp.
          <fpage>820</fpage>
          -
          <lpage>826</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>M.</given-names>
            <surname>Amoretti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Lafuente</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Sebastio</surname>
          </string-name>
          , “
          <article-title>A cooperative approach for distributed task execution in autonomic clouds,”</article-title>
          <source>in Proc. of the 21st Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP</source>
          <year>2013</year>
          ),
          <year>2013</year>
          , pp.
          <fpage>274</fpage>
          -
          <lpage>281</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>