<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gerard Gigliotti on Medium]]></title>
        <description><![CDATA[Stories by Gerard Gigliotti on Medium]]></description>
        <link>https://medium.com/@g_gigliotti?source=rss-ac7c4737975b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*puHkd56OZFj233jE.jpg</url>
            <title>Stories by Gerard Gigliotti on Medium</title>
            <link>https://medium.com/@g_gigliotti?source=rss-ac7c4737975b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:03:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@g_gigliotti/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lambda Docker Adventures with SQLite]]></title>
            <link>https://medium.com/@g_gigliotti/lambda-docker-adventures-with-sqlite-36cd6d718a56?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/36cd6d718a56</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[tegola]]></category>
            <category><![CDATA[sqlite]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Wed, 12 May 2021 21:38:10 GMT</pubDate>
            <atom:updated>2021-05-14T00:31:45.207Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hero banner showing SQLite, Docker and AWS Lambda logos on adventureous background" src="https://cdn-images-1.medium.com/max/1024/1*FceEy6cF7n_nl0pBX83grA.jpeg" /><figcaption>Photo originally by <a href="https://unsplash.com/@mjsleeper">Matthew Sleeper</a>, beautifully enhanced by me.</figcaption></figure><p>Last year I spent some time playing around using <a href="https://tegola.io/">Tegola</a> (a mapping tile generator) and AWS Lambda to generate map tiles using Geospatial data stored in SQLite and <a href="https://gerard.gigliotti.com.au/lambda-tile-generation-with-tegola-aabadb1a0c2e">hosted on Amazon EFS.</a> There was a serious performance penalty reading large data files over EFS, so I needed to make sure my database was as small as possible. In addition, you pay for all that data that you’re transferring, so although not expensive for a low volume site, you could end up in a pickle if things pick up.</p><p>To further that thread of SQLite data in Lambda, in December last year as an early Christmas present AWS released <a href="https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/">Container Image</a> support, a sort of half-way between a traditional Lambda Zip function and a ECS-Fargate container. This allows you to generate a Docker image locally, push it into the Elastic Container Registry (ECR), and then use that as a Lambda function. Cool, but what really caught my eye was the fact that it supports up to a 10Gig container image. So, was using Docker+Lambda a better solution for read-only SQLite databases than Lambda+EFS? I wanted to build out something practical to validate the technique, so I decided on an address auto-complete endpoint, where it turns free text into decomposed address data. For example, if you supply “101 Coll” as text, I want it to return the decomposed address information for “101 Collins Street”.</p><h3>G-NAF Fun with SQLite</h3><figure><img alt="Data.gov.au Logo" src="https://cdn-images-1.medium.com/max/305/0*DyneXSsdU0hXPE5N.png" /></figure><p>The data I was using last time originated from the <a href="https://data.gov.au/dataset/ds-dga-19432f89-dc3a-4ef3-b943-5326ef1dbecc">Australian Government’s Geoscape Geocoded National Address File</a> (G-NAF), which contains a record of every single physical address in Australia. The data itself is provided in a pipe-seperated set of normalized files, which are easily loadable into Postgres/Postgis with the included set of table schemas; once you get around the table structure.</p><p>Now I wanted to load this address data into SQLite, so I needed to make a couple of less-than-ideal modifications to the standard load process:</p><ul><li><strong>Schema Refactor</strong>: SQLite needs its foreign keys defined upfront, so I needed to modify the included G-NAF schema for that.</li><li><strong>Null Imports</strong>: This took me far longer than I care to admit to fix(and I only identified it as an issue later), but there is currently no mechanism to have SQLite’s default CSV import mechanism to treat blank values as nulls. So my database import was originally littered with empty char fields. I ended up using a blunt hammer to update all empty strings to NULL through a set of SQL UPDATE commands; not pretty, but it works. Also very slowwww.</li></ul><p>The end product is this enormous Docker Image (<a href="https://hub.docker.com/repository/docker/ggotti/g-naf-full-sqlite">https://hub.docker.com/repository/docker/ggotti/g-naf-full-sqlite</a>), based off <a href="https://github.com/ggotti/g-naf-full-sqlite">this Github</a> repository. It’s a great way of being able to quickly see what G-NAF has to offer, without needing to fumble around with the schema.</p><h3>Distilling it Down</h3><p>With my frankenstein SQLite image, it was time to convert that into something I could use in my Lambda function. I created a new SQLite database, and then I materialised the “ADDRESS_VIEW” from the G-NAF schema into a separate table in my new database, which is effectively a denormalized view of the address data.</p><p>The next step was to create a text representation of the address data. The excellent team at ISP <a href="https://superloop.com/">Superloop</a> have come up with a <a href="https://github.com/superloop-ltd/gnaf/blob/master/address_search.sql">MySQL version</a> of converting the data into text. Unfortunately, it makes extensive use of `CONCAT_WS`, which again is something not supported by SQLite. What I ended up doing was hand converting their statement into an absolutely unmaintainable mess of a thing, which sort of replicates the `CONCAT_WS` behaviour using syntax that’s available. It’s not 100%, but it’s close enough. Look at this horrific mess. Warning. May Burn your Eyes Out.</p><figure><img alt="Screenshot of https://github.com/ggotti/address-auto-complete/blob/main/address-lookup/data-prep/tablePopulator.sql" src="https://cdn-images-1.medium.com/max/1024/1*IlNeNI1VLBPof609P-1uZA.png" /><figcaption>Screenshot of code from tablePopulator.sql</figcaption></figure><p>AWS SAM supports the build and development of Docker Images as part of the <a href="https://aws.amazon.com/blogs/compute/using-container-image-support-for-aws-lambda-with-aws-sam/">CLI</a>. I ended up using that to build the project scaffold, and then introduced a multi-step Docker Build process to pull in the SQLite image, generate the distilled address database, and then copying the generated database into the appropriate NodeJS Lambda docker image: public.ecr.aws/lambda/nodejs:14. I was originally building this on my 2015 Macbook Pro, and it was seriously struggling with my grotesquely unoptimised build process. I ended up switching it to an older Linux desktop, but it didn’t struggle as much with the heavy disk IO.</p><p>SAM itself is really getting better and better with every release. It’s so quick to just spin up a new application. The only thing I had to do outside of SAM was define the Elastic Container Repository (ECR), and just feed those details into SAM. sam build &amp;&amp; sam deploy and you’re good to go.</p><h3>Demo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*qkMoaoGJrA8maZJTKUtdgw.gif" /></figure><p>The Lambda application itself is pretty simple, with a small JavaScript application connecting to SQLite and doing a LIKE search against one of the tables. This could probably be improved with the FTS5 Full Text Search extension, but LIKE works well enough for this demo. To demo it’s usage, I put a simple web-page using <a href="https://tarekraafat.github.io/autoComplete.js/#/">autoComplete.js </a>to hit the Lambda function as the user types. Give it a <a href="https://ggotti.github.io/address-auto-complete/">try here</a>, or watch the above video.</p><p>Source code can be found on <a href="https://github.com/ggotti/address-auto-complete">Github here</a>.</p><h3>Revisiting Tegola</h3><figure><img alt="Tegola generated map" src="https://cdn-images-1.medium.com/max/1024/1*HkmTBpWJ68HTpPT2v0NpzA.png" /><figcaption>Tegola Generated file example</figcaption></figure><p>So the real question is, how does the Docker-Image approach work in comparison to reading large SQLite databases off EFS? The results may surprise you. I left the RAM the same (3008mb), and then ran a comparison between the two, against the set of same Tagola coordinates; a rather complex area of the Melbourne CBD. I manually adjusted the RAM between requests, to guarantee a fresh instance of the function. The Lambda first function was consistently taking <strong>25–26 seconds</strong> to process the request. Whereas the Docker image was taking between <strong>22–24 seconds</strong> to process, when it worked. A large number of requests were hitting the API Gateway’s <strong>30 second limiter</strong>, and therefore timing out. There seemed to be a slight delay when the Image was being pulled for the first time, which may factor into the delays. I suspect behind the scenes it does some caching between ECR and Lambda of the image itself, independent of the actual Lambda execution “warmth” behaviour. Increasing the amount of available RAM to 4GB seemed to improve performance consistently.</p><p>So there seems to be a slight increase in the RAM requirements for the Docker image. However, the usability of the Docker format for pushing data in, and the fact that the ECR data transfers within the same region are free, make the Docker option pretty appealing.</p><h3>Conclusion</h3><p>So, can you use SQLite with Docker in Lambda? You can. Can you import G-NAF data into a relatively compact SQLite database? You can. So is it worth it in the end? The experience with SAM is pretty seamless, and it’s a great way of pushing large read only data images around; less than <a href="https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/">10GB currently</a> supported. It certainly removes some of the complexity of managing the data via EFS. Just be prepared to pay a little more on your execution costs running it via Docker.</p><p><strong>PS</strong>: If you were fully crazy you could probably build some kind of updatable website where you have a separate Lambda function updating an ECR image based off a singular write data fed in via an SQS queue. Maybe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36cd6d718a56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lambda Tile Generation with Tegola]]></title>
            <link>https://medium.com/@g_gigliotti/lambda-tile-generation-with-tegola-aabadb1a0c2e?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/aabadb1a0c2e</guid>
            <category><![CDATA[ef]]></category>
            <category><![CDATA[geodata]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[tegola]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Tue, 27 Oct 2020 22:24:40 GMT</pubDate>
            <atom:updated>2020-10-27T22:24:40.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*72sKc5O3XygjRPbDZ9WpLQ.png" /><figcaption>Multi Technology <em>Mix</em> (MTM) at its finest. OSM Layer ©MapTile</figcaption></figure><p>Inspired by the excellent <a href="http://nbnmtm.australiaeast.cloudapp.azure.com/">NBN MTM Alpha</a> I’ve been recently playing around with the <a href="https://data.gov.au/dataset/ds-dga-c79b2219-7e1f-46a9-961f-e87668122f02/details">NBN connection type</a> data released on <a href="http://data.gov.au/">data.gov.au</a> in July 2020. Combining it with <a href="https://data.gov.au/dataset/ds-dga-19432f89-dc3a-4ef3-b943-5326ef1dbecc/details">Geocoded National Address File</a> , you can produce maps that surface address level connection details. For NBN enthusiasts (such as myself), it’s pretty exciting, as the actual NBN map is purposely evasive.</p><p>So once you’ve loaded all that juicy data into <a href="https://postgis.net/">PostGIS</a> how do you get that information out? The open source mapping space has changed significantly since I played around with it in the early 2010s. Tile generation no longer revolves around muttering incantations to summon life out of <a href="https://mapnik.org/">Mapnik</a> for raster tile generation. Now, there is the <a href="https://docs.mapbox.com/vector-tiles/specification/">MapBox Vector Specification</a> which allows you to serve piping hot geo data into the complementary <a href="https://docs.mapbox.com/mapbox-gl-js/api/">Mapbox GL JS </a>mapping library. To serve vector tiles using the MapBox Vector Specification, <a href="https://tegola.io/">Tegola</a> caught my eye as a lightweight, well supported application. Most excitingly, it supports Lambda based generation.</p><h3>The Idea</h3><p>The majority of articles (such as <a href="https://medium.com/@alexrolek/running-a-serverless-vector-tile-backend-with-aws-lambda-and-go-8e6ad46a7c38">Running a Serverless Vector Tile Backend with AWS Lambda and Go</a>) talk about running Tegola with a Postgres backend, and the associated connection pool issues with that. If I was doing this at work, I’d be looking at potentially an Amazon RDS Proxy with a smallish RDS instance. Even on a db.t3.small RDS Postgres instance, you’d be looking at <a href="https://aws.amazon.com/rds/proxy/pricing/">$25.92</a> for the proxy, and <a href="https://aws.amazon.com/rds/postgresql/pricing/">$40.32</a> for the database. That’s $66.24 USD a month, which is $93.15 Australian Dollarydoos. That’s too much money. I could run a LightSail/Digital Ocean instance, but I’d want to put a Load Balancer in front ($18 USD for a LightSail LB). So how can we run it on Lambda, but not need a database?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/0*6wpHlj_EOT0O37y5" /></figure><p>Enter Lambda’s support for <a href="https://aws.amazon.com/blogs/aws/new-a-shared-file-system-for-your-lambda-functions/">Amazon Elastic File System (EFS)</a> which was announced in June. No longer do you need to use nested layers, or some S3 tomfoolery to load data into the 512-MB temporary storage available to Lambda. So with an expandable filesystem, it really opens up the possibilities for making larger files available to Lambda.</p><p>Tegola primarily supported PostGIS, but it also supports <a href="https://www.geopackage.org/">GeoPackage</a>, an SQLite based standard for storing geospatial data. Now, SQLite and NFS don’t <a href="https://www.sqlite.org/faq.html">really mix</a>. But this will be read-only, so we’ll just give it a go. So Tegola for tile generation, with a GeoPackage on NFS for the data storage. <strong>What could go wrong</strong>?</p><h3>The Reality</h3><p>My initial plan was to run the NBN dataset, as well as an OSM extract of Australia. I loaded them Postgis using <a href="https://github.com/go-spatial/tegola-osm">Tegola OSM</a>, and once I had it working, I fumbled through using <a href="https://gdal.org/programs/ogr2ogr.html">ogr2ogr</a> to export the data from PostGis into GeoPackage. Make sure you use the correct spatial reference system (SRS) otherwise bad things will happen; Tegola prefers <em>4326</em> for its GeoPackage configurations. Some of the data types also caused issues with the conversion, so I commented out a number of the layers in the Tegola OSM config. All up, my OSM data was about 4gig, and my NBN data was about 3.5gig. So once I had it working on my local computer, it was time to load it into Lambda.</p><p>Tegola has a pre-built Lambda version, so that was simple, as was wiring in the EFS volume. Of note, I did need to use an EC2 instance to load my 7.5gig of data into EFS, which was unfortunate, as I was hoping I could use an S3-style console for uploading. The only struggle I had was getting the API Gateway setup, along with CORS, and that’s mainly because I didn’t read the documentation correctly about setting the `’application/octet-stream` media-type; <a href="https://github.com/go-spatial/tegola/issues/607">this Github</a> Issue also helped. So with that corrected, i wired it up to my web-app and I was good to go…except…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L68Wt1nIsc6ZXXy5aDbJxg.png" /><figcaption>Melbourne CBD with NBN Mapping Data</figcaption></figure><p>It didn’t work. I bumped the memory allocation. Still didn’t work. Looking into the logs, it appeared it was timing out during the execution; hitting the 30 second API Gateway timeout. Using EFS requires connectivity via your VPC, but recent improvements have drastically reduced those cold-start times. The biggest issue seemed to be the size of the GeoPackage files. Removing the dream of serving the OSM data myself, I left the NBN GeoPackage file, and it worked significantly better. It still choked on denser areas of the map, for example the Melbourne CBD, and for that I’ve reverted to using an S3 based cache mechanism. Tegola has an <a href="https://tegola.io/documentation/cache-seeding-and-purging/">excellent cache seeding</a> function, so data can be served instead from a cache. A word of warning on caching, it can be very expensive, both from a time + storage perspective, to cache tiles at lower zoom levels. Cache seed only where something is expensive to generate on the fly.</p><h4>Component Overview</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*ieT9fLEOnNPxO18W8D53_g.png" /><figcaption>Wiring it all together</figcaption></figure><h3>Conclusion</h3><p>So, can you serve MapBox Vector Specification tiles on the cheap using Lambda + Tegola + EFS? Yes you can. But caveat emptor. You’ll need to make sure your GeoPackage aren’t too big, potentially splitting them into specific layers; instead of the giant single layer I used. You’ll also want to make liberal use of the cache-seeding function, where possible, but that does come with a rather large file size overhead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aabadb1a0c2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CKAD Exam Tips]]></title>
            <link>https://medium.com/@g_gigliotti/ckad-exam-tips-e9d5a047e252?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9d5a047e252</guid>
            <category><![CDATA[cncf]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ckad]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Sun, 03 Mar 2019 22:21:44 GMT</pubDate>
            <atom:updated>2019-03-03T22:21:44.593Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzz90LbpAl2ZAY3k7qTFvg.png" /><figcaption>Kubernetes Everywhere</figcaption></figure><p>I recently received my Certified Kubernetes Application Developer (CKAD) certification, and boy was it fun. I thought I’d put together some of my tips around my exam prep, as I’d only really dabbled in Kubernetes previously.</p><h3>Learning Kubernetes Itself</h3><h3>Kubernetes in Action</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*22nc2ikFGk8auwUWl5Efnw.jpeg" /><figcaption>Cover for <a href="https://www.manning.com/books/kubernetes-in-action">Kubernetes in Action</a> by <a href="https://github.com/luksa">Marko Lukša</a></figcaption></figure><p>To start with I decided to read through <a href="https://www.manning.com/books/kubernetes-in-action">Kubernetes in Action</a> by <a href="https://github.com/luksa">Marko Lukša</a>. A tome at 624 pages, the book covers the basics needed for the exam, as well as additional sections regarding extending Kubernetes and multi-clusters. You’ll definitely want to run through the book at your computer, so you can punch the examples in and see how they react. It’s particularly important for topics such as the deployment handling. There are numerous Kubernetes release cycles a year, so some of the stuff in the book wasn’t entirely up to date. Saying that, Manning released a small update in February.</p><p>The book approach isn’t for everyone, and there are plenty of other introductory tutorials on the web, including a <a href="https://www.cncf.io/certification/training/">free introductory</a> course from CNCF. Some of my colleagues who were studying at the same time preferred this.</p><h4>Pick a Distribution to Use</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Ao4j4-480-Gt8gDKk766_Q.jpeg" /><figcaption>kops logo</figcaption></figure><p>Although Docker for Mac now includes <a href="https://docs.docker.com/docker-for-mac/kubernetes/">Kubernetes</a>, I think it’s better to use a more realistic distribution. I ended up using <a href="https://github.com/kubernetes/kops">kops</a> to deploy a working Kubernetes cluster on AWS. One of the neat features of kops is that it allows you to generate valid <a href="https://github.com/kubernetes/kops/blob/master/docs/terraform.md">Terraform configuration files</a>, which I then used to create and destroy the cluster as required. Kops can get expensive if you leave it running.</p><p>I focused on kops because I wanted to learn about how Kubernetes interacted with AWS resources, like EFS and IAM Roles.</p><h3>Exam Specific Tips</h3><h4>Read the Curriculum Overview</h4><p>Make sure you read the <a href="https://github.com/cncf/curriculum">Curriculum Overview</a>, as it defines the topics that will be covered in the exam, and the percentage of each topic on the exam. Make sure you understand each of the dot points, and how they are created, modified and examined on a Kubernetes cluster. All of them are relevant.</p><h4>Handle your kubectl</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJ-7EQrcWiHbRrrMbQYJfg.png" /><figcaption>Get ready for kubectl</figcaption></figure><p>You need to be proficient in using kubectl regarding the topics covered in the Curriculum Overview. In particular you need to know how to create things with a minimal amount of typing. Some resources need to be created via a YAML syntax, but for the majority of resources CLI arguments should be sufficient. In terms of CLI tips:</p><ul><li>the `kubectl run` command is particularly powerful. Use it with the --dry-run -o yaml` arguments to output YAML files.</li><li>I recommend setting up a `k` alias for `kubectl` so you don’t need to keep on typing it.</li><li>The exam makes use of 3 clusters and numerous namespaces. Get comfortable in switching between clusters and namespaces with `kubectl config` otherwise you’ll waste a lot of time prefixing the namespace to your commands, and you will introduce the possibility for additional errors.</li></ul><p>I spent a lot of time running through the exercises defined <a href="https://github.com/dgkanatsios/CKAD-exercises%20">here</a>, as I found it a great way to learn the commands. It doesn’t necessarily represent the exam question format, but I found it invaluable. You should be able to answer every question before taking the exam without hesitation.</p><h4>Practice your Linux Foo</h4><p>You need to be proficient in your Linux terminal skills. You’ll need to be able to pipe data around, ssh into different terminals, and be comfortable with sudo. Having a workable knowledge of vim or nano is important. You don’t want to be copying large amounts of text back and forward between the terminal and the exam notepad, so you need to be able to edit in place. There isn’t a huge amount of typing required, as you’ll be copying from kubernetes.io for references, or generating YAML from cli commands, but you certainly need to be able to quickly edit a file.</p><h4>Bookmarks in Chrome</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tTtEDJSeKfo0IUWERgiS_Q.png" /><figcaption>Bookmark toolbar</figcaption></figure><p>Have a good set of Bookmarks defined in Chrome, and have them available in the often unloved bookmark bar. You should ensure you have links for all the topics covered by the Curriculum Overview.</p><h4>The Exam Itself</h4><p>The exam itself is pretty time constrained. Take note of the percentage worth of each question, because the length of the question does not necessarily correlate to its scoring. I’ve spoken to some of my colleagues who suggested working from the last question backwards, but I found it just as effective starting from question 1, and then skipping over questions that I couldn’t quickly solve. You’ll want to get as many runs on the board so you can clear the required pass mark.</p><p>In addition, I believe the exam is automatically marked, so you need to be spot on with your spelling. Either copy names directly out of the question, or be very careful when you type them.</p><h3>Conclusion</h3><p>I highly recommend sitting the CKAD Exam, if only just for the experience. Hopefully some of these tips will help you in that quest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9d5a047e252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey to ippon.acrossthe.world]]></title>
            <link>https://medium.com/@g_gigliotti/journey-to-ippon-acrossthe-world-bd74952d7caa?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd74952d7caa</guid>
            <category><![CDATA[melbourne]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[recruitment]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 12:21:25 GMT</pubDate>
            <atom:updated>2018-10-30T12:21:25.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wl_WPND_pAqwKoW2oWeePw.png" /><figcaption>8-bit Flinders Street Station</figcaption></figure><p>The Ippon Australia team have been working hard over the last couple of weeks on a recruitment challenge, called <a href="https://ippon.acrossthe.world/">Ippon Across The World</a>. It’s a short game to test technical skills, without being too over the top, and hopefully it’s a little fun along the way. Give it a try if you haven’t seen it yet.</p><h3>Err Why?</h3><p>During the downtime between projects, it’s important to maintain team cohesion, as well as learn new skills. Self-paced learning is good to a point, but you learn so much more by having a tangible deliverable, and a target to work towards. We also have on-boarded some great new team members recently, and it was a great opportunity to get to know them a little better.</p><h3>Design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UNUekXqQs3yEEnNS" /></figure><p>We went with an 8-bit video game motif, because, well who doesn’t like 8-bit? We wanted to capture that original Carmen Sandiego vibe but with a Melbourne twist.</p><h3>Architect</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tlo4-6Z237liRSJN" /></figure><p>AWS is our default cloud provider, so we used a modern AWS design for our application. We wanted to leverage as many AWS services as possible, to give us a holistic view of how some of these newer components hang together.</p><ul><li><strong>CloudFront</strong> is incredibly important to hosting a modern application on AWS; saying that, it is very often ignored or misunderstood. It provides not just caching services, but also edge-content delivery and TLS support. You can even now run Lambda Edge functions as part of your content delivery strategy; we’re using it here for CORS header support.</li><li><strong>Route53</strong> is the DNS provider for AWS, both internally and externally. You can also purchase and manage domains through it. I particularly enjoy finding novelty domain names.</li><li><strong>AWS Connect </strong>is a rather unusual AWS offering, and we wanted to try it out. It’s effectively a call-center in a box, allowing you to establish elaborate inbound and outbound call flows, including ML-based text-to-speech, as well as human operator steps.</li><li><strong>S3</strong> static file storage for the website and Java libraries.</li><li><strong>API Gateway</strong> for rate limiting and routing requests to Lambda.</li><li><strong>Lambda</strong> for serverless API processing. The Lambda functions are primarily used to respond to answers and provide the next URL to follow, as well as for processing analytics events.</li><li><strong>DynamoDB is</strong> used for storing temporary data, which we’re cleaning up with the automated TTL function. For those that are unfamiliar with DynamoDB, it’s a scaled NoSQL offering from AWS.</li><li><strong>Pinpoint (and Cognito) </strong>used for analytics; tracking primarily website interactions.</li></ul><h3>User Interface</h3><p>We decided to use raw JavaScript with <a href="https://greensock.com/gsap">GSAP</a> for the animation components, with a focus on modern desktop browsers. No legacy Internet Explorer support here. Apart from the animation aspects, we also used <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API">Web Crypto API</a> for one of the challenges, which was pretty exciting to see in action.</p><h3>CI/CD Pipeline</h3><p>No project is too small for a CI/CD pipeline. It makes life easier if you’re deploying something more than once, and it’s important when you have a number of people wanting to make a lot of little changes quickly.</p><p>We used <a href="https://www.terraform.io/">Terraform</a> for setting up the base infrastructure, and then a combination of shell scripts for updating deployed assets. <a href="https://docs.gitlab.com/ee/ci/pipelines.html">Gitlab</a>, which is our source-control tool, has an amazing pipeline mechanism for defining build processes, and we use that to push changes into the various environments when a single commit occurs.</p><h3>What’s Next</h3><p>Shipping an application is not the end of the journey, it’s the beginning. We’re collecting usage metrics via Pinpoint, which allows us to see how far users (anonymously) get through the game. We will be offering slight variations to the challenges depending on skillsets, and potentially offering a harder difficult level for the clever cookies.</p><p>We certainly enjoyed putting t<a href="https://ippon.acrossthe.world/">his together</a> and we hope that you enjoy playing it.</p><p>Originally published <a href="https://www.linkedin.com/pulse/journey-ipponacrosstheworld-gerard-gigliotti/">https://www.linkedin.com/pulse/journey-ipponacrosstheworld-gerard-gigliotti/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd74952d7caa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS AppSync is coming for your API]]></title>
            <link>https://medium.com/@g_gigliotti/aws-appsync-is-coming-for-your-api-979e4c21ae7c?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/979e4c21ae7c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[amplify]]></category>
            <category><![CDATA[appsync]]></category>
            <category><![CDATA[ippon]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 23:37:56 GMT</pubDate>
            <atom:updated>2018-06-17T23:37:56.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*_iSFCcn5RxWFzTgdtx3a0A.png" /></figure><blockquote>According to the <a href="https://aws.amazon.com/blogs/aws/introducing-amazon-appsync/">introductory post</a>, AWS AppSync is a “serverless GraphQL service for real-time data queries, synchronization, communications and offline programming features.”. I know that statement doesn’t feature every 2018 buzz word, but it is getting pretty close. But what does it actually do?</blockquote><p>If you’d like to read more about AWS AppSync, head over to the <a href="https://blog.ippon.tech/aws-appsync-is-coming-for-your-api/">Ippon Blog</a>. If reading isn’t for you, the associated pony-heavy sample is on <a href="https://github.com/ggotti/ponyvote">Github here</a>:</p><p><a href="https://blog.ippon.tech/aws-appsync-is-coming-for-your-api/">AWS AppSync is coming for your API</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=979e4c21ae7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It’s about the little (internet of) things]]></title>
            <link>https://medium.com/@g_gigliotti/ts-about-the-little-internet-of-things-fba724e2124a?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fba724e2124a</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[lifx]]></category>
            <category><![CDATA[yarra-trams]]></category>
            <category><![CDATA[smart-home]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Sun, 14 Jan 2018 22:22:03 GMT</pubDate>
            <atom:updated>2018-01-14T22:22:03.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opmauOvaJc93b8wlywy3Jw.jpeg" /><figcaption>The Lamp</figcaption></figure><p>After moving into my new place I decided that I wanted to start down the treacherous path of home automation. I’d dabbled with a WeMo switch previously (see <a href="https://gerard.gigliotti.com.au/fitbit-powered-home-automation-17166f5824cb">here</a>), but that was more of a toe in the water. Now I wanted to jump in. My hesitation with home automtion/IoT in the past has been that it’s difficult to find a use case where it would actually enhanced my life. In addition, I don’t want any IoT automation to interfere with the day-to-day operation of how a reasonable person expects the device to operate. For example, if you’ve installed Philips Hue lights throughout your house, and your automations don’t work because somebody has turned off your globe at the switch, that’s a problem with the automation, not with the switch.</p><p>I luckily live near a tram line, and I catch the tram to get to work. Melbourne’s tram network is run by Yarra Trams, and they produce a pretty good app which provides arrival information for tram stops. Just an aside, the arrival information isn’t calculated by GPS, but rather a series of radio-based timing gates relative to your stop. The problem I have is that even during peak frequency, the trams are spaced 10–12 minutes apart. You don’t want to have to wait at the stop for 10–12 minutes. As a result, when I get ready in the morning, I usually have the iOS app up checking the tram arrival time. Constantly sliding down to refresh is giving me RSI, and although there is a notification system, it requires my input initially. This is my use case!</p><p>Now I can remember Werner Vogels at last year’s AWS Architect &amp; Developer Day in Melbourne talking about natural interfaces, and this is a perfect example of where one can apply. My idea was to use a connected light globe, in this case one from LIFX (more on that later), and connect it to the<a href="http://ws.tramtracker.com.au/pidsservice/pids.asmx"> Yarra Trams API</a>. As the tram got closer, I wanted the light to get brighter, and then when it was absolutely time to leave, I wanted it to flash to warn me.</p><h3>Parts</h3><h4>Yarra Trams API</h4><p>Yarra Trams had a public API before it was cool, so although it’s SOAP-based, it provides data for all your tram network needs. Bang in the stop number and you’re good to get your predicted arrival information: <a href="http://ws.tramtracker.com.au/pidsservice/pids.asmx?op=GetNextPredictedRoutesCollection">GetNextPredictedRoutesCollection </a>. Before you call that, you need to get a ClientGuid by calling <a href="http://ws.tramtracker.com.au/pidsservice/pids.asmx?op=GetNewClientGuid">GetNewClientGuid</a>, and then you’re good to go. Simple.</p><h4>LIFX</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kV7u23SgO8dmV3wfowS7Jw.jpeg" /><figcaption>LIFX Glove</figcaption></figure><p>One of my fundamental home automation rules, is that the devices must be controllable locally. I don’t want to have to communicate over the internet to talk to a device which is running on my local network; it’s unnecessary. LIFX have a pretty robust looking Remote API, but luckily they also have a local LAN protocol for communicating with globes. LIFX Globes are standalone, so the protocol has a discovery mechanism using UDP for finding globes. NPM has (almost) everything, including a <a href="https://github.com/MariusRumpf/node-lifx/commit/45c7ab8f88799486d921e6b69e618fb479bc7f0a">NodeJS implementation</a> of the protocol.</p><h4>Docker</h4><p>Although Docker is supported on <a href="https://github.com/moby/moby/pull/24815">Raspberry Pesis</a> , Docker Machine doesn’t just work out the box. I followed this <a href="https://www.thepolyglotdeveloper.com/2017/05/create-raspberry-pi-cluster-docker-swarm-raspbian-linux/">guide</a> to trick it into working. Probably not production grade, but I haven’t had too many issues with it.</p><h3>Lazily Gluing It Together</h3><p>My implementation is fairly rudimentary; it’s on <a href="https://github.com/ggotti/tramLight">Github</a>. The application runs on a timer, and effectively runs for 30 minutes over my departure window. When a tram is within 7.5 minutes, the light is turned on, and then as the tram gets closer, the brightness increases. When it’s really close the light pulses to signify it’s now time to leave. If the tram is arriving in less than 4 minutes, the light is then turned off, as I won’t be able to make it in time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*Cq-itC3kXL-MjtLnbpv7vA.gif" /></figure><h3>Conclusion</h3><p>The real benefit of this “thing” is that it allows me to continue my morning routine without needing to constantly refresh my phone for tram arrival information. It’s non-invasive, yet still informative. This is how we should think of IoT devices, they need to enhance, not inhibit our lives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fba724e2124a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Putting the FUN into Functioning CI/CD]]></title>
            <link>https://medium.com/@g_gigliotti/putting-the-fun-into-functioning-ci-cd-ae7adb19ea17?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae7adb19ea17</guid>
            <category><![CDATA[dc]]></category>
            <category><![CDATA[jhipster]]></category>
            <category><![CDATA[rancher]]></category>
            <category><![CDATA[ci]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Sun, 25 Jun 2017 23:59:43 GMT</pubDate>
            <atom:updated>2017-06-26T00:01:10.643Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a presentation I gave at the inaugural <a href="https://www.meetup.com/jHipster-Melbourne/">Melbourne JHipster meetup</a>. A big thanks to all you came along to hear me ramble for 15 minutes or so.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FEpqbX0Zi8hZaKw&amp;url=https%3A%2F%2Fwww.slideshare.net%2FGerardGigliotti%2Fputting-the-fun-into-functioning-cicd-with-jhipster&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fjhipstercicd-170621232537-thumbnail-4.jpg%3Fcb%3D1498087691&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/72a14332781cab26cdea3e881b6cf0f1/href">https://medium.com/media/72a14332781cab26cdea3e881b6cf0f1/href</a></iframe><p>The itsy bitsy source code is located <a href="https://github.com/ggotti/jhipster-ci-cd-talk">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l0hbykPdxUcJHQp065qCAw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae7adb19ea17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to JHipster]]></title>
            <link>https://medium.com/@g_gigliotti/intro-to-jhipster-f80e8283ef06?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f80e8283ef06</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[jhipster]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Wed, 03 May 2017 00:27:09 GMT</pubDate>
            <atom:updated>2017-05-03T04:04:21.995Z</atom:updated>
            <content:encoded><![CDATA[<h3>My first look at JHipster</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jznFZXW3tXjNJRjYpknPpg.png" /></figure><p>So I’ve just recently switched jobs, and one of the most interesting aspects of my new employer, <a href="https://www.ippon.tech/">Ippon</a>, is that they develop <a href="https://jhipster.github.io/">JHipster</a>. One of my first tasks was to familiarise myself with the framework, what it is, how to use it, and how to deploy it, and boy was I in for an adventure. On first glance it looks like a standard Yeoman based scaffolder for Java applications. You answer some questions in the CLI, you hit enter, and boom, out comes a fully formed Spring-Boot Java application. However the more I looked into it, the more I started to enjoy all the included goodies.</p><h3>Features</h3><h4>Microservices</h4><p>Instead of just generating Java Applications, JHipster has an entire microservice approach for deploying applications. People talk about microservices as a nebulous cure to all technological woes, but the reality can be quite complex and difficult if not properly managed. JHipster presents a vision of how to build and deploy a microservices solution, based on Spring Cloud and Netflix OSS. It might not align to everybody’s vision, but it’s a solid, production-ready foundation. In its most basic configuration, there are three main components to the JHipster microservice stack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*ovusz6rmoRIMjPU_hnixRA.png" /></figure><ul><li>Gateway: The naming of this component confuddled me initially, but it’s effectively an API Gateway Server and a static file-server for your SPA.</li><li>Microservices: The Java based microservice heart. Can be deployed in a variety of configurations, including databases and the like.</li><li>Service Discovery: Method for services to discover one another, and share configuration details. There was initially a JHipster developed JHipster Registry, but Consul can now be used in place of that.</li></ul><p><em>Note: There is also the option for an authorisation server, but that’s a discussion for another time.</em></p><h4>Entity Creation</h4><p>JHipster has an inbuilt UML like language which allows you to model relationships between entities. I’ve struggled with these kinds of tools in the past (I’m looking at you Rational Software Architect), but this one is pretty intuitive. It generates helpful boiler code not just at the entity level, but also full CRUD level endpoints. It also generates sensible Java code which won’t make you vomit. There is an online tool called <a href="https://jhipster.github.io/jdl-studio/">JDL Studio</a>, which allows you to model your entities. You then then feed the generated file into the entity sub generator, and out comes all the entities beans, Liquibase scripts, endpoints and tests you could ever dream of.</p><h4>Docker</h4><p>Docker is used for spinning up dependencies, and can be used to package your application. Docker make everything better <em>*exclusions apply</em>.</p><h4>Testing</h4><p>Out of the box it contains options for a bunch of testing frameworks, on both the Java and JavaScript side of the fence. Tools like Protractor are available out of the box with PhantomJS. I’d probably swap that out for a Chrome based Docker image with a Remote Web Driver until headless Chrome is available.</p><h4>CI Generation</h4><p>Need to add a pipeline to Gitlab? Done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WbtOwgK08xoSqfZkjsFcFA.png" /></figure><h4>Deployment</h4><p>Out of the box it’s trivial to run a JHipster application through docker-compose. Everything is there with a nice little bow on it. If you want to run something in production, there are a bunch of deployment options in that space. Due to my pathological love of containers, I gave the <a href="https://jhipster.github.io/rancher/https://jhipster.github.io/rancher/">Rancher</a> option a go. Due to its need to have access to a Docker Registry, it’s not quite as straightforward as some of the other interactions, but it does work as it says on the box. I ended up using Amazon’s <a href="https://aws.amazon.com/ecr/">Container Registry</a>, which worked after following <a href="http://rancher.com/using-amazon-container-registry-service/">this</a>.</p><h3>Where to use JHipster?</h3><p>The obvious starting place is the microservice generator. It’s a quick and relatively painless way of generating Java microservices. I’ve worked for a number of organisations which have developed similar, but not nearly as feature rich tools internally, and it’s a great way of reducing all that Sprint 0 project setup malarchy. I mean who doesn’t like wiring up Spring Contexts?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQzsGz4DahaRMcSBKmBw4A.png" /><figcaption>Rancher UI with JHipster Deployed</figcaption></figure><p>The gateway component is an interesting concept, but certainly for the customers I’ve worked with, a harder sell. They’ve spent a number of years investing in monolithic API gateways, and there would certainly be a reluctance to move away from that towards a more feature-centric API and application approach. Saying that, the ridginessness of the monolithic API gateway and the constraints it can put on innovating front end applications may foster a willingness to push gateway functionality back into application teams. This would be where the JHipster Gateway would really shine, particularly for JVM centric organisations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f80e8283ef06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda, How to Tape a Bunch of Cats Together]]></title>
            <link>https://medium.com/@g_gigliotti/aws-lambda-how-to-tape-a-bunch-of-cats-together-a92ba544fdf7?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a92ba544fdf7</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[melbourne]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[enterprise-software]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Thu, 06 Oct 2016 05:51:00 GMT</pubDate>
            <atom:updated>2016-10-07T01:40:52.370Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KU_sEwSKy7rJh4w4rM6I5w.jpeg" /><figcaption>AWS Architecture &amp; Developer Day, Melbourne with <a href="https://twitter.com/Werner">Werner Vogels</a></figcaption></figure><p>I was lucky enough to attend an <a href="https://aws.amazon.com/events/aws-architect-dev-day/">AWS Architect and Developer Day</a> in Melbourne recently, and as you’d expect, Lambda was an underlying theme. I didn’t attend a single presentation in the developer track that wasn’t plugging Lambda in one form or another. Lambda for micro-services, Lambda for Alexa, Lambda as a database event trigger, Lambda for transactions, Lambda for Lambda. Lambda. Lambda. λ.</p><p>I ❤️ Lambda. I think it’s an excellent tool in the ever increasing bag of tricks that is AWS, but I’m a bit hesitant when Amazon talks about it as the golden hammer which is going to fix all your problems. For starters, you need some rigor around how you develop and deploy your functions, particularly in large development teams. For example, the multi-stage functionality offered by the API Gateway are great, but no enterprise customer is going to allow you to run a “DEV, TEST and PROD” environments in a single AWS account. Never going to happen. Ever. And nor should it. Separating environments (or stages) across multiple AWS accounts, allows for separation of responsibilities that large organisations love, and are generally required to have. So how should we look at using Lambda in a large company?</p><h3>Developers get their own AWS credentials, in a <a href="http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html">Linked Account</a></h3><p>To use Lambda, Developers need AWS credentials to deploy functions, hook in event triggers and explore the various managed-services that AWS has to offer. If your company is using AWS, and each one of your backend developers does not have access to an AWS account, you are doing it wrong. That’s not to say that it’s just a developer free-for all, where every man and his dog can spin up new P2 instances on a whim, but there needs to be sensible controls, and monitoring in-place to strike a balance. I’d recommend a set of IAM permissions to limit accounts initially to a subset of managed services, with an appropriate tagging system in place to identify resource ownership, and a fairly aggressive monitoring strategy to ensure costs don’t blow out, and developers aren’t spinning up bot-nets.</p><h3>Python &amp; NodeJS Only for API-Gateway Events</h3><p>I’ve mentioned this in a <a href="https://gerard.gigliotti.com.au/aws-lambda-bringing-java-back-e3c40b111a24">previous post</a>, but the performance of Java in Lambda is a non-starter if you’re wanting to use it behind the API-Gateway. Until AWS improves the performance of the cold-start mechanism for Java based Lambda functions (<a href="https://forums.aws.amazon.com/thread.jspa?threadID=199685&amp;start=25&amp;tstart=0">see here</a>), it’s unworkably slow. You can happily use Java for non-time sensitive operations, such a Dynamo DB triggers, but just don’t use it for API Gateway functions. If you’re thinking about writing another function to keep the container warm by triggering it every 5 minutes, back away from the keyboard, go get yourself a coffee, come back, and then spend that time you were going to use writing the trigger function to rewrite your code in NodeJS or Python. You’ll be much happier, everybody will be much happier.</p><h3>Lambda Function Migration</h3><p>The following diagram demonstrates an approach for migrating Lambda functions between environments. There could be multiple environments in a single AWS Account, such as with the Test AWS Account, or there could be a single environment, just like production. Why the multiple account approach? It separates concerns, and ensures that breaches or problems in lower accounts have no chance of affecting production. You don’t want to be in the scenario where somebody accidentally deploys a development version of a Lambda function into your production API Gateway stage, something that can easily occur if you’re using a single AWS Account with poorly configured IAM permissions. In this model, there are multiple stage-gates to ensure only verified changes make it to production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bmWvyuqaa3meqsRYRoBhMg.png" /><figcaption>Continues Integration/ Continuous Delivery (CI/CD) for Lambda Functions</figcaption></figure><p>CI/CD can sometimes be bandied about as a single term, but it’s two distinct practices, which you may wish to use two different tools to achieve. For the CD component A lot of enterprise customers will just use a bunch of Jenkins servers together, which can work, but generally adds a lot of maintenance overhead. Other tools, like <a href="http://www.spinnaker.io/">Spinnaker</a> or <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html">AWS CodePipeline</a> are generally a better fit. The above diagram has the pipeline tool being powered off an artefact deploy to S3, which is then deployed out to the various accounts and environments.</p><h3>Lambda for MVP</h3><p>The real reason to use Lambda, is that it’s fast to develop &amp; deploy. You can quickly write a small set of functions to prove out a hypothesis , and then deploy them to run in a production-ready configuration. You’re not worrying about infrastructure, you’re not worrying about scaling, you’re focusing on you business problem at hand. You can code, deploy and analyse faster than you’ve ever been able to before, which makes it perfect for Minimum Viable Products. Every company should is interested in the flexibility.</p><p>If you’re Lambda function is being executed too many times a month, and it’s no longer economical to run in the Lambda, then that’s a great problem to have, as your product is getting used. You can then start to look at moving off Lambda, onto more flexible infrastructure. I’ve worked on projects which sit on thousands of dollars worth of infrastructure a month, but are only called a few thousand times a day, which is just not economical. You won’t be running your internet banking infrastructure on Lambda, but you might want to run your fraud complaints system.</p><h3>Conclusion</h3><p>As I said, I ❤️ Lambda. I jump at any opportunity I get to use it. But large companies that are still skeptical of its magical powers are missing out on the opportunities to innovate just as quickly as that startup around the corner. It doesn’t need to be as footloose and fancy-free as Amazon makes it out to be, and you can still use it in a controlled and sensible way. If you’re an IT Architect, and you’re reading this, come to the dark side. The water is lovely.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a92ba544fdf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Enterprise JavaScript Conundrum]]></title>
            <link>https://medium.com/@g_gigliotti/the-enterprise-javascript-conundrum-67fe7e2d2f13?source=rss-ac7c4737975b------2</link>
            <guid isPermaLink="false">https://medium.com/p/67fe7e2d2f13</guid>
            <category><![CDATA[consulting]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webpack]]></category>
            <dc:creator><![CDATA[Gerard Gigliotti]]></dc:creator>
            <pubDate>Tue, 26 Apr 2016 22:26:11 GMT</pubDate>
            <atom:updated>2016-04-26T22:26:11.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*AfZk_o4iwmZ_IlJfmT6RRQ.png" /></figure><p>I’m a full stack developer in the way that McDonalds is a breakfast restaurant; yes, they serve breakfast, but only really from 5am to 10:30am. I only get into the nitty gritty of the frontend when I absolutely have to, and it’s certainly not a place that I generally spend a lot of time. Saying that, it’s important to keep up with what’s out there, at least from an awareness perspective. The frontend darlings at the moment are clearly Angular (particularly in the Melbourne market), and React. I’ve worked with Angular (1.3) previously, but thought it was time to see what React was about, as there’s a lot of talk about it around the office water cooler. It became a rather interesting adventure down the rabbit hole…</p><p>First up, the tooling around JavaScript is changing at a neck-snapping speed. If we look at Babel’s <a href="https://babeljs.io/docs/setup/#installation">installation instructions </a>(more on that later), there are 30 configuration options. Kudos to the Babel team for supporting such an impressive plethora of tools, but it makes selecting an “optimal” configuration challenging. Then there are the tools themselves. Tools such as Grunt which were du jour a couple of years ago have been relegated to almost a pariah status amongst some of the new libraries. If you’re not starting with Webpack (maybe with a hint of Gulp), then you’re not starting on the right foot. Webpack itself has a fairly steep learning curve, but once you’ve got it setup correctly you wonder why you ever lived without it. The automatic refresh capabilities with the <a href="http://webpack.github.io/docs/webpack-dev-server.html">inbuilt dev-server</a> are super helpful. Saying that, it doesn’t “just work” out of the box, and you still need to tinker around with it before it comes to life.</p><p>To use the latest version of <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-arrow-function-definitions">JavaScript</a>, ES2015(ES6), you really need to use a transpiler like Babel to convert the code down into something more universally implemented across the various browsers + node. If for example you want to use the new <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions)">arrow function</a> it doesn’t work on Mobile Safari, which is not going to get you many friends on mobile.</p><p>It’s a pretty exciting time to be a JavaScript developer, but I’m concerned that the pace of innovation isn’t compatible with the approach taken by large enterprise customers when it comes to maintaining their websites/applications. Companies in Australia might be shifting their development practices to being more agile-oriented, but their approach to projects and code maintenance is still very much stuck in the waterfall. You might work for <em>n</em> sprints to deliver a new application, where you’ve used something like Webpack, and React, but once it’s delivered it’s then handed off to a Business As Usual (BAU) team which doesn’t necessarily have the funding to continually update and maintain the codebase. I’ve worked on applications during the last year that will be in one form or another still being used by their respective clients for the next five years. What happens if they need to add some functionality in five years time? Will they still be able to download and use the Webpack tooling with the required dependencies?</p><p>The solution is understandably to change the way codebases are developed, maintained and funded within companies, but it’s hard to encourage these practices without some kind of “crises” to facilitate the discussion. I think it’s about curtailing over excited developers to a certain set of approved tools, and then making sure new versions or approaches are rolled out across every living application. I was working with a client last year where they were trying to run multiple, older versions of Angular applications on the same page. These problems are a development nightmare and ultimately end up in sub-standard user experiences. A trickle upgrade approach needs to be mandated for all enterprise projects, especially when dealing with consumer facing JavaScript projects. It might not be as exciting now, but you’ll be thankful when you’re getting called up in five years to update your business critical Angular 1.5 app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67fe7e2d2f13" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>