Re: [widgets] TWI: comments

On Tue, Feb 9, 2010 at 4:12 PM, Scott Wilson
<scott.bradley.wilson@gmail.com> wrote:
>
> On 9 Feb 2010, at 12:49, Robin Berjon wrote:
>
>> Hi Cyril,
>>
>> On Feb 9, 2010, at 09:52 , Cyril Concolato wrote:
>>>
>>> Le 08/02/2010 13:26, Robin Berjon a écrit :
>>>>
>>>> I'm not sure what you mean? The preference storage should remain
>>>> available across instantiations of the widget. This could probably be
>>>> rephrased though.
>>>
>>> I think that maybe there should be two separate words instead of
>>> 'instance' for the two notions:
>>> a) "a widget package instantiated twice at the same time"
>>> b) "a widget package instantiated twice at different times".
>>> In a) you have 2 different storage areas. In b) you have only one.
>>
>> I don't think that that is something which you can infer from any of the
>> specification we have published? Implementations may perform what you do by
>> assigning different authorities in the widget URIs for your (a) and (b) but
>> essentially that is equivalent to have two widget packages (that happen to
>> have the same content). If it really is one and only one widget package,
>> then I'd expect it to have the same widget URI any time it is launched, and
>> therefore if it has multiple copies running in parallel those would share
>> the storage.
>
> Its up to implementations how they decide what rules they apply to determine
> what makes a widget instance. For example in our implementation this is
> decided by the process of requesting the widget - if its the same user, the
> same context, and the same widget package, then its the same instance and
> shares a storage area. Otherwise its a new instance with a new URI (by
> adding an instance id). But that's our implementation, and it relies on
> protocols that are outside the scope of TWI. I suggest looking at it from
> the user's perspective - given how the UA works, would they expect the
> storage to be shared or be separate?

I agree with Scott. Instances are separate - hopefully that is clear
enough in the TWI spec. The Widget URI scheme should enforce this if
possible (where used and applicable, which is not the case for
Wookie), but it is orthogonal to TWI. Where Cyril's problem applies is
if two widgets have loaded the same resource in an iframe. In such
cases, cookies are likely shared by the WUA. This may lead to
problems, such as trying to log into two emails accounts in parallel.
In any case, these are issues outside the scope of TWI, so long as its
clear that that storage areas are not shared.




-- 
Marcos Caceres
http://datadriven.com.au

Received on Tuesday, 16 February 2010 13:09:10 UTC