Nodejs Container Restart Policy

September 21, 2020  -   2 mins read time -   360 words -  garrardkitchen

nodejs, cluster, docker, docker-compose, resilience

If by accident to deploy a solution using the Node.js Cluster API and do not fork exited processes then the following docker-compose restart_policy will not help you: deploy: restart_policy: condition: on-failure If you’re using the Cluster API to schedule tasks across your processes, and all forked processes die, then the docker engine will just assume you’ve gracefully shutdown. Take this code for example, you will see that it doesn’t fork another process and therefore, at some point it will no longer process any anything: ...

How to run the Apache Ignite Agent with an Ignite.NET Core Server Node

July 28, 2020  -   2 mins read time -   384 words -  garrardkitchen

apache ignite, ignite, gridgain, data grid, Ignite.NET

I’ve recently been researching into Apache Ignite. Apache Ignite is an in-memory, memory-centric, distributed database, caching and processing platform for transactional, analytical, and streaming workloads. So why the post? Well, with using .NET Core, I have run into one or two challenges that I have had to work through. One of which involves the Agent. I feel it is important to share with you how I get beyond this issue. It may save you a lot of time if you’re an Apache Ignite noob like me. ...

Terraform Get Values

July 23, 2020  -   2 mins read time -   322 words -  garrardkitchen


With not wanting to have hard coded values pushed to a project’s code repository, and an antiquated way to derive Azure Service Principal credentials, I set about exploring ways on accomplishing this with this in mind using Terraform. Attempt 1 Here ins my first attempt, I load all permutations into map variables. I use an environment variable as an indexer to the appropriate map value: provider "azurerm" { version = "=2. ...

Digital Certificates

June 8, 2020  -   9 mins read time -   1862 words -  garrardkitchen

ssl, openssl, digital certificate, digital signature, key pairs, keys, signing, hash, encryption, sso

I’ve been wanting to put some notes down on digital certificates, signing and JWT for some time now. I find there are plenty of confusing terms involved in this area, plus a few nuances that have added to my personal confusion. I feel it now important to document these before I forget and move on [to another project]. So, what’s triggered this post? Well, one of many tasks I’m involved in [juggling] evolves SSO (single sign on). ...

Unit testing and mocking fs.ReadFileSync

May 28, 2020  -   3 mins read time -   502 words -  garrardkitchen

jest, unit testing, twilio, rabbitmq, twilio taskrouter, mssql, sync, twilio sync, taskrouter

I’d just ran npm run test in a newly created package I’d added to a monorepo (lerna) I’d created for a project I was working on that integrates with Twilio Sync, RabbitMQ, Twilio TaskRouter and MSSQL, and I go this: *******************************consumers\packages\eda [CRMBROK-233 +0 ~2 -0 !]> npm run test > @cf247/eda@1.0.2 test *******************************consumers\packages\eda > jest FAIL __tests__/eda.test.js ‚óŹ Test suite failed to run ENOENT: no such file or directory, open '. ...

Kubernetes on Windows

April 6, 2020  -   9 mins read time -   1735 words -  garrardkitchen

blogging, kubernetes, setup, windows, containers, pods, services, azure, aws, gcp

This post is a reminder to me of what needs to be installed in order for a pod, created from a local image, that is to be served up via a kubernetes cluster, to be run from your local development environment. What is Kubernetes and why is it so important? “Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. ...

Modern-ish Javascript

April 5, 2020  -   4 mins read time -   715 words -  garrardkitchen

javascript, destructuring, arrow functions, typescript, class, babel, decorator

This post includes a few notes on ECMA language features that I like as well as some info on memory leaking. I have no doubt that it will read disjointed; I started this eons ago and only now have I decided to publish it. A simple reminder of what Node.js is …it is a set of APIs wrapped around the V8 Engine (written in c++) and is a high-performance JavaScript and WebAssembly engine. ...

How do I mentor?

March 26, 2020  -   7 mins read time -   1473 words -  garrardkitchen

Hugo, blogging, mentoring, The Manager's Path, Heisenberg Effect

I have written this post to document my experiences of mentoring. I have mentored front-end engineers, back-end engineers and UX designers. I have had the pleasure of helping others as well as learning one of two things about myself along this journey too. If ever you get the opportunity to be a mentor, I recommend you jump at the opportunity. It is a self-rewarding experience. So, what is mentoring?… The definition of Mentoring is the act of advising or training (someone, especially a younger colleague). ...

Good Engineering - Principles

March 1, 2020  -   24 mins read time -   4944 words -  garrardkitchen

Hugo, blogging, good engineering, principles

I have written this post as a method to document what I see as the basics, foundations if you will, for good engineering. Undoubtedly if you are a seasoned engineer, you will recognised all of these principles, less so, if you’re just starting out. Most Engineers are fully versed in the foundations of writing quality, efficient, succinct and testable code. As a Principal Engineer, one of my responsibilities is to ensure that these (1) foundations are recognised by the engineers and (2) are adhered to by all engineers. ...