Introduction

This started as a summer side-project — build an online version of the popular Italian card game Scopa which I called the Scoparella project. Most importantly it was a chance to get hands-on with some technologies I’d been eager to explore in more depth, in particular Azure Kubernetes Service (AKS) and Loopback, a framework for building microservices with Typescript.

Image for post
Image for post
Figure 1: Components used for this project — AKS, SQL Server and Key Vault hosted in Azure

Scopa is a traditional Italian card game played with a 40-card deck of Italian cards (also playable with the more familiar 52-deck cards by removing the 8, 9 and 10s). The rules are fairly simple, and can be easily found on Google so I won’t digress here. To facilitate this I wrote an engine for the game in Typescript. …


Image for post
Image for post

Introduction

In my day job I’m an enterprise developer, in the evenings I’m studying for a degree in astronomy and physics with the OU, for which I’m in the final year. I recently worked with a team of 7 others on a project to produce a characteristic spectrum for active galaxies (also called quasars, or QSOs for ‘quasi-stellar objects’); these are galaxies at high redshifts (i.e. they are very old) with compact, energetic point like nuclei known as active galactic nuclei (AGN).

Active galaxies are interesting because they allow astronomers to essentially look back in time, sometimes to just a billion or so years after the big bang. There is strong evidence that the quasar luminosity function is variable-there are fewer quasars as redshift becomes smaller, implying that quasars are a stage of galactic evolution that many galaxies-including our own Milky Way-may have gone through in a bygone epoch. …


Image for post
Image for post

Introduction

In this article I’m going to look at scaffolding up a very basic 3-page React website, using Webpack for bundling. This exercise will barely scratch the surface of what React and Webpack can do, but will serve to show how to get a project up and running that can be built and deployed as part of a CI/CD pipeline. Let’s imagine we’re scaffolding a website for a big tech company (Figure 1). At this stage we just want to get a website up and have some navigation.


Image for post
Image for post

Overview

Microservice architectures are fast becoming the norm in large organisations and enterprises; microservices usually align more closely with the business domain than the sprawl of spaghetti that of characterises monoliths. They come with other benefits such as greater scalability and maintainability. Microservices, however, have some caveats. One in particular is that some operations may need to propagate data between several other microservices to fulfil their purpose, and whereas a monolith may have executed calls in-process (i.e. on the same machine), microservices generally do so with RESTful calls over HTTP, which introduces latency and adds load to network infrastructure when executing calls. Developers building microservice systems sometimes fall victim to the fallacies of distributed computing. …


Overview

AWS Lambda functions exist to abstract away low-level infrastructure requirements when you want to build simple services or tasks — “write code without worrying about servers”. Lambda come with several caveats, one of which is a timeout of 15 minutes. This can often become problematic when you want to iterate over an unbounded set of resources. This is where step functions can come into play.

Step functions allow you to orchestrate invocations of lambda functions and maintain state throughout the lifetime of an execution. They are useful if you want to leverage the benefits of the serverless paradigm for executing long-running jobs such as extract-transform-load (ETL) without managing VMs or containers, or want to take a part of a tightly-coupled monolith and port it to lambda functions. …


Introduction

This document will give a very simple hands-on example of how you can create a very simple Lambda function in Amazon’s AWS, that runs on a schedule, pulls some data down from an external API, and stores it in an S3 bucket.

AWS Lambda

AWS Lambda lets you run code without provisioning servers; more specifically, it is possible to write a function in a language such as JavaScript, upload it, and trigger the function when certain predefined events happen. A few examples of possible triggers are:

  • A schedule that causes the function to execute, for example a trigger that invokes the lambda function once a day. …


Image for post
Image for post

Introduction

Organisations large and small are increasingly moving their infrastructure to the cloud. The cloud brings many benefits; the provisioning of infrastructure can now be done in minutes, where previously it might have taken days or weeks making it easier to “spin up” new systems and scale them vertically and horizontally. Costs are dramatically reduced, security, disaster recovery capabilities, and durability are greatly improved. The abstractions of physical hardware and the growing popularity of “infrastructure as code” has led to the rise of the so-called “Devops” movement.

In this document I’ll show how easy it is to create a Virtual Private Cloud (VPC) and setup the infrastructure to support a basic two-tier CRUD (create-read-update-delete) application in Amazon Web Services (AWS), currently the most popular cloud-provider on the market. For small businesses “lifting and shifing” systems from on-prem[ise] to the cloud should be a fairly straightforward task. …


Introduction

Setting up and configuring databases on your local machine is time-consuming. It also runs the risk of “it works on my machine” problems when systems are moved from local development environments into testing and production. These problems are not unique to databases, and are some of the primary reasons behind the rise of container platforms such as Docker.

In this article I’ll show how you can easily spin up and tear down databases in just a few commands using Docker, which can be extremely useful for locally running applications that have a database back-end.

Containers

Containers can be thought of as a level of abstraction above Virtual Machines. Containers share the underlying operating system, but retain isolation from other containers on the same machine. The primary advantages over VMs are that they are faster to spin up, and can greatly reduce total cost of ownership (TCO) due to lower resource usage. Most organisations, large and small, are now utilising containers in some capacity. …


Image for post
Image for post

Introduction

This article is a followup to my introduction to Stratis smart contract development a couple of weeks back. In that post I focused more on the end-to-end process of getting a very basic “hello world” smart contract onto the Stratis TestNet. In this article I’m going to look a writing something a little less trivial, and focus more on the coding aspects.

Getting Started

I’m going to be building this contract in Visual Studio 2017, however other text editors or IDEs will work fine if that’s how you prefer to develop. The example was done on a Mac, but should work on Windows and Linux too. While I’ve tried to include as much of the code as possible, I’ve tried to break it up into chunks so I can explain what each bit is doing. If I’ve missed something important please let me know and I can review it. …


Image for post
Image for post

If you’ve been swatting up on blockchain for any appreciable amount of time, you’ve probably come across Merkle trees. Merkle trees are fundamental to blockchain technology and therefore a basic understanding of how they work is important to anyone looking to expand their knowledge of this space. In this article I’ll share my understanding of the concepts.

Hashing

Before we dive in and look at Merkle trees, you will first need to understand what a hash value (or message digest) is. If you already know this feel free to skip this section. While a full explanation is beyond the scope of this article, at a basic level, a hashing function takes a piece of text as an input, scrambles it using a mathematical algorithm, and produces a result known as a hash value. Given the same input the result will be the same. While hashing functions have many applications, in the context of this article they are useful because two different inputs are highly unlikely to produce the same output. …

GarryPas

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store