Here is a modified idea of mine for the future: The simplest way to federation (in my humble opinion) would be giving every major distribution their own branded store, and make it open source (or at least as FOSS as possible) so said distribution can use their own server, and give every store the ability to “borrow” from each other.
This is similar to my first idea, but a little different and far more detailed.
- Stores “borrow” assets from other distributions who they “trust”. Every store has a list of other distributions labelled as “trustworthy”. Ubuntu Store will “trust” Fedora, and Fedora (could, in return) “trust” Ubuntu. It doesn’t have to be two-ways, but could theoretically be a one-way “trust”. “Trusts” are optional, and are the Store’s choice to add.
Example: There are two stores, Ubuntu, Fedora, SUSE. Ubuntu and Fedora decide to trust each other, but only Fedora trusts SUSE while Ubuntu doesn’t. In this case:
-Fedora Store shows snaps from Ubuntu, Fedora, and SUSE
-Ubuntu Store shows snaps only from Ubuntu and Fedora
-SUSE Store shows snaps only from the SUSE store, because they haven’t decided to trust anyone yet. It doesn’t matter that Fedora trusts them, because they don’t trust them back.
- If a distribution is listed as “trusted”, the packages from that store appear in your store as well. So if Ubuntu is “trusted” on Fedora’s store, the Fedora storefront shows packages for Ubuntu and Fedora. Packages hosted on Ubuntu’s infrastructure get downloaded from Ubuntu, and Ubuntu gets the money for paid snaps. If a Snap is hosted on the Fedora store and Ubuntu’s store “trusts” Fedora, both Ubuntu and Fedora will see the Snap, but Fedora gets paid because they ran the servers and Ubuntu is only listing the Snaps they have.
Example: Ubuntu and Fedora trust each other. User goes and decides to download “Blender” from Fedora’s store. The Fedora Store finds that it is “trusting” the Ubuntu Store and that the only “Blender” snap is from the Ubuntu Store, so the snap is downloaded from Ubuntu.
Later, a different user logs into Ubuntu again, and downloads a $5 Blender add-on. This add-on is only available through the Fedora store, but Ubuntu “trusts” Fedora, thus it appears in the Ubuntu store. The guy fills out his credit card info, processes payment, and Ubuntu’s SSO talks to Fedora’s SSO, and buys the Snap for him there. The snap is then downloaded from Fedora, and Fedora pockets the 30% cut.
Later, guy #3 decides to download a $10 game. This game is available on both Ubuntu and Fedora. He finds it on the Fedora store, so it is downloaded from Fedora’s servers and Fedora gets paid, even though it was also available through Ubuntu.
- Developers may want to use other stores than Ubuntu. To encourage this, allow “linking” accounts. Snap should have a universal SSO option which works with whoever is providing it. This way, a developer could link his “Fedora Snap Store” and “Ubuntu Snap Store” accounts together, causing his Snap to be hosted on both servers. If a Snap is on two or more Snap Stores, the snap store the user downloads it from gets first priority for download.
See examples above.
-
To prevent conflicts, most stores will initialize “trusting” each other, like chicken-egg. Example: Fedora store starts with “trusting” Ubuntu and starts with no snaps, causing the Fedora store to hold all “Ubuntu” snaps. Again, this prevents conflicts because it started on top of another store. There would also be a conflict checker for when stores decide to “trust” each other. The only way a conflict would really happen would be if another store held a ton of snaps, then decided to agree with another store which also had a ton of snaps, causing duplicates. If a Store started with no snaps, “trusting” another Store, conflicts shouldn’t happen.
-
Also to prevent conflicts (and power struggles), the stores should be able to trust one another, but “turn off” specific packages or apps from appearing from other stores. This is so that if one store uploads a controversial package, the other stores can say “I trust you, but I just don’t trust that one thing.”