[whatwg] Installed Apps

Mike Wilson mikewse at hotmail.com
Thu Aug 13 05:13:29 PDT 2009


Ian Hickson wrote:
> 
> On Tue, 4 Aug 2009, Drew Wilson wrote:
> > Sure, although I'd say that "persistent storage is 
> > addressed by the Web Storage and Web Database 
> > features". Shared state is also addressed, but that's 
> > not the primary goal. If I have a tree of objects 
> > that I'd like to share between two pages, telling me 
> > to serialize it into name/value string pairs, write 
> > it into Web Storage, and then have the remote side 
> > read it out is not a satisfying (or performant) 
> > solution.
> 
> Web Storage supports structured data now.

I'm assuming that you refer to the concept of "structured
clone" now added to http://dev.w3.org/html5/webstorage/.

This certainly makes life easier for certain scenarios,
but I don't think it fully addresses Drew's use case.
The problem is that to change the tiniest thing in the
object graph, you will have to get a complete copy of
the data out from the storage provider, apply the change,
and then let it be copied (cloned) back into storage
again.
With Drew's large mailbox + categories example I think
this will be too inefficient. Also, it cannot be divided
into chunks stored under individual keys as that breaks 
object pointers.

Maybe I'm mistaken, but I think Drew wanted handling of
"live" objects, where each window gets access to the same
concrete objects (possibly protected by private proxy
objects) so the graph can be walked without cloning.

Drew: are you thinking that the same object graph also
makes up the data cache between sessions? If not, then
persistence is not a must-have for this use case so the 
area of ideas could well expand outside webstorage.

(Minor note: the Introduction still says that structured
data needs to be handled manually: "To store structured 
data in a storage area, you must first convert it to a 
string.")

Best regards
Mike Wilson



More information about the whatwg mailing list