<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php" />
  <link rel="self" type="application/atom+xml" href="http://www.readwriteweb.com/atom.xml" />
  <id>tag:,2009:/1/tag:www.readwriteweb.com,2009://1.14763-</id>
  <updated>2009-11-23T17:11:11Z</updated>
  <title>Comments for Digg Demos Optimized Datastreams </title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>
  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763</id>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.readwriteweb.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=14763" title="Digg Demos Optimized Datastreams " />
    <published>2009-04-22T21:15:00Z</published>
    <updated>2009-04-22T23:44:03Z</updated>
    <title>Digg Demos Optimized Datastreams </title>
    <summary>Any good webmaster knows the cardinal rules of website optimization. Yahoo! wrote them all up years ago on its Developer Network site.digg_url = &apos;http://digg.com/programming/Digg_Demos_Optimized_Datastreams&apos;;digg_bgcolor = &apos;#ffffff&apos;;digg_skin = &apos;normal&apos;; And the more of these rules you can adhere to, the faster your site will load for your visitors. But, more and more often as sites turn...</summary>
    <author>
      <name>Phil Glockner</name>
      
    </author>
    
    <category term="News" />
    
    <content type="html" xml:lang="en" xml:base="http://www.readwriteweb.com/">
      <![CDATA[<p><img src="http://www.readwriteweb.com/images/diggbar_apr_09.jpg" />Any good webmaster knows the <em>cardinal rules</em> of website optimization. <a href="http://www.yahoo.com">Yahoo!</a> wrote them all up years ago on its <a href="http://developer.yahoo.com/performance/rules.html" target="_blank">Developer Network site</a>.<font style="float: right; margin-left: 10px;"><script type="text/javascript">digg_url = 'http://digg.com/programming/Digg_Demos_Optimized_Datastreams';digg_bgcolor = '#ffffff';digg_skin = 'normal';</script><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></font> And the more of these rules you can adhere to, the faster your site will load for your visitors. But, more and more often as sites turn to using asynchronous technologies like <a href="http://en.wikipedia.org/wiki/Ajax_(programming)" target="_blank">AJAX</a> to make their sites more responsive and act more like applications, the old rules lose their effectiveness.</p>

<p>Today, the website wizards behind <a title="Digg" href="http://digg.com" target="_blank">Digg</a> have revealed a <a href="http://blog.digg.com/?p=621" target="_blank">new technology</a> called MXHR, or <em>Multi-Part XML HTTP Requests</em>, as a method for optimizing delivery of Digg's complex AJAX-enhanced site. The implementation of MXHR is an addition to <a href="http://github.com/digg/dui" target="_blank">Digg's User Interface Library</a>, called <a href="http://github.com/digg/stream" target="_blank">DUI.Stream</a>. While still in a fairly rough early stage, Digg believes that MXHR will eventually give it a huge boost in <em>un-cached</em> page rendering efficiency.</p>]]>
      <![CDATA[<p>There's a couple of problems that Digg has with using traditional optimization techniques. First, the site violates the first rule in a big way, since it uses multiple HTTP connection requests in order to render all parts of the page. Dialog boxes, comments, user icons and more all have to be delivered quickly and with equal priority, and multiple requests was the only way to go until recently.</p>

<p><center><img src="http://www.readwriteweb.com/images/mxhr-text-apr09.jpg" /></center></p>

<p>Second, it can't rely on too much caching to help speed page load times. Digg is a discussion board as much as it is a news site, so caching is a huge problem. Active stories can sometimes have hundreds of new threaded comments being created every minute, and caching would cause huge discrepancies on how much of the conversation each client would actually see from moment to moment. </p>

<p>These issues are what MXHR is designed to optimize. Utilizing DUI.Stream to open only one HTTP connection between server and client, the separate 'page objects' such as dialog boxes, CSS and more can be bundled and sent through the same open connection. By eliminating, in some cases, <em>hundreds</em> of separate HTTP connection requests for a page render, it can approach the rendering speed of a fully-cached page. Plus, this allows the server to control the order in which each page element will be built. This will result in the page appearing almost instantaneously for the user with the the hidden framework being backfilled as needed.</p>

<p><center><img src="http://www.readwriteweb.com/images/mxhr-image-apr09.jpg" /></center></p>

<p>Digg provides two examples of the DUI.Stream library in action, the first being an un-cached <a href="http://demos.digg.com/stream/streamDemo.html" target="_blank">text demo</a>, and the second an un-cached <a href="http://demos.digg.com/stream/imageDemo.html" target="_blank">image demo</a>. While the first example isn't too amazing, from what we saw the new library performs on par with traditional rendering, the second example with icons is <em>stupidly</em> faster. It's absolutely no contest that MXHR is the clear winner there.</p>

<p>Code is provided <a href="http://blog.digg.com/?p=621" target="_blank">in the post</a> for you developer-types out there to play around with along with a <a href="http://github.com/digg/stream/tree/9010257b1a6e1c236374d5205f0cee108a32256a/examples" target="_blank">GitHub repository of examples</a>. Digg is looking for feedback and suggestions on how to improve on this so please go take a look! We can't wait to see this tech get deployed so that we can have all the bells and whistles of Web 2.0 architecture <em>plus</em> all the speed of a well-optimized site.</p>]]>
    </content>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134867</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134867" />
    <title>Comment from Richard on 2009-04-22</title>
    <author>
        <name>Richard</name>
        <uri>http://friendbinder.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://friendbinder.com">
        <![CDATA[<p>You've spelt AJAX wrong (twice)</p>]]>
    </content>
    <published>2009-04-22T21:21:15Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134868</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134868" />
    <title>Comment from Phil Glockner on 2009-04-22</title>
    <author>
        <name>Phil Glockner</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Yikes! Good catch, Richard. I was focusing so much on getting 'MXHR' in the right order, I totally missed that. Corrected now.</p>]]>
    </content>
    <published>2009-04-22T21:49:03Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134873</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134873" />
    <title>Comment from Sridhar V Iyer on 2009-04-22</title>
    <author>
        <name>Sridhar V Iyer</name>
        <uri>http://sridharv.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://sridharv.net">
        <![CDATA[<p>I ran both the demos in firefox. The normal is faster than MXHR by tiny amount almost everytime, iff I open in a different tab(and not jump to that tab). It takes more time (like you report), if I open it in the same page/(or diff tab and if I jump to it). Why is that?</p>]]>
    </content>
    <published>2009-04-22T23:06:51Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134883</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134883" />
    <title>Comment from Wow Man on 2009-04-22</title>
    <author>
        <name>Wow Man</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Wow man, right when you thought Digg couldnt get no better! LOL</p>

<p>RT<br />
www.privacy.pro.tc</p>]]>
    </content>
    <published>2009-04-23T02:08:15Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134889</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134889" />
    <title>Comment from Jason on 2009-04-22</title>
    <author>
        <name>Jason</name>
        <uri>http://www.twitter.com/jpstephens</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.twitter.com/jpstephens">
        <![CDATA[<p>This is cool...the demos for me the normal was faster....is that weird?</p>]]>
    </content>
    <published>2009-04-23T03:20:12Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134895</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134895" />
    <title>Comment from Chris B on 2009-04-22</title>
    <author>
        <name>Chris B</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>This is pretty awesome. I ran both demos 5 times each and the MXHR Stream was faster every single time. Great work.</p>]]>
    </content>
    <published>2009-04-23T04:14:28Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134898</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134898" />
    <title>Comment from Gris on 2009-04-22</title>
    <author>
        <name>Gris</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Very clever - but maybe when you have to invent ways to make AJAX faster, you should stand back and think "am I using too much AJAX?".</p>]]>
    </content>
    <published>2009-04-23T05:04:46Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134906</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134906" />
    <title>Comment from Alex on 2009-04-22</title>
    <author>
        <name>Alex</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Sorry, but how repeating the same image 300 times could count as an example of new technology? Any 10 years old javascript one-liner could do the same.<br />
</p>]]>
    </content>
    <published>2009-04-23T06:05:05Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134911</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134911" />
    <title>Comment from Television Spy on 2009-04-22</title>
    <author>
        <name>Television Spy</name>
        <uri>http://www.whatareyouwatching.uni.cc</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.whatareyouwatching.uni.cc">
        <![CDATA[<p>that's pretty interesting, but shouldn't they be working on crunching down on code and minimizing requests or to load everything internally and then display it as necessary.</p>]]>
    </content>
    <published>2009-04-23T06:39:08Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134929</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134929" />
    <title>Comment from at on 2009-04-23</title>
    <author>
        <name>at</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>yep works like described.<br />
Some of you guys cannot see it because you have bandwidth in mB/s.Out here where the bandwidth is just 30-40kB/s, the difference is profoundly visible.</p>

<p>awesome technique digg crew ! </p>]]>
    </content>
    <published>2009-04-23T11:18:57Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:134954</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c134954" />
    <title>Comment from Tom Martin on 2009-04-23</title>
    <author>
        <name>Tom Martin</name>
        <uri>http://www.heychinaski.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.heychinaski.com">
        <![CDATA[<p>@Alex<br />
Technically it's not repeating the same image.  Each one displayed is a different resource with a different URL.  They've used the same image for the simplicity of the demo but it is as if there are 300 different images being loaded.</p>

<p>Those images provide a test that's somewhat analogous to the hundreds of digg user images served up in a commment thread.</p>]]>
    </content>
    <published>2009-04-23T17:06:06Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:135036</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c135036" />
    <title>Comment from ann on 2009-04-24</title>
    <author>
        <name>ann</name>
        <uri>http://yourtvonline.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://yourtvonline.com">
        <![CDATA[<p>check <a href="http://yourtvonline.com" rel="nofollow">http://yourtvonline.com</a></p>]]>
    </content>
    <published>2009-04-24T09:05:03Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:136099</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c136099" />
    <title>Comment from Kris on 2009-04-30</title>
    <author>
        <name>Kris</name>
        <uri>http://www.coderkris.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.coderkris.com">
        <![CDATA[<p>this sounds very similar to COMET, which has been around quite a while now :-</p>

<p><a href="http://en.wikipedia.org/wiki/Comet_(programming)" rel="nofollow">http://en.wikipedia.org/wiki/Comet_(programming)</a></p>

<p><br />
and an example of a COMET server :-</p>

<p><a href="http://www.freeliberator.com/" rel="nofollow">http://www.freeliberator.com/</a><br />
</p>]]>
    </content>
    <published>2009-04-30T21:48:06Z</published>
  </entry>

  <entry>
    <id>tag:www.readwriteweb.com,2009://1.14763-comment:138650</id>
    <thr:in-reply-to ref="tag:www.readwriteweb.com,2009://1.14763" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/digg_demos_optimized_datastreams.php#c138650" />
    <title>Comment from Michael Riley on 2009-05-19</title>
    <author>
        <name>Michael Riley</name>
        <uri>http://yelirekim.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://yelirekim.com">
        <![CDATA[<p>I'm all for crazy new tech solutions, I really am, but this feels wrong to me.</p>

<p>Point 1, graceful degradation:</p>

<p>Up until this point, even with crazy, crazy ajax applications and absurd CSS, if you're good enough at it, you've been able to create applications that "gracefully degrade", meaining, without javascript or css, the applications still work.  This method just completely throws that out the window, if javascript doesn't work (if you make a typo somewhere that stops execution!) or if the first javascript file doesn't transfer, or times out, then the entire page isn't going to work.</p>

<p>Point 2, server side optimization</p>

<p>Almost all of Yahoo!s guidelines for optimizing page load times can be significantly improved by performing back end tweaks, the largest ones are:</p>

<p>minifying and combining js and css files<br />
spriting css images (not really back end, but you get the picture)</p>

<p>Point 3, no gzip</p>

<p>If they are using a custom stream to read content from the server and then spit it back up onto the page, there is a huge problem with large javascript, css or html fragments transferred via this method: they can't be zipped server side unless they plan on writing unzipping functionality into the client side javascript, which I imagine would be ridiculously slow.</p>

<p>Point 4, semantics, search engine indexing</p>

<p>This ties in with one of the reasons that Point 1 is so important, web pages without css or javascript are the way that search engines interpret the internet.  Adding methods like this to a webpage make it impossible for search engines to apply meaning or understand what your content is about.</p>

<p>Anyways, this is just my two cents, I can see how MAYBE in extremely high traffic scenarios such as digg has on their hands, this tech would be useful, but as a whole I think this is a step backwards in the web development world.</p>

<p>Not to rag on you digg developers!  I can appreciate the work you do, and the effort put into this, and I'll be learning how to use your libraries anyways just because I do think they are cool.  I just can't speak favorably about how practical I think they are.</p>

<p>~Mike</p>]]>
    </content>
    <published>2009-05-19T07:56:29Z</published>
  </entry>

</feed>