Research Article

IoT-B&B: Edge-Based NFV for IoT Devices with CPE Crowdsourcing

Algorithm 1

IoT-B&B resource eligibility check algorithm.
     function  GETSORTEDCANDIDATES
     create an empty list  candidates
   for all    do
      if  ISRESOURCEENOUGH  then
         add to  candidates
      end if
   end for
   sort  candidates  by remaining resources descending
   if  ISRESOURCEENOUGH  then
     add to  candidates
     end if
     return  candidates
  end function
  function  ISRESOURCEENOUGH
     if   is   then   Check delay for cloud
       link_bw_left  
       for all    do
         link_bw_left    link_bw_left  −  
       end for
       delay    link_bw_left
       if  delay    then
          return  false   Too much delay
       end if
     end if
     if    then
        return  false   vCPU not enough
     end if
     if    then
        return  false   memory not enough
     end if
     if    then
        return  false   bandwidth not enough
     end if
     return  true   validation passes
  end function