<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>proxy &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:07:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>proxy &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Loading images via http vs bytearray</title>
		<link>https://blog.sephiroth.it/2009/01/05/loading-images-via-http-vs-bytearray/</link>
					<comments>https://blog.sephiroth.it/2009/01/05/loading-images-via-http-vs-bytearray/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Mon, 05 Jan 2009 22:00:41 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ArrayCollection]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[blazeds]]></category>
		<category><![CDATA[bytearray]]></category>
		<category><![CDATA[charles]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[pyamf]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=270</guid>

					<description><![CDATA[Load images via http or using bytearray? which the best way? It was long time since I wanted to perform this kind of test, but for different reasons I never had the time to do that. Some days ago fnally I&#8217;ve found the time thanks to a project I&#8217;m involved into. The problem. A local &#8230; <a href="https://blog.sephiroth.it/2009/01/05/loading-images-via-http-vs-bytearray/" class="more-link">Continue reading <span class="screen-reader-text">Loading images via http vs bytearray</span></a>]]></description>
										<content:encoded><![CDATA[<div>Load images via <strong>http</strong> or using <strong>bytearray</strong>? which the best way?</div>
<div>It was long time since I wanted to perform this kind of test, but for different reasons I never had the time to do that.</div>
<div>Some days ago fnally I&#8217;ve found the time thanks to a project I&#8217;m involved into.</div>
<div>The problem.</div>
<div>A local webserver running flash remoting via <a href="http://pyamf.org/">pyamf </a>and a flash standalone application which need to load tons of images locally.</div>
<div>I&#8217;ve noticed that sending from amf the list of images path to be loaded required too much time (for me), even if they&#8217;re loaded locally.</div>
<div>Because of this I decided to try a first benchmark loading a single image using the standard way: send the link from amf and then load it using the classic actionscript Loader.<br />
The second test was to send directly from amf the image stream using a ByteArray and then loading the image in flash using the Loader.loadBytes method.</div>
<div>In this way I&#8217;ve noticed that the second task requires less time than the first one (more or less 40% less).</div>
<div>Unfortunately our application needs to load something like 50/100 images at the same time.</div>
<div>For this reason I did a new test loading 22 images of 500Kb each (10Mb total). For a better result I decided to use both pyamf and blazeds, to be sure there&#8217;s no problems in the language used. Moreover I used <a href="http://www.charlesproxy.com/">charles</a> to register the benchmark of these tasks.</div>
<div>The results were unexpected!</div>
<div></div>
<div><strong>First test:</strong> passing form amf the list of url images and loading using the standard flash Loader to load all of them simultaneously.</div>
<div>The time elapsed from the flash method call to the results was about 40 milliseconds. Then from the remote method result to the completion of all Loader about 1400 milliseconds.</div>
<div><span style="border-collapse: collapse; color: #000000; font-size: 12px; line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br />
</span></div>
<div><strong>Second test:</strong> passing from amf an arraycollection of bytearrays containing all the images stream to be loaded directly in flash.</div>
<div>The time elapsed form the flash method call to its result: about 2900 milliseconds. Time elapsed from the result to the all Loaders completion: about 900 milliseconds.</div>
<div></div>
<div>This results were unexpected for me, expecially because both with <strong>blazeds</strong> and <strong>pyamf</strong> sending 10Mb of bytearrays tooks something like 3 seconds!<br />
At a first impression I thought the problem was the time for java and python to create the amf stream data, but after a deeper test I discovered that they took more or less 30ms to generate the amf stream and the real bottleneck was the http transfer of this stream data.</div>
<div><span style="border-collapse: collapse; color: #000000; font-size: 12px; line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br />
</span></div>
<div>I&#8217;m attaching here the screenshots of the charles sessions using <a href="http://opensource.adobe.com/wiki/display/blazeds">blazeds</a>:</div>
<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;">
<a href='https://blog.sephiroth.it/wp-content/uploads/2009/01/pyamf_charles1.png'><img decoding="async" width="150" height="150" src="https://blog.sephiroth.it/wp-content/uploads/2009/01/pyamf_charles1-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" /></a>
<a href='https://blog.sephiroth.it/wp-content/uploads/2009/01/blazeds_charles1.png'><img decoding="async" width="150" height="150" src="https://blog.sephiroth.it/wp-content/uploads/2009/01/blazeds_charles1-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" /></a>
</p>
<p></span></p>
<div>
<div>
<div></div>
<div>Here you can find also the complete benchmark result using flash trace within the swf:</div>
<div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</div>
<div>BlazeDS</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</div>
<div>Method<span style="white-space: pre;"> </span>Elapsed-Time</div>
<div>call.test1<span style="white-space: pre;"> </span>0</div>
<div>result.test1<span style="white-space: pre;"> </span>40</div>
<div>complete.test1<span style="white-space: pre;"> </span>1453</div>
<div>TEST1 TOTAL TIME: <span style="white-space: pre;"> </span>1493</div>
<div>call.test2<span style="white-space: pre;"> </span>0</div>
<div>result.test2<span style="white-space: pre;"> </span>2919</div>
<div>complete.test2<span style="white-space: pre;"> </span>921</div>
<div>TEST2 TOTAL TIME: <span style="white-space: pre;"> </span>3840</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</div>
<div>PyAMF</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</div>
<div>call.test1<span style="white-space: pre;"> </span>0</div>
<div>result.test1<span style="white-space: pre;"> </span>32</div>
<div>complete.test1<span style="white-space: pre;"> </span>953</div>
<div>TEST1 TOTAL TIME: <span style="white-space: pre;"> </span>1049</div>
<div>call.test2<span style="white-space: pre;"> </span>0</div>
<div>result.test2<span style="white-space: pre;"> </span>2805</div>
<div>complete.test2<span style="white-space: pre;"> </span>908</div>
<div>TEST2 TOTAL TIME: <span style="white-space: pre;"> </span>4763</div>
<div></div>
</div>
<div>Here you can see the source code used for these tests:</div>
<div><span class="mt-enclosure mt-enclosure-file" style="display: inline;"></p>
<ul>
<li><a href="https://blog.sephiroth.it/wp-content/uploads/2009/01/Test.java">Test.java</a></li>
<li><a href="https://blog.sephiroth.it/wp-content/uploads/2009/01/test_bytearray.py">test_bytearray.py</a></li>
<li><a href="http://www.sephiroth.it/weblog/archives/test_bytearray.py"></a>and the Flex project: <a href="https://blog.sephiroth.it/wp-content/uploads/2009/01/TestLoadImageFromPyAMF.zip">TestLoadImageFromPyAMF.zip</a></li>
</ul>
<p></span></div>
<div>In conclusion. While sending 10Mb of data ( for example bytearray ) requires more or less 2.5 seconds using flash remoting as single requests ( because the transfer rate of the webserver it&#8217;s about 4Mb/sec ), loading simultaneusly 20 images from the webserver, using http, tooks 1 second.</div>
<div>This is because the webserver for each requests opens a different thread to dispatch the request and in this way the total time to perform this task is less than the first method.</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2009/01/05/loading-images-via-http-vs-bytearray/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>NetConnection Debugger Alternates</title>
		<link>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/</link>
					<comments>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 16 Dec 2005 19:05:32 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[proxy]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=121</guid>

					<description><![CDATA[Today I&#8217;ve started a new Flash project which will also involve Flash Remoting. So I decided to try this ServiceCapture tools for debugging the amf messages as replacement of the builtin NetConnection debugger. I&#8217;m really suck of the flash NetConnection Debugger (it works 50% of the times for me). Sometimes I need to close and &#8230; <a href="https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/" class="more-link">Continue reading <span class="screen-reader-text">NetConnection Debugger Alternates</span></a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignleft" style="margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; border: 0px initial initial;" src="http://kevinlangdon.com/serviceCapture/images/ss_small_amf.jpg" border="0" alt="" width="120" height="101" />Today I&#8217;ve started a new Flash project which will also involve Flash Remoting.<br />
So I decided to try this <strong>ServiceCapture</strong> tools for debugging the amf messages as replacement of the builtin NetConnection debugger.<br />
I&#8217;m really suck of the flash NetConnection Debugger (it works 50% of the times for me). Sometimes I need to close and re-open it in order to make it works again, sometimes it doesnt display anything at all&#8230;<br />
Btw, ServiceCapture can capture every kind of HTTP traffic, not only remoting calls and it has also a bandwidth simulation feature. (and these are cool features)<br />
However the full license costs $34.99, which is not so cheap for this kind of tool.<br />
<a href="http://kevinlangdon.com/serviceCapture/">http://kevinlangdon.com/serviceCapture/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
