+++ This bug was initially created as a clone of Bug #100344 +++
Allison would prefer for container instance IDs to be integer handles, as they were in the initial designs at a hackfest. They are currently object paths (but as an implementation detail, the varying part of the object path is in fact a dbus_uint64_t).
Justifications for preferring object paths:
* arg0 matching currently only works on stringy types
- In particular, services that monitor the lifetimes of container
instances might well want to match ContainerRemoved signals whose
arg0 is a container of interest
* GDBus' API for arg0 matching takes a const gchar *, so matching
integers would require new C API (or the caller providing a
canonical stringification, but that's an API wart)
* We tell D-Bus API designers to use object paths for their opaque
handles (like MPRIS2 tracks, but unlike Telepathy's 32-bit unsigned
integer handles, which with hindsight are considered to have been
an anti-pattern) and it's a bit hypocritical not to do the same
Justifications for preferring integers:
* They're smaller/more efficient
* We can format them into directory hierarchies, like
$XDG_RUNTIME_DIR/containers/%lld/dconf-db, without it resulting in
monstrously long filenames
I am not going to change the implementation unless consensus is reached, but I am also intending to leave the implementation counter-based so that switching to dbus_uint64_t would be straightforward.
(In reply to Simon McVittie from comment #0)
> * We can format them into directory hierarchies, like
> $XDG_RUNTIME_DIR/containers/%lld/dconf-db, without it resulting in
> monstrously long filenames
Possible rebuttal for this:
Do we expect that portal-like services like dconf will be able to support various container managers (Flatpak, Snap, etc.) generically, or do we expect them to need container-manager-specific code?
If they need container-manager-specific code *anyway*, then perhaps they can (and maybe should?) use the container name (e.g. the app ID like com.example.App when using Flatpak) in filenames like this, rather than the instance ID?