Author Archives: Derek Carr (zaphinath)

How to Set Master Nodes in Elasticsearch

Problem In order to horizontally scale an elasticsearch cluster in the cloud we need to make sure we don’t remove the master nodes if we scale the cluster down during times of less usage. We do this in Amazon Web Services by having two groups of compute instances. The first block is equal to the […]

Automatically Terraform Elasticsearch Cluster in AWS

Terraform Elasticsearch in Amazon Web Services The elasticsearch cluster needs to know the seed ip addresses, which makes it a little bit tricker to do in terraform. We actually need to do have two separate ec2 declarations. The second batch will grab the first batches ip addresses. The userdata automatically will install and set up […]

Free Cellphone For Life

Over the last few months I have been working on understanding what it means to invest. My ultimate goal is to be able to retire in about 10 years or so (right now I am 30). To break this goal into bite sized chunks I have decided to try and replace my monthly reoccurring bills […]

FirstOrDefault C# Lambda to Java 8 Lambda

Description While converting c# code to java there are several lambdas that c# has that were a little difficult to find a port to java. One of these was C Sharp’s FirstOrDefault lambda expression. Java has an equivalent stream. We can use the findFirst and if it doesn’t find anything then we can return a […]

C Sharp delegate function in Java

Porting from C# to Java – The Delegate The delegate function is kind of cool in C# land. It allows you to pass a bunch of functions as a parameter. Java has a handful of different ways you can do this. I personally like just passing an object that implements Runnable and then have an […]

Perfect WordPress Development Environment

WordPress Development Problem Anybody who has developed for php applications knows it can be tricky to have  the right environmental setup to do development work. I love WordPress, but it is no exception, until now . . . I found the fastest way to have a development environment for WordPress that can be blown away […]

Spring Rest Endpoint Test With MockMVC + ApplicationEvent

Problem Addressed In a service oriented architecture, known as SOA, we have several microservices that get regularly deployed. The  strategy and various needs of deployment of such services has already been solved by applications like kubernetes. From a quality perspective there needs to be a high level test after any service is deployed or any […]

Finally Can Sleep on a Noisy Street

Description My house is between a busy highway and a railroad. Living by a railroad doesn’t really bother me, but we have a street crossing really close to my house and by law railroads are required to blow their whistle for the international morse code “Q”,  which comes from the times when a queen would […]

How To Build An API

What is an API API stands for application program interface. In a nutshell an API is a way for external applications to access information and queries from your program. Twitter for example has a a REST API that allows you to access all types of data from twitter. REST API’s are among the most common types of […]

API Endpoint Testing With Groovy & Spock

There are several ways of making http requests through java and groovy. You can use anything from Netflix’s feign client to standard http url connection classes built into java. I have used many different classes/frameworks for testing system integrations. My favorite choice by far is to use either groovy’s http builder or another class that extends […]