## 4 Social Awareness in the Semantic Web of Things
### LDP-CoAP Social Framework  
The reference framework, illustrated in Figure 2, is implemented through the Linked Data Notifications protocol [45], on top of the Linked Data Platform [11] mapping [10] for the Constrained Application Protocol, ref. [12] a lightweight HTTP-like protocol for the Web of Things. LDP defines standard rules for accessing and managing Linked Data. LDN is a specialized use of LDP following an interaction model where servers (also called \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Features** & [22] & [25] & [26] & [32] & [44] & [9] & **This Work** \\ \hline Friend/follower relationships & ✗ & ✗ & ✗ & ✗ & ✓ & ✓ \\ Co-location/co-work relationships & ✗ & ✓ & ✗ & ✓ & ✗ & ✗ & ✗ \\ Dynamic relationships & ✓ & ✓ & ✓ & ✓ & ✗ & ✗ & ✓ \\ Context-awareness & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\ Collaborative service discovery & ✗ & ✗ & ✓ & ✗ & ✓ & ✓ \\ Autonomous device interactions & ✗ & ✗ & ✗ & ✗ & ✓ & ✓ \\ Trust management & ✗ & ✓ & ✗ & ✓ & ✗ & ✓ \\ Real-time data processing & ✓ & ✓ & ✓ & ✗ & ✗ & ✓ & ✓ \\ Semantic Web integration & ✗ & ✗ & ✓ & ✗ & ✗ & ✓ & ✓ \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparative analysis of SIoT frameworks (✓: supported, ✗: not supported, ✗: partial support). receivers_) advertise a receiving endpoint (_inbox_) for messages (_notifications_) and RDF-based data pushed by generic applications (_senders_). Then, the receiver exposes the notification data (according to appropriate access control) for use by _consumers_. Messages can be retrieved and used according to consumer needs. According to the proposed architecture, a pair of devices can establish two basic kinds of social relationships:  
* _Friend_, a bidirectional relationship where nodes \(N_{i}\) and \(N_{j}\) can exchange both information and services. In particular, a device \(N_{j}\) sends a _friendship_ request; since the receiver \(N_{i}\) accepts it, they become able to (i) read and write on each other's wall, acting as an LDN receiver and an LDN sender (to write) or consumer (to read), respectively; (ii) request the friend's service descriptions; (iii) activate or deactivate the friend's services. * _Follower_: a unidirectional relationship where a node \(N_{k}\) is interested only in receiving the updates published by \(N_{i}\) on its wall. In other words, if \(N_{k}\) sends a _follower_ request to \(N_{i}\), \(N_{k}\) becomes an LDN consumer for \(N_{i}\). As depicted in Figure 3, social devices expose an LDP interface composed of a set of resources described exploiting both several well-known RDFS vocabularies (e.g., _Dublin Core_[46] and _Semantically Interlinked Online Communities_ (SIOC) [47]) and an additional ontology, named _Semantic Web of Social Things_ (SWST) ([[http://swot.sisinflab.poliba.it/onto/swst/](http://swot.sisinflab.poliba.it/onto/swst/)]([http://swot.sisinflab.poliba.it/onto/swst/](http://swot.sisinflab.poliba.it/onto/swst/)), accessed on 28 June 2024), proposed in [9] to model basic elements of a social network. The inference services described in Section 2 are used to regulate the interactions between nodes. Nodes (i.e., things) are divided into two types: _smart_ devices, able to execute inference tasks; _basic_ devices, endowed with low memory and processing capabilities, only providing sensing/acting services without performing autonomous reasoning. Regardless of type, each object is modeled as an LDN receiver and owns a _wall_. It is an LDN inbox containing one or more _posts_, defined as nested resources, including _comments_. Posts and comments are used to enable the proposed interaction model. For example, sensor devices can observe the surrounding environment and use posts to share observations with actuator agents on the network, which usually present limited or no sensing capabilities. By reading the posts, these devices can become aware of current conditions and activate or deactivate specific services. Similarly, smart devices, equipped with both sensing and actuating capabilities, can use posts to initiate a discovery process.