# SARAC4N: Socially and Resource-Aware Caching in Clustered Content-Centric Networks
## 3 Methodology
### Node Selection  
Nodes are ranked based on communication degree, available interfaces, and previous content access logs. The node with the highest combined score is selected as the head. The node with the second-highest Social Importance Score (SIS) which still meets the minimum resource threshold is selected as the cluster secondary head (CSH) to ensure fault tolerance. The selection of the node is a critical part of network caching strategies. A hybrid approach was chosen to implement the proposed methodology for the best and optimum results. The clusters of network nodes based on content similarity by keeping social awareness as a key factor are created first. Afterwards, a data node is selected for caching the demanded content due to its optimal position in the segment, which is calculated by using metrics like degree centrality, betweenness centrality, and closeness centrality. This selection process carries out the same operation to identify the primary and secondary cluster heads,  
Figure 5: SARAC4N cluster formation and node selection workflow. as explained earlier, to assign the roles of the caching node, as well as its available resources, to ensure efficient content delivery. SARAC4N uses three main centrality metrics: degree (connectivity count), betweenness (routing potential), and closeness (distance to others). These metrics are normalized and aggregated to compute a node's Social Importance Score (SIS), which informs its selection as a CH, CSH, or optimal cache node. Algorithm 1 shows the Distributed Node Role Assignment and Load Handling in SARAC4N. ``` Each node executes the following algorithm periodically. Input: - Segment of nodes with varying resource capacities and request patterns; - Local SIS components (degree, betweenness, and closeness). Output: - Elected CH/CSH roles, optimal caching decisions, and balanced workload. 1. Initialization:  InitializeNodeParameters()  BroadcastNodeStatus() // share CPU, memory, SIS scores with neighbors 2. Compute SIS (Social Importance Score):  SIS \(\leftarrow\) Normalize(DegreeCentrality, Betweenness, Closeness)  ShareSISWithNeighbors() 3. Role Election:  If SIS = Max(SIS of neighbors):  AssignRole(Node, \"Cluster Head (CH)\")  Else if SIS = SecondHighest(SIS of neighbors):  AssignRole(Node, \"Cluster Secondary Head (CSH)\")  End If 4. Caching Decision:  If Node is CH or PopularityScore > Threshold:  EnableCaching()  End If 5. Monitor and Manage Requests:  While True:  ResourceCapacity \(\leftarrow\) GetAvailableResources(Node)  IncomingLoad \(\leftarrow\) MonitorIncomingRequests()  If IncomingLoad \(\leq\) ResourceCapacity:  ProcessRequestsLocally()  Else:  ForwardTo(CSH or Neighbor with LowestLoad)  End If  UpdateCacheIfNeeded()  End While 6. Dynamic Load Balancing:  Periodically:  For each Neighbor Node:  If NeighborLoad > LoadThreshold:  AssistLoadHandling(Neighbor)  End If  End For This algorithm monitors the resource capacity of nodes within a segment and dynamically redistributes workload if any node exceeds its threshold. It ensures optimal content caching and load balancing during ongoing operations. ### Resource Allocation

**Problem Definition**:

In clustered networks, individual nodes often face resource exhaustion when subjected to high-frequency content requests, leading to performance degradation and network bottlenecks. **Proposed Strategy**:

To mitigate this, SARAC4N introduces a collaborative load-sharing mechanism, where a designated cluster secondary head (CSH) supports the cluster head (CH) in dynamically distributing request loads. This strategy is particularly critical when a node's utilization exceeds a defined threshold. **Resource Quantification**:

Each node's resource capacity is quantified as a weighted aggregate of available computing power (in GHz), memory (in MB), and bandwidth (in Mbps). A node is considered overloaded once its cumulative usage exceeds 80% of its capacity.