I、Container and Docker
Container technology is a kind of lightweight virtualization method. It provides independent running environment for applications, which is similar to virtual machines. However, containers are distinct from virtual machines in implementation. Containers can directly run on host operating system while virtual machines require hypervisor to manage resources of host machine.
The last few years have also witnessed a growing attention toward lightweight virtualization technologies, such as Docker containers. These solutions allow for an efficient deployment of virtualized services while requiring a reduced overhead with respect to hypervisor-based virtualization technologies [1]. Docker is a software technology providing containers. It uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and a union-capable file system such as OverlayFS and others to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines (VMs)[2].
II、Differences between VM and Docker
The main difference between Docker and VMs is the virtualization level and the way they use host machines resources. VMs dependent on hypervisor, a resource management program. Hypervisor can run on host OS, like Linux and Windows and it locates between VMs and host machines. The function of it is that transfer physical resource into virtual resource. For example, you can create several VMs on your computer and each VM has its own virtual CPU, although you only have one physical CPU. In this way, a part of physical resources are occupied by host OS and hypervisor, which reduces the percentage of resources that can be used by VMs. Besides, hypervisor can also directly run on physical machine without host OS. In this way, resource utilization rate will be improved.
Forming a sharp contrast with VMs, containers don’t dependent hypervisor. Containers level like Docker engine can be directly installed on host OS. After that, Docker engine can crate containers using resources provided by host OS. All containers share the same host OS while each VM has its own virtual OS, so the isolation is lower than VMs.
This picture show the difference between VMs and Docker. The orange rectangle represents virtual machines and Docker containers, respectively.
III、Architecture for Docker-Based Edge Computing
Therefore, after the above discussion about Docker, we may conclude that Docker has the following characteristics:
No Hypersivor. Docker engine can directly run on host OS. Because it doesn’t need hypersivor, Docker has higher resource utilization rate, which is very important for resource-limited devices like smart devices that making up edge computing nodes.
Incomplete Isolation. Because Docker run on host OS, each container doesn’t have its own virtual OS. This is a type of incomplete isolation which is different with VMs, complete isolation. Therefore, the security of Docker in this point is lower than VMs.
Fast Creation and Migration. As a lightweight virtualization technology, Docker containers start up faster than VMs. And this feature makes it easier to migrate.
Because of the lightweight feature of Docker, it is a suitable choice for edge computing. Recourse of edge computing nodes are usually limited, so edge computing need a light virtualization way. Besides, Docker can create and start up containers faster than VMs, so it is beneficial for enhancing the real-time performance of IoT application.
There is a simple architecture for containers-based edge computing. Docker engines run on smart devices like laptops, smart sensors and actors. Many devices and containers cooperate to perform one task and they communicate through WAN, or Radio Access Network.
REFERENCE:
[1] Mostajeran E, Khalid M F, Mydin M N M, et al. Multifaceted Trust Assessment Framework for Container based Edge Computing Platform[C]// International Conference on Advances in Computing, Control and NETWORKING - Accn. 2016.
[2] https://en.wikipedia.org/wiki/Docker_(software)