<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go on Jonathan Franklin</title><link>https://jonnie.github.io/tags/go/</link><description>Recent content in Go on Jonathan Franklin</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 19 Feb 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://jonnie.github.io/tags/go/index.xml" rel="self" type="application/rss+xml"/><item><title>Merchant Image Proxy</title><link>https://jonnie.github.io/work/merchant-image-proxy/</link><pubDate>Fri, 19 Feb 2021 00:00:00 +0000</pubDate><guid>https://jonnie.github.io/work/merchant-image-proxy/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;&#10;&lt;p&gt;Pricesearcher displayed product images hosted by merchants, with differing URL formats and image-serving behaviour. The site needed a common endpoint for image requests, resizing and caching.&lt;/p&gt;&#10;&lt;h2 id="architecture"&gt;Architecture&lt;/h2&gt;&#10;&lt;p&gt;The service was the company&amp;rsquo;s fork of &lt;a href="https://github.com/willnorris/imageproxy"&gt;willnorris/imageproxy&lt;/a&gt;, exposed as a signed company-domain endpoint and deployed on AWS Lambda behind API Gateway. Terraform managed separate staging and production environments.&lt;/p&gt;&#10;&lt;h2 id="what-i-built"&gt;What I built&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Maintained and customised the existing Go fork.&lt;/li&gt;&#10;&lt;li&gt;Added options to pass through the original image or return no image when processing failed, instead of always using the default placeholder.&lt;/li&gt;&#10;&lt;li&gt;Fixed decoding and encoding behaviour that corrupted proxied URLs containing special characters.&lt;/li&gt;&#10;&lt;li&gt;Aligned the Terraform version with the deployments&amp;rsquo; remote state.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="engineering-decisions"&gt;Engineering decisions&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The implementation extended the upstream proxy rather than replacing its existing resizing and caching behaviour.&lt;/li&gt;&#10;&lt;li&gt;Fallback behaviour was configurable between the original image, no image and the upstream default placeholder.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="technologies"&gt;Technologies&lt;/h2&gt;&#10;&lt;p&gt;Go, AWS Lambda, API Gateway, Terraform, Docker, Jenkins.&lt;/p&gt;</description></item></channel></rss>