<br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 1:53 PM, Jeremy Orlow <span dir="ltr"><<a href="mailto:jorlow@chromium.org">jorlow@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jul 29, 2009 at 11:43 AM, Michael Davidson <span dir="ltr"><<a href="mailto:mpd@google.com" target="_blank">mpd@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Wed, Jul 29, 2009 at 11:38 AM, Tab Atkins Jr.<<a href="mailto:jackalmage@gmail.com" target="_blank">jackalmage@gmail.com</a>> wrote:<br>
> On Wed, Jul 29, 2009 at 1:34 PM, Michael Davidson<<a href="mailto:mpd@google.com" target="_blank">mpd@google.com</a>> wrote:<br>
</div><div>>> With a hidden page that's accessible to all Google Finance visible<br>
>> pages, they could share a connection to the server. Even if the hidden<br>
>> page is closed when the last Google Finance page is closed, this is a<br>
>> better situation than we currently have.<br>
><br>
> Can't SharedWorkers do that right now?  If all you're doing is polling<br>
> for data, it seems like you don't need all the extra stuff that these<br>
> various proposals are offering.<br>
<br>
</div>It's my contention that frequently large web apps are doing more than<br>
just polling for data. They're trying to maintain complex data<br>
structures that they pass up to the UI. The programming model of<br>
SharedWorkers makes this difficult. Take the chat client in Gmail, for<br>
example. It's much more complex than passing stock quotes from a<br>
worker to the UI.</blockquote><div><br></div></div></div><div>I understand that this isn't helpful for existing web apps like Gmail, but I think a MVC type model will work pretty nicely with shared workers.  It's just the transition phase that's going to be painful.</div>

<div><br></div><div>This idea of a hidden page just seems like a big hack to support today's applications.  If it were adapted into the spec, I think 5 years from now we'd be very sorry that it was.</div></div></blockquote>
<div><br></div><div>I disagree. The proposal plays to the strenths of the web platform.</div><div><br></div><div>HTML parsing, layout, and rendering is very optimized, much more so than programmatic HTML DOM manipulation. The incorporation of stateful script contexts within each page considerably slows page loading. As navigations occur, that statefullness has to be reconstructed from scratch. In addition to creating and populating a new script context with the <script> itself, this often involves reconstructing data the script operates on. So additional server roundtrips and desrializing into js objects. With the introduction of local storeage and databases, augment the server roundtrips with the reading of those local repositories and deserializing into js structures.</div>
<div><br></div><div>The sharedContext / backgroundPage provides a means to cut out completely the need to reconstruct that JS world on each page navigation.</div><div><br></div><div>I really like the proposal... its elegant... (and more generally applicable, and easier to use than fully asyn workers).</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; line-height: 19px; "><span class="Apple-style-span" style="font-family: arial; line-height: normal; "><hyperbole></span></span></div>
<div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; line-height: 19px; "><span class="Apple-style-span" style="font-family: arial; line-height: normal; ">I think 5 years from now, people will be wondering why it was ever done otherwise.</span></span></div>
<div></hyberbole></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div></div><div><br>
</div><div>The other APIs we've been talking about that satisfy the requirements that were originally broken out by Drew seem like much more sustainable solutions.</div><div><br></div><div>J</div></div>
</blockquote></div><br>