My personal webspace

A webspace for innovation, free thinking, and procrastination

Google App Engine Made Easy

Posted by chathaway on March 28, 2020, 7:39 a.m.

Google App Engine made easy

Turns out, GAE can run a Docker container, which makes life super easy. Some basic rules:

  • EXPOSE 8080 # GAE will only talk to port TCP/8080 to serve web traffic
  • All build files (i.e., everything in the folder app.yaml is in) gets uploaded and built

So its very limited in what it can do, but basically with the structure

├── app.yaml
└── Dockerfile

You can easily make an app. You might need to add persistence (i.e., databases) through their service, but you could at least bring small apps to play with for very ...


Paxos Algorithm, in English

Posted by chathaway on Jan. 14, 2020, 7:20 a.m.

The Paxos Algorithm

The Paxos algorithm is used to handle decision making in a decentralized way, which is tolerant of faults and other such problems. It is usually applied to network programming and distributed systems.

(For background, see the Background section at the end of this post.)


The thing that tripped me up most was understanding how to apply this algorithm to an actual problem.

Part of the difficulty is that it is usually thought about as a single 'round' in a larger machination; that is, when people describe the Paxos algorithm, they describe the algorithm that is used ...


Chef Client on Ubuntu ARM (arm64)

Posted by chathaway on Jan. 3, 2019, 6:39 p.m.

We use some arm boxes at work for testing, and do our provisioning with Chef. Chef bootstrap doesn't work because ARM is not an official supported platform for Chef.

To work around this, I installed a few packages:

apt install ruby
apt build-dep ruby-yajl

Then Installed Chef as a Gem:

sudo gem install chef

With this done, I could use knife boostrap as normal :).


Rust crate for OpenSSL on Arch Linux

Posted by chathaway on Dec. 24, 2018, 10:44 p.m.

Attempting to build a Rust package on Arch, I ran into a problem that the version of the openssl crate depended on by one of the dependencies didn't correctly detect the latest OpenSSL, 1.1.1. To solve this, I ensure a previous version (OpenSSL 1.0) was installed, and setup my environment with:

# Only needed on Arch to use an older openssl version

export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig/
export OPENSSL_LIB_DIR=/usr/lib/openssl-1.0
export OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0

And then things built :).

The error message the started me on this:

error: failed ...


FindYOTTADB.cmake Example

Posted by chathaway on Aug. 22, 2018, 7:58 p.m.

To use libraries with CMake, its much easier if there is a package for it. Below is a script which can be used to locate YottaDB using CMake, and make it much easier to build with.

In your CMakeLists.txt, add:

find_package(YOTTADB REQUIRED)

In cmake/FindYOTTADB.cmake:

# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means ...


Using Eclipse with CMake Projects

Posted by chathaway on Aug. 9, 2018, 3:14 p.m.

For a long time, I was using the cmake CDT generator to make cmake projects. I started getting very strange errors in the most recent version of Eclipse, and stumbled upon this thread which explained the CDT generator was super old.

To do this with a modern Eclipse version, you basically want to:

  1. File -> New -> New C/C++ Project
  2. Select "Empty or Existing CMake Project"
  3. Uncheck "Use default location", and navigate to your project

Then things should magically work.

Pictures for those who need them:

Select New C/C++ Project



Performance Testing: Threads vs. Processes

Posted by chathaway on April 22, 2018, 9:30 p.m.

Recently, I spotted a line in Distributed Systems: Principles and Paradigms that caught my interest because it ran counter to my understanding of thread performance on a Linux system.

Instead of using processes, an application can also be constructed such that different parts are executed by separate threads. Communication between those parts is entirely dealt with by using shared data. Thread switching can sometimes be done entirely in user space, although in other implementations, the kernel is aware of threads and schedules them. The effect can be a dramatic improvement in performance. (Tanenbaum, A. S., & Van Steen, M. (2007 ...


Doing Elixir Development in Windows using Docker

Posted by chathaway on April 12, 2018, 2:23 a.m.

This guide documents the steps I took to setup my Elixir/Phoenix/Docker environment on my Windows 10 machine. It might be worth nothing that I'm running Windows 10 Educational, which includes the Hyper-V supervisor; this is required for Docker.

Install Docker

Rather than repeat stuff here: go search Google, and follow the official guide.

This will probably require a restart.

Setup a Dockerfile and docker-compose file

To get started, we need a Dockerfile to build the web host. In addition to elixir, we will need NodeJS and some extras. This should do it:

FROM elixir
ADD . /code


dex auto start search list

Posted by chathaway on March 29, 2018, 5:39 p.m.

This doesn't seem to be documented anywhere, but just a quick tadbit; the dex autostart program ( looks in:

  • $XDG_CONFIG_HOME/autostart or $HOME/.config/autostart
  • for dir in $XDG_CONFIG_DIRS; $dir/autostart or /etc/xdg/autostart/

For things to run. You can look for yourself at github link


Banner Image © 2017 Ranjani Hathaway | Content © 2017 Charles Hathaway