1

What are the differences and relations between application virtualization (such as Flatpak), emulation layer (such as wine, cygwin), and container virtualization (such as Docker)?

I have been trying to figure them out, but always end up not catching the main points. Especially the fundamental differences between their virutalization levels.

1

2 Answers 2

4

Container virtualization with Linux is a combination of kernel features, namespaces and cgroups, used to run an application in a sandbox. Each application has it's own filesystem, network stack, pid namespace, etc, but runs on the same OS kernel as the host. From the host you can see the processes running, but from inside the sandbox, all you can see is your application. It is designed for managing server side applications.

Application virtualization is very similar to container virtualization, and the lines are a bit fuzzy to me. In the context of something like Flatpak, it is using the same namespaces and cgroups you see with container tools like docker. The key difference is they have designed the tool for desktop use cases, meaning tools that are designed to be accessed with a local GUI, rather than running remotely as something like a web server.

Emulation is a way to run programs designed for another OS. You typically cannot run a Windows binary on a Linux system and vice versa, the OS kernels are very different, the binary formats are different, they're effectively speaking different languages. The emulation layer provides a translation to run non-native programs on the local machine without creating an entire virtual machine and running a separate OS. This is very different from the container and application virtualization where you run native OS applications on a shared OS kernel.

1
  • Thanks. In the wikipedia link for application virtualization en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?
    – Tim
    Commented Feb 3, 2019 at 17:18
1

As often, the vocabulary is overloaded, and the limits between technologies are somewhat fuzzy.

As a complement to the BMitch's answer, in my understanding, emulation is a way to run an application designed for another instruction set architecture. For example, it allows to run an ARM software on an x86 host. QEMU virtual machines are designed for ISA emulation.

Running x86 Windows application on x86 Linux using Wine1, or x86 Linux app on x86 Solaris using an lx branded zone does not require ISA emulation since that application and the host are using is the same instruction set. Only the system calls needs to be "emulated", not the processor. Sometimes we call that system call translation. It is the role of the compatibility layer to perform the needed translations as transparently as possible for the guest application.


1 Actually the Wine name was dubbed as a backronym for "Wine Is Not an Emulator"

2
  • Thanks. In the wikipedia link for application virtualization en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?
    – Tim
    Commented Feb 3, 2019 at 17:19
  • I usually categorize Wine as an application virtualization solution. As shameless self-promotion (spam?), I briefly mention that on a slide in one of my online videos youtu.be/E_A9j9VW9qQ?t=397 Commented Feb 3, 2019 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.