Optimizing Resource Allocation And Offloading For Long-Term Load Balancing Solutions In Fog Computing