Activate your free membership today | Log-in

Tuesday, April 29th, 2008

Fast Streaming Ajax Proxy

Category: .NET, Performance

<p>Omar AL Zabir, the co-founder & CTO of Pageflakes has written about a continuous streaming Ajax proxy that solves the common problem that all Ajax proxies have, the double delay in downloading content on server first and then delivering to the browser.

Omar talks about the continuous proxy that can help solve the problems. The approach for the continuous proxy is:

  • Read bytes from external server in chunks of 8KB from a separate thread (Reader thread) so that it’s not blocked
  • Store the chunks in an in-memory Queue
  • Write the chunks to ASP.NET Response from that same queue
  • If the queue is finished, wait until more bytes are downloaded by the reader thread

Making a difference

And if you wonder what difference this can make:

Content Proxy served about 42.3 million URLs last month which is quite an engineering challenge for us to make it both fast and scalable. Sometimes Content Proxy serves megabytes of data, which poses even greater engineering challenge. As such proxy gets large number of hits, if we can save on an average 100ms from each call, we can save 4.23 million seconds of download/upload/processing time every month. That’s about 1175 man hours wasted throughout the world by millions of people staring at browser waiting for content to download.

There is even more detail on how the proxy has created.

Related Content:

  • Using DWR with TIBCO General Interface
    This simple request/response cycle example demonstrates some of the basic utilities Direct Web Remoting (DWR) provides for making interactions between...
  • PHP library ships for Microsoft Ajax
    Developers using PHP for the scripting of Microsoft ASP.NET Ajax 1.0 applications are getting some help from PHP for Microsoft Ajax Library, a product...
  • Ajax the Microsoft way
    While the rest of the known SOA development world has embraced Ajax, Microsoft has focused its energies on ASP.NET Ajax Extensions, formerly known as...
  • Book excerpt: Using the Ajax.NET Pro Library
    This chapter looks at the Ajax.NET Professional Library, an open-source framework that saves .NET developers from rewriting code to make it available...
  • At JavaOne: Tibco talks Ajax and event-driven SOA
    At JavaOne this week, Tibco Software Inc. unveiled its planned Ajax Message Service (AMS), which is designed to provide event-driven SOA by pushing...

Posted by Dion Almaer at 7:02 am
Comment here

+++--
3.3 rating from 33 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.