RSSAmplifier

Blog

Barney Parker

Recent content on Barney Parker

barneyparker.comRSS feed ↗22 posts

Latest posts

Organization Terraform State Buckets

Organization Terraform State Buckets Terraform requires a backend to store state files. These are crucial to allow Terraform to know how to map real-world resources to code definition. Over the years i’ve seen it done an awful lot of ways, and most of them tend to be less than ideal at some time or another. In this post i’ll share my preferred way of doing this and the rationale behind…

WiFi QR Codes

Backoff Simulator

Token Bucket Rate Limiter

Token Bucket Rate Limiter Standard Rate Limiting A common requirement for many APIs is to limit the number of requests that can be made per unit of time. This can be to prevent abuse, to ensure fair usage, to differentiate between different tiers of users, or to simply prevent overloading the system. Rate limiting in itself is a simple approach - - you set a limit of X requests per Y time period,…

Sunlight Lamp

Introduction Twice a year it happens. Daylight savings puts the time either one hour ahead, or one hour back. I have a stressfull next week trying to remember how to set the time on my sunlight alarm! I find it really hard to wake up in the dark. Many years ago my wife bought me a sunlight alarm and it changed my life! The problem is, i’ve long lost the instructions and it doesnt have…

Storage First Design

What is Storage First Design? Storage-first is a method of ensuring resilience and scalability in a system. Its a way to ensure a system never loses data, and can always recover from failure. It’s a way to make sure that your system can handle any amount of data, and give itself breathing room to scale up when needed. It sounds like a pretty basic idea, but its actually a really powerful way to…

Gamification to the Rescue

What is Gamification? Gamification is a method of improving by adding game-like elements to non-game contexts. It’s a way to make work more fun and engaging, and it can be a powerful tool for improving motivation and productivity. It sounds compeltely crazy, but it’s actually a really effective way to get people to do things they might not otherwise want to do. It’s all about tapping into our…

Laziness Engineering

What is Laziness Engineering? Lets face it - if you can avoid doing it, you would! Do what I hear you ask? well, anything really. More specifically I’m talking about building and running large-scale software systems. There are a lot of things that we do in software development that are just plain hard work, and if we can avoid doing them, then we should! The good news is that you dont have…

Telemetry, not Logs & Metrics

Whats wrong with Logs and Metrics? For decades we’ve worked iwht logs and metrics. Our software developers have spewed out random pieces of text - some useful, some not so useful, and we’ve collected that information. They handily categorized it into levels, i.e. informational, warnings, errors etc. At the same time our infra has spewed out numbers that ean something. usually things…

Priorities in System Design

Introduction Is any system there are competing proprities that need to be balanced, however not all proirities are created equal! As an example, you may need to nesure you;re using Brand colors in your UI, but that is clearly less important than ensuring you;re not leaking credit card data. The Priorities of any System Like the Asimov’s Three Laws of Robotics, there are certain priorities…

Random Notes on System Design

Introduction Over the years I have picked up various insights and best practices related to system design. This post is a collection of random notes that I find useful when thinking about designing scalable and maintainable systems. They’re not particularly organized, however they come up time and again in my mind when considering different aspects of system design. Working with teams can…

A Product Hierarchy of Need

Introduction Developing and running software systems is a complicated balancing act between keeping the lights on, satisfying various competing demands from the business and its customers, and staying ahead of the competition. Attempting to do incorporate all of these needs while also working out the “right” thing to do next is near impossible. The SRE approach prioritises operational…

React Build-less MVP

Going Build-less I don’t do a huge amount of front end work, but from time to time I do need to put together a small front-end. Front-end work is some of the most complicated tech work there is. Not only do you need to know HTML, CSS and JavaScript, but you need to know how to configure and use build tools, npm, frameworks, and handle a bunch of security things such as CORS, CSP, and a whole…

Import Maps to simplify Browser Based ESM

I mport maps let you use short names when importing packages in the browser rather than using script tags. I n order to mark a script as an import map, the script tag needs a type attribute with a value of importmap . T he contents should be an object with a single attribute of imports which is an object where the keys are the name you will use to refer to a package, and the value is the URL to…

Uploading File Trees to S3 with Terraform

Uploading a single file to S3 using Terraform is pretty simple, but sometimes you need to upload a whole folder. If you’re serving the files using S3 as a website, or through CloudFront you also need to make sure you set the correct mime types and eTags. Its actually a whole lot simpler than you might think! Single File Uploads A single file is easy enough to upload: resource…

Authenticate Users with Azure OIDC on AWS Application Load Balancers

Securing legacy applications which were deigned for internal use only has become a hot topic in these times of sudden remote working. There isn’t the time or money available to re-architect authentication, and its not always easy to provide remote accessibility to systems when the company doesn’t have the resources to implement it safely. Thankfully AWS Application Load Balancers…

Installing NPM Dependencies with Terraform

Terraform has the capability to create a zip file containing Function code, and for simpler functions that’s fine. For more complex functions it quickly becomes necessary to install dependencies to make avoid the need to write every line of code ourselves. The problem with Terraform is that it only wants to do things that have a Provider resource. npm install ing dependencies needs to be…

HTTP APIs with Simple Lambda Functions

API Gateway has always been somewhat of a beast to configure, and while its incredibly flexible its also far more hassle than most people want or need. Terraform was also completely the wrong tool for deploying these because of the sheer number of resources required and the need to deploy APIs to a stage just didn’t quite fit with the way Terraform works. The new HTTP APIs, whilst almost…

Deploying Lambda Functions with Terraform

Serverless architectures are built from a collection of Managed service wired together to create a specific service. This could be anything from a shopping cart to a full ETL solution. The advantage of building applications this way is that each of the component parts are fully managed by AWS. That means you (either the developer or company) don’t have to worry about them functioning, you…

About Barney Parker

Barney is pretty special :)

World Simplest HTML5 WYSIWYG Inline Editor

I am pretty new to web/JavaScript development, and often quickly reach for Google in order to find out how to do things. Recently I needed to add the ability to do some pretty basic in-page editing of content. I didn’t want to use iFrame’s, i didn’t want a hugely featured editor, literally some pretty basic tools to be able to edit content, bold, italic, h1, h2 and so on. After a…

(untitled)