NATS.io Queue Group REST API w/ Sanic and Python3+

Pub/Sub, Request-Reply, Load Balancing ... Oh My... Estimated Reading Time: 20 minutesDifficulty: Intermediate This post is purely illustrative and educational. It showcases a working version of a Queue Group + Request-Reply pattern implementation in Python3+ with Nats.io and Sanic. This code is not to be used in production as is, and should be modified and …

Creation of ION-Query for MeshAlpha.io (Pt. 1)

All things Rule! Estimated Reading Time: 10 minutesDifficulty: Novice This post chronicles the journey of creating an Open Source TypeScript Rule Engine from conception to release. While the code will be open source (MIT License), it is asked that this or other articles are referenced, and attributed to Kamau Washington if a strategy or code …

ISO 6346 – Shipping Container Codes

I often spend time researching and implementing algorithms in multiple languages as a way to keep my programming skillset sharp, learn a new language and its syntactical sugar, and to have the algorithms at my disposal when and if I need them. ISO 6346 is an international standard that describes the identification of a shipping container. The standard is maintained by the BIC (International Container Bureau) and covers the serial number, owner, country code, and size of any given shipping container.

AWS CDK Static Web + API Multiple Branches in One Account

Namespace based deployment Estimated Reading Time: 20 minutesDifficulty: Intermediate This post is purely illustrative and is to be considered a deployment option that may suit an organization's CICD workflow and feedback loop for Website and API resource deployment. With one development team working on a single project in multiple branches, it may be advantageous to …

Using AWS CDK with dotenv -r and TypeScript

Note, I prefer the node --require option of loading .env variables over importing or requiring in application code. TLDR; install dotenv as a development dependency in the cdk.json in the root of the project directory add the following in bold : { "app": "npx ts-node -r dotenv/config --prefer-ts-exts bin/<stack-name>.ts" } When developing via AWS CDK it is easy to set environment …

AWS OpenSearch Search Request Logging

There may be rules and regulations for logging in your production environment, please consult with your web engineering, or infrastructure equivalent prior to logging in this fashion to prevent unwanted charges and or side-effects. This one took some time to figure out, and the AWS documentation Monitoring audit logs in Amazon OpenSearch Service did not point directly …

Preload dotenv, don’t require it

Oh my dotenv! If you work with NodeJS at some point you will use and implement dotenv. It loads environment variables from a .env file (configurable name btw), into process.env, following the 12 Factor App methodology of separating environment from code. Pure awesomeness, and makes development configuration loading a breeze mimicking your higher environments.

Avoid using ts-node when performance testing

Often times when performance testing, or comparing resource utilization (ex NodeJS vs Java), I have seen developers load testing, performance testing, and even one-off testing, with ts-node. ts-node is an awesome piece of kit, but it is for rapid prototyping, watching, and development only, it is not a production runtime.