← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Download Manager broken since #213

 

On Mon, Mar 3, 2014 at 5:15 PM, Manuel de la Pena
<manuel.delapena@xxxxxxxxxxxxx> wrote:
>
> On Mon, Mar 3, 2014 at 7:19 PM, Barry Warsaw <barry@xxxxxxxxxx> wrote:
>>
>> On Mar 03, 2014, at 02:50 AM, Alejandro J. Cura wrote:
>>
>> >You mention that you don't like the download manager doing the
>> >installation, but to put it more strictly: the download manager is
>> >actually just running a command given by the scope when a given
>> >download is completed. And the installation proper happens in that
>> >command. This is done, as you've explained, because the scope process
>> >may already be dead by the time that the download has finished, and
>> >the dash may not be showing the preview for the current download so
>> >it's not keeping track of the download progress and finished signals.
>>
>> It makes me uncomfortable for u-d-m to be running a command.  In general,
>> I
>> think u-d-m should have one job only: download files it's asked to
>> download.
>>
>
> An that is precisely my concern.. I think we should focus in doing one thing
> very well. I much prefer to have several "stupid" services and a single one
> that orchestrates them than to have a mamouth service that does all of them
> with lots of bugs.

I agree with that: we want several small services.
That's why the click scope is not kept alive doing the downloads
itself, and that's why we created the download manager.
But I disagree with having yet another process kept alive just to
monitor the app being downloaded.

So, I would argue that the download manager needs to do two more
things (which it currently does) besides "just downloading":
 * it needs to report on the progress of a download
 * and it needs to do *something* when a given download has finished (or failed)
The former is done via dbus signals which in most cases can be safely ignored.
For the later we cannot use dbus signals because the app that started
the download may already be dead or killed.

The options I see are either spawning a new process (like now) or
having it do a dbus call which in turn may do dbus activation.
Or we may use a dispatcher like Ted suggests, but we need to think
about the security of this, because I'm not sure I like a random app
starting the installation of a random click at will.
Do you guys think there's another option here? I'm trying to come up
with pros and cons for each one.

cheers,
-- 
alecu


Follow ups

References