Improve Performance by a Fuzzy-Based Dynamic Replication Algorithm in Grid, Cloud, and Fog
Algorithm 1
EFRA replication algorithm (file f, job m, and node i).
Begin
If job j in node i request file f, which is not available in node i locally, Then
BestReplica = EFRA_ReplicaSelection (f, i); //it calls the replica selection algorithm shown in Figure 3, where BestReplica is a suitable replica for remote access to file f from the node i
Access to file F from node BestReplica.node;
BestPlace = EFRAPlacmentAlgorithm (I,f) //it call algorithm2 for determing best place
If f exists in BestPlace, Then
Exit;
End If
If BestNode.FreeStorageSize〉 = f.size Then
Replicate file f to BestNode and exit
Else
EFRA_ReplacementAlgorithm(I,f); // it calls algorithm3 to provide enough free storage space