The main difference between edge and fog computing is the location of the devices. Fog computing pushes the data validation intelligence further into the local network, whereas edge computing places that data validation and processing intelligence onto central edge devices like routers and switches.
both Fog Computing and Edge Computing share nearly the same goal: to place information and processing functions as close as possible to data sources.
This means that they are positioned as close as possible to the edge of the Internet.
The main difference between these computing types is where exactly the intelligence and processing power are provided. With Fog Computing, this functionality can be deployed throughout the Internet continuum between IoT Clouds and Internet Edge. However, in Edge Computing, it is only deployed directly to the Internet edge, often in edge gateways (IoT Access Gateways).
See
Fig. 008961: General logical Multilayer Architecture of IoT