Skip to main content
. 2022 Sep 16;22(18):7016. doi: 10.3390/s22187016
Algorithm 1 Allocation/location of data in a pool of data containers.
Require: data (D), netadata list (ML), operation type (op), load balancer algorithm
    (LBalgorithm), data container pool (DP)
Ensure: maps of data allocation/location (mapsAL)
  •   1:

    dataHash = ""

  •   2:

    existNULL

  •   3:

    mapsAL ← {}

  •   4:

    index = 0

  •   5:

    for alldD do

  •   6:

        dataHashcalculateHash(d)

  •   7:

        existdata.exist(dataHash,mL)

  •   8:

        if op == "allocation" then

  •   9:

            if exist == FALSE then

  • 10:

                mapsAL[index] ← LB(LBalgorithm,dataHash,DP)

  • 11:

                data.recordD(ML,mapsAL)

  • 12:

                data.allocation(d,mapsAL)

  • 13:

                index++

  • 14:

            else

  • 15:

                This file already exists

  • 16:

            end if

  • 17:

        end if

  • 18:

        if op == "location" then

  • 19:

            if exist == TRUE then

  • 20:

                mapsAL[index] ← data.location(dataHash,ML)

  • 21:

                index++

  • 22:

            else

  • 23:

                This file hasn’t been located

  • 24:

            end if

  • 25.

        end if

  • 26:

    end for

  • 27:

    returnmapsAL