Introduction

I recently wrapped up the launch of www.artemisfunds.com for Artemis while at digital agency ORM. Artemis are a great brand, who really stand apart from the crown in the investment banking sector due to their use of bright illustrations and strong brand aesthetics.

Overview

Client side caching greatly improve single page application performance, even if only caching for a few minutes.

Not always clear how to implement caching fur RxJS observable results in an abstract, reusable way

Demonstrates how to implement a local storage and cache service that is RxJS fluent to allow chaining with Angular Http library

When used with Service Workers, it can help you achieve offline capable applications

Introduction

A common need in a production ready single page web applications is browser caching of API responses in order to speed up page load time and reduce overall API “chattiness”. When implemented successfully and used in conjunction with Service Workers, you can achieve offline capable web apps (Service Workers can cache APIs too, but are typically more useful for resource caching such as HTML, Images, JS, CSS, etc).

The need for client side caching is especially true for application that start from entirely stateless hosting (i.e. no server side, such as when hosting from an AWS S3 bucket), since all dynamic data has to be fetched on page load, even if the page was refreshed seconds ago. Caching data in the browser, even for a few minutes, can vastly improve the user experience.

Caching API responses is nothing new, but since Angular 2+ uses RxJS for its Http API, its not clear how to achieve client caching in an abstract way that can be reused across different types of requests.

Overview

Enables you to bring your own Http library such as Angular Http, HTML5 fetch, jQuery etc while still using API Gateway

Demonstrates how to use sub libraries of the AWS SDK to generate the required Authorization header

Examples are for browser based applications or NodeJS, both using Javascript

Introduction

When working within Amazon Web Services (AWS), the Identity and Access Management (IAM) controls everything. Configuring IAM effectively is critical to achieving a secure infrastructure configuration, but web application occasionally trip up when attempting to make IAM authenticated requests to an API Endpoint; its not always clear how exactly to sign a request. Its tempting to simply use API Keys (AKA Usage Plans), implement a custom solution or just leave the API public.