Bio-Inspired Optimization in Fog and Edge Computing Environments