← Back to team overview

ubuntu-accomplishments-contributors team mailing list archive

Re: Per-user daemon setup

 

Hi All,

Firstly, thanks, Rafal for bringing this topic up. This is something
we haven't really revisited since the very early days of the project.

On Sun, Jul 8, 2012 at 10:29 PM, Janos Gyerik <info@xxxxxxxxxxx> wrote:
> Hi Rafal,
>
> I don't think the daemon needs to be a system service at all. I don't
> see anything wrong with one daemon per user, I agree with you it's
> quite elegant like that, and I don't think you should change that.

I agree: my inclination is that making it a system service will
complicate matters significantly for little benefit and what I presume
is an edge cases of multiple users on a system. Even if there are
multi users, I suspect the most that are running is only ever one or
two, and keeping two daemons in memory is not that big of a deal.

> But to decide the *right* way, maybe we should identify the pros and
> cons of both approaches, let me start:
>
> System-wide daemon pros:
> - (possibly, arguably) more simple system, easier to understand
> - efficient, memory saving: the system-wide accomplishment collections
> are loaded once and available to all users in one place
>
> System-wide daemon cons:
> - Monolithic, single point of failure: one user overloads and crashes
> the daemon, it's crashed for all
> - Custom accomplishment collections per user are not possible,
> requires all accomplishment collections to be installed system-wide
> - Security concerns: must make sure user data (trophies) are isolated
> from each other
> - Complex: multi-user systems always are
>
> Per-user daemons pros:
> - No single point of failure
> - Lives in user space: flexible, customizable per user
> - Little security concerns: users are cleanly isolated by design
>
> Per-user daemons cons:
> - System-wide accomplishment collections are duplicated in the memory
> of each daemon, which is a waste
>
> These are just my thoughts and most probably I missed some things.
> Feel free to add more arguments on either side.

I think these pros and cons summarize this quite nicely. Thanks, Janos!

> In any case, most ubuntu desktops are used by a single user, so in
> practice multiple user daemon running at the same time will not be a
> common scenario.

Agreed.

> In the future it would be cool if daemons can collaborate with each
> other. In that case there can be a system daemon that knows the
> system-wide accomplishments and how to validate them, share this info
> with any interested per-user daemon but without exchanging any user
> data. This system daemon be pretty much like any other per-user
> daemon, running as a dedicated (non-root!) user, and known by the
> other daemons as an "accomplishments provider". The per-user daemons
> would take care of caching user trophies, and handling any custom
> accomplishment collections installed by their owners.

I agree, but I think the work and complexity this would bring to the
codebase would not really be worth the effort invested.

My take on this is that we focus on one daemon per user, and Rafal, if
you can pull out the old bits of code that planning for one daemon per
system scenarios, that would be awesome. :-)

   Jono

-- 
Jono Bacon
Ubuntu Community Manager
www.ubuntu.com / www.jonobacon.org
www.identi.ca/jonobacon www.twitter.com/jonobacon


Follow ups

References