cat writebug.cn/history

一个开发者的技术博客。

Flatpak vs Snap

Flatpak vs. Snap

Flatpak may have been in works since 2007 as glick, it’s not the only player in the Linux world. Canonical is the one that created waves with the announcement of Click, that later evolved into Snap.

There is a healthy competition between the two projects and, according to Day/Larsson, “There are obviously technological differences, each of which have pros and cons. The ones I’d pick up on is de-duplication of identical files and delta updates, which means that download sizes are smaller and disk space is used more efficiently.”

Aside from those technical details, there are two major differences. The first is cross-distro support. “[Flatpak] only uses generic technologies that are generally available in all distributions. It doesn’t require any changes to distros. Anyone can use Flatpak to set up a repository or build an app center. Snappy is different. It uses AppArmor, which isn’t used universally. It requires changes to the distro; SELinux must be disabled, for example. Each app is required to bundle parts of Ubuntu. There’s no concept of an upstream platforms that apps can use.” according to the developers.

Michael Hall of Canonical said there are some components of Snaps that are tied to Ubuntu, but they are working on decoupling Snap from Ubuntu to achieve full cross-distro support. They have already decoupled many components.

The second major difference is the idea of having runtimes that are maintained by platform developers and aren’t bundled as a part of apps, said the Flatpak developers. “This cuts down on the size of apps, reduces the amount of work for app developers, and ensures that security updates happen faster and more reliably. In Snappy everything has to be bundled as a part of the app.”