One snap to connect them all (or: the plugin story)

Didier Roche didrocks at ubuntu.com
Thu Feb 9 09:04:22 UTC 2017


Ok, sorry for the catchy email title but couldn't resist :)

So, I'm in the situation where one snap would need to get configuration
and access to some files from other snaps. It's really similar to our
plugin story: even if in that case, we are talking about optional
configuration and files from one or multiple snaps shared with a single
one collecting them all.

I can see 2 options in the snapd philosophy:

- Content sharing. Sounds like it matches exactly the purpose of it.
However, even disregarding the manual connection that will be needed, we
are stuck on the fact that it's limited to one connection for a given
slot. If I want to share configuration and files from 3 snaps to the
master one, I can't do 3 times:
$ snap connect snap1:config my-master-snap:config
$ snap connect snap2:config my-master-snap:config
$ snap connect snap2:config my-master-snap:config

One way would be to create different slot names:
$ snap connect snap1:config my-master-snap:config1
$ snap connect snap2:config my-master-snap:config2
$ snap connect snap2:config my-master-snap:config3

But this doesn't help on the ease of use (the notice is then for people
"find the first available slot"… Not really user-friendly) nor in the
scalibity (fixed number of slots…)

- A dedicated interface which will handle multiple TCP connections and
DTRT. However, a dedicated interface suffers from the same issue than
previously and need to be hardcoded in snapd itself as AFAIK, there is
no way still as of today to have custom interfaces developped outside of
the snapd code itself.


Other ideas or plans for this?
Cheers,
didier






More information about the Snapcraft mailing list