[packagekit] Launching dbus services
Richard Hughes
hughsient at gmail.com
Tue Jan 29 11:10:08 PST 2008
Right, the new backend allows these things like dbus mini-daemons. These
allow some python script to stay running and keep a database or cache in
memory. Something like yum needs this for latency.
We should have:
client <-> packagekitd <-> dbus-backend
The dbus-backend IPC always goes through the daemon (for scheduling,
security and sanity reasons) and this really doesn't add up to any
significant overhead. Compared to the current spawn setup it's a million
times faster.
So, we use dbus activation. That means we have a script that grabs the
system name of something like org.freedesktop.PackageKitYumBackend -
note - the name is different for each backend. This is important as we
will need to install more than one backend, and switch at packagekitd
load time.
The backends/yum/pk-backend-yum.c would send requests to
org.freedesktop.PackageKitYumBackend as the proxy, and the first time
this is done the service is activated and the script is launched. This
breaks our locally running ./run-pk.sh but I think we can work around
that with a bit of Makefile.am hacking.
I see that daemonBackend.py is currently claiming
org.freedesktop.PackageKitYumBackend, when the name that it should grab
should be passed in by the python yum helper; daemonBackend.py has to be
backend neutral.
Now, we could talk to the mini-daemons using a private dbus connection.
I've no experience doing this, but for the moment we'll go via the bus
if nothing else for debugging and testing. This may be the way forward.
I hope this makes things clearer.
Richard.
More information about the PackageKit
mailing list