<?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>Layer 7 - Blogs &#187; API Design &amp; Optimization</title>
	<atom:link href="http://www.layer7tech.com/blogs/index.php/tag/api-optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.layer7tech.com/blogs</link>
	<description>API Management &#124; SOA Governance &#124; Cloud Integration</description>
	<lastBuildDate>Thu, 16 May 2013 21:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Non-Function Junction: API Automation for Enterprise Operations</title>
		<link>http://www.layer7tech.com/blogs/index.php/non-function-junction-api-automation-for-enterprise-operations/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/non-function-junction-api-automation-for-enterprise-operations/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 21:00:46 +0000</pubDate>
		<dc:creator>Matt McLarty</dc:creator>
				<category><![CDATA[API Design & Optimization]]></category>
		<category><![CDATA[API Management]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=3102</guid>
		<description><![CDATA[Recently, I’ve been working closely with a number of large enterprise clients who have already gone or will soon go live with Layer 7 solutions at the core of mission-critical infrastructure. I’ve observed that, in the API Management space, proof of concept and initial projects often focus on functional needs but the emphasis shifts to [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a href="http://www.layer7tech.com/solutions/api-management-solutions-for-mobile-and-web" target="_blank"><img class="alignleft size-full wp-image-3106" style="margin: 10px;" title="API Operations Automation" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/10/Non-Function-Junction-v1.jpg" alt="API Operations Automation" width="204" height="300" /></a>Recently, I’ve been working closely with a number of large enterprise clients who have already gone or will soon go live with <a href="http://www.layer7tech.com/solutions/api-management-solutions-for-mobile-and-web" target="_blank">Layer 7 solutions</a> at the core of mission-critical infrastructure. I’ve observed that, in the API Management space, proof of concept and initial projects often focus on functional needs but the emphasis shifts to non-functional requirements as environments mature and sharing increases. There’s a clear, three-phase progression for large enterprises, which moves along these lines:</p>
<ol>
<li>Solve the basic functional use cases – The 80% in the 80-20 rule</li>
<li>Solve the remaining, more complex use cases – The 20%</li>
<li>Deploy the basic functions on an enterprise scale – Back to the 80%</li>
</ol>
<p style="text-align: left;">In Phase 3, it’s all about performance, scalability, operability, security, availability and consumability. The problems are very complex but the goal is to make the resulting solution as usable and simple as possible, given the wide range of users, developers, testers and operators that will be involved in its execution. As technology vendors, we are often guilty of focusing inwardly on bells and whistles, rather than outwardly on interoperability. This works well for phases 1 and 2 but brings a reckoning in the third phase. Fortunately, at Layer 7, we’ve spent the past decade working with enterprise clients and have evolved our products to meet their adaptability, reliability and automation needs.</p>
<p style="text-align: left;"><a href="http://www.layer7tech.com/library/product-data-sheets/layer-7-sdk-management-api/2449" target="_blank">The Layer 7 Management API</a> is at the core of this capability. The Management API ships with all Layer 7 Gateways, to enable automated administration of policies, resources and access control that can plug into enterprise configuration management, deployment and monitoring systems. It can be accessed programmatically through a Java API, on the network through a Web service API or built into command line scripts. For the clients I have worked with, this capability and the assurance it provides on moving through the systems development lifecycle is quite simply a must have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/non-function-junction-api-automation-for-enterprise-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile API Best Practice: Traffic Compression</title>
		<link>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 16:55:54 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Design & Optimization]]></category>
		<category><![CDATA[API Management]]></category>
		<category><![CDATA[Developers & Development]]></category>
		<category><![CDATA[Mobile Access]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2867</guid>
		<description><![CDATA[Despite how simple it is to support, compressing API traffic is an often-overlooked optimization. In situations where an API returns verbose resources, compressing the payload is a great way to reduce latencies. JSON and XML are highly compressible formats, for example. APIs targeting mobile applications should pay special attention to improving call latency, as mobile [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/tutorials/api-optimization-tutorials" target="_blank"><img class="alignleft size-full wp-image-2894" style="margin: 0px;" title="Mobile API Traffic Compression" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/08/Mobile-API-Traffic-Compression.jpg" alt="Mobile API Traffic Compression" width="238" height="300" /></a>Despite how simple it is to support, compressing API traffic is an often-overlooked optimization. In situations where an API returns verbose resources, compressing the payload is a great way to reduce latencies. JSON and XML are highly compressible formats, for example.</p>
<p>APIs targeting mobile applications should pay special attention to improving call latency, as mobile apps are often used in bandwidth-constrained situations (e.g. using a mobile app on your smartphone connected to an airport wifi). One should set aggressive targets for these latencies, in order to maintain a positive user experience. Although UX specialists have many tricks up their sleeves, they can’t hide a 10-second API response time. Can your API always respond in 100ms or less under bad connections? Better?</p>
<p><a href="http://www.layer7tech.com/products/products-overview" target="_blank">Layer 7&#8242;s Gateways</a> have built-in compression of REST API traffic using gzip compression. Most client-side frameworks also have built-in support for this kind of encoding. The compression is initiated by the requesting application, simply by adding the following HTTP header to its requests:</p>
<p><span style="color: #888888;">accept-encoding: gzip</span></p>
<p>iOS sample:<span style="color: #808080;"><br />
&#8230;<br />
[urlReq setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"]<br />
&#8230;</span></p>
<p><a title="github" href="https://gist.github.com/3491254" target="_blank">Android sample</a>:<span style="color: #888888;"><br />
&#8230;</span><br />
<span style="color: #888888;"> URL url = new URL(urlString);</span><br />
<span style="color: #888888;"> HttpsURLConnection  conn =<br />
(HttpsURLConnection)url.openConnection();</span><br />
<span style="color: #888888;"> conn.setRequestProperty(&#8220;accept-encoding&#8221;, &#8220;gzip&#8221;);</span><br />
<span style="color: #888888;"> &#8230;</span></p>
<p><a title="github" href="https://gist.github.com/3490606" target="_blank">JavaScript sample</a>:<span style="color: #888888;"><br />
&#8230;</span><br />
<span style="color: #888888;"> ajax=new XMLHttpRequest();</span><br />
<span style="color: #888888;"> ajax.setRequestHeaders(&#8216;accept-encoding&#8217;,'gzip&#8217;);</span><br />
<span style="color: #888888;"> &#8230;</span></p>
<p>Any API traffic flowing through theLayer 7&#8242;s  <a title="Layer 7 API Proxy" href="http://www.layer7tech.com/products/api-proxy" target="_blank">SecureSpan API Proxy</a> or <a href="http://www.layer7tech.com/products/mobile-access-gateway" target="_blank">SecureSpan Mobile Access Gateway</a> automatically benefits from this compression.</p>
<p>Although the reduced-latency benefit of gzip encoding resources is more pronounced for larger resources and low-bandwidth networks, the compression tradeoff on the client side is negligible. API providers and mobile application developers should consider adopting this mode by default.</p>
<p>In addition to response compression, Layer 7 Gateways also support gzip encoding for request messages. This also provides reduction of latency on the client side when requests contain compressible payloads. For example, consider an HTTP PUT with content-type=application/json. The client application declares the compressed content using the content-encoding http header as part of the request.</p>
<p><span style="color: #888888;">PUT /aresource</span><br />
<span style="color: #888888;"> Content-Type: application/json</span><br />
<span style="color: #888888;"> Content-Encoding: gzip</span></p>
<p><span style="color: #888888;">[gzip encoded]{</span><br />
<span style="color: #888888;"> ‘a’: ‘large and complex json here’</span><br />
<span style="color: #888888;"> }[gzip encoded]</span></p>
<p>When a Layer 7 Gateway detects that an API requester declares this &#8220;preemptive&#8221; compression, it will not only automatically decompress the request at the perimeter but also compress the response using the same mechanism by default (if the response has a payload).</p>
<p><span style="color: #888888;">200 OK</span><br />
<span style="color: #888888;"> Content-Type: application/json</span><br />
<span style="color: #888888;"> Content-Encoding: gzip</span></p>
<p><span style="color: #888888;">[compressed response]</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
