Method and system for distributing application for edge computing devices
A method for distributing an application for an edge computing device performed by a computing device according to an embodiment of the present invention includes selecting a cluster including two or more edge devices from among a plurality of edge devices, distributing a first application to a second edge device included in the cluster, modifying routing information such that a service request incoming to a first edge device included in the cluster is transmitted to the second edge device, and replacing the first application running in the first edge device with a second application.
1. A method for distributing an application for an edge computing device performed by a computing device, the method comprising:
selecting a cluster including two or more edge devices and fog devices from among a plurality of edge devices and fog devices, the two or more edge devices and the fog devices comprising a first edge device on which a first application is running and first fog device on which no application is running;
distributing the first application to the first fog device;
modifying routing information such that a service request for the first application incoming to the first edge device is transmitted to the first fog device; and
replacing the first application running in the first edge device with a second application which is an updated first application, while the first application is running in the first fog device;
wherein, the selecting of the cluster comprises determining network connectivity between the first edge device and the first fog device and excluding the first fog device from the cluster, if the result of the determining indicates that the network connectivity between the first edge device and the first fog device is below a threshold number.
2. The method of claim 1 , further comprising:
after replacing the first application running in the first edge device with a second application, modifying the routing information such that the service request transmitted to the first fog device is also transmitted to the first edge device; and
testing the second application distributed to the first edge device.
3. The method of claim 2 , wherein testing the second application comprises comparing a result of execution by the second application in the first edge device with a result of execution by the first application in the first edge device.
4. The method of claim 2 , wherein testing the second application comprises determining if a result of execution by the second application in the first edge device is the same as a result of execution by the first application in the first fog device.
5. The method of claim 4 , wherein testing the second application comprises:
if the result of execution by the second application in the first edge device is the same as with the result of execution by the first application in the first fog device, restoring the routing information such that the service request transmitted to the first fog device is transmitted to the first edge device.
6. The method of claim 4 , wherein testing the second application comprises:
if the result of execution by the second application in the first edge device is the same as with the result of execution by the first application in the first fog device, rolling back the first edge device to execute the first application.
7. The method of claim 1 , wherein selecting the cluster comprises:
obtaining resource usage of at least some devices of the plurality of edge devices and fog devices; and
determining the first edge device and the first fog device based on the resource usage.
8. The method of claim 7 , wherein the first edge device is an edge device capable of providing a resource amount required by the second application among the plurality of edge devices and fog devices; and
the first fog device is a device capable of providing a resource amount required by the first application among the plurality of edge devices and fog devices.
9. The method of claim 7 , wherein selecting the cluster further comprises:
adjusting a resource allocated to any one of the at least some devices.
10. The method of claim 7 , wherein selecting the cluster further comprises: predicting resource usage of the at least some devices of the plurality of edge devices and fog devices; and
determining the first edge device and the first fog device based on the resource usage prediction result.
11. The method of claim 7 , wherein selecting the cluster further comprises:
obtaining information on a software stack required by the first application and the second application; and
obtaining information on a software stack that can be provided by the at least some devices of the plurality of edge devices and fog devices.
12. The method of claim 1 , wherein selecting the cluster comprises:
obtaining resource usage for each container running in at least some devices of the plurality of edge devices and fog devices; and
determining, as the first fog device, a device executing a container capable of providing amount of resource required by the first application,
wherein distributing the first application to the first fog device comprises distributing the first application to the container of the first fog device.
13. The method of claim 12 , wherein selecting the cluster further comprises:
adjusting a resource allocated to any one of containers running in the at least some devices.
14. A non-transitory computer readable recording medium storing a computer program for causing a computer to perform the method of claim 1 .
15. An edge computing system comprising:
a plurality of edge devices including a managing device,
wherein the managing device among the plurality of edge devices and fog devices is configured to:
construct a cluster including an edge device and a fog device from among a plurality of edge devices and fog devices;
select a first edge device from among the plurality of edge devices and fog devices, the first edge device executing a first application, the first application being a target of update;
select a first fog device from among the plurality of edge devices and fog devices, the first fog device being a device to distribute the first application; and
instruct an application update,
wherein the first edge device is configured to:
in response to the application update instruction, modify routing information such that a service request for the first application previously incoming to the first edge device is transmitted to the first fog device, and replace the first application with a second application which is an updated first application configured to be executed in response to the service request for the first application, while the first application is running on the first fog device, and
wherein the first fog device distributes the first application in response to the application update instruction,
wherein the managing device is further configured to:
determine network connectivity between the first edge device and the first fog device; and
exclude the first fog device from the cluster, if the result of the determining indicates that the network connectivity is below a threshold number.
16. The edge computing system of claim 15 , wherein the managing device is configured to obtain resource usage of at least some devices of the plurality of edge devices and fog devices; and
determine the first edge device and the first fog device based on the resource usage.
17. The edge computing system of claim 16 , wherein the managing device is configured to instruct adjustment of a resource allocated to any one of the at least some devices.
18. The edge computing system of claim 16 , wherein the managing device is configured to:
obtain resource usage prediction information of the at least some devices of the plurality of edge devices and fog devices; and
determine the first edge device and the first fog device based on the prediction information.
19. The edge computing system of claim 16 , wherein the managing device is configured to:
obtain information on a software stack that can be provided by the at least some devices of the plurality of edge devices and fog devices; and
determine the first edge device and the first fog device based on information on the software stack.