Re: Single instance mode vs multiple instances in manifest spec

On Tue, Apr 23, 2013 at 1:34 PM, Janusz Majnert <jmajnert@gmail.com> wrote:
> 2013/4/23 Jonas Sicking <jonas@sicking.cc>:
>> On Tue, Apr 23, 2013 at 1:22 AM, John Lyle <john.lyle@cs.ox.ac.uk> wrote:
>>> On 22/04/13 14:37, Janusz Majnert wrote:
>>>>
>>>> On 2013-04-22 10:37, Marcos Caceres wrote:
>>>>>
>>>>> Does Tizen support running multiple instances of the same app? If yes, is
>>>>> the origin of those apps unique or it shared?
>>>>
>>>> Currently in Tizen, user can only have one instance of an app running. If
>>>> they try to launch it again, then the already running instance will be
>>>> brought to the foreground.
>>>> If an app is used as an intent service/provider, it may happen that it
>>>> will be handling multiple requests at the same time, which means that there
>>>> will be multiple instances of the same application running. In this case the
>>>> origin is the same for all running instances.
>>>>
>>>
>>> Hi,
>>>
>>> A follow-up question for both Tizen and FirefoxOS systems -
>>>
>>> Can devices have more than one version of the same application installed at
>>> the same time?  And can there be independent instances of each version
>>> running?  E.g., can I have version 0.1 and version 0.2 of app://example.com
>>> installed, and then run two instances of version 0.1 and two instances of
>>> version 0.2 (making four total instance) at the same time?
>>
>> I think we should prohibit runtimes from allowing two versions to run
>> at the same time. Two versions running at the same time is really hard
>> for apps to support any time both instances are trying to interact
>> with locally stored data, such as data stored in IndexedDB. You can
>> easily end up with the two versions using different schemas and
>> stomping on each other's data.
> I agree.
>
>>> I'm trying to get the cardinality of entities right: for every installed
>>> application there may be multiple runtime instances.  Every installed
>>> application will have one origin.  But can two or more installed
>>> applications (not instances) have the *same origin*?
>>
>> I don't see how this question relates the the above question, but the
>> answer is yes. Two hosted apps can come from the same origin. And
>> if/when we support "real" origins for packaged apps, two packaged apps
>> can come from the same origin, or a packaged app can come from the
>> same origin as a hosted app.
> Now this is confusing.
> IIRC FxOS had the restriction of one app per origin?
> What do you mean by "real origins for packaged apps"?
> And, I guess related to the previous question, how can a packaged app
> share origin with a hosted app?

We only support one app per origin right now, but it's something we
know we want to change. The reason we haven't changed are basically
only related to release schedules and the engineering work involved
with changing the relevant code. Nothing in the security model relies
on one app per origin.

> Are you going to propose some different solution to the app: scheme
> based origin?

If and how to support "real" origins for packaged apps is something
that's being discussed in various places. I suspect we have to do
*something* in this area, it's just unclear what and how.

/ Jonas

Received on Thursday, 25 April 2013 05:49:58 UTC