Research Article
Improve Performance by a Fuzzy-Based Dynamic Replication Algorithm in Grid, Cloud, and Fog
Algorithm 3
EFRA replacement algorithm (node I and file f).
Begin | recentAccessHistoryList = getRecentAccessHistory (long dt); //Return the recent access history | For each replica file “f” in storage Node i Do | If a is removable and has another replica in Region, Then //a is replica file “f” | a.value = ); // it calculates value of file ‘f’ by an fuzzy inference system | FilesIsInRigon.add(a); //add replica a in the FilesIsInRigon list | Else | a.value = ); | FilesIsNotRigon.add(a); | End If | End For | Sort FilesInRigon in ascending order according Its File value; | while “FilesInRigon” ! = empty Do | Select a replica from top of the “FilesIsInRigon” and delete it from node ‘i’; | If i.availableStorageSize(f.size Then | replicate file ‘f’ to node ‘i’ and exit; | End While | Sort FilesIsNotRigon in ascending order according Its File value; | while FilesIsNotRigon ! = empty Do | Select a replica from top of the “FilesIsNotRigon” list and delete it from node’i’ and list; | IF i.availableStorageSize(f.size Then | replicate file ‘f’ to grid node ‘i’ and exit; | End While | End |
|