Tweaking Emacs for Ruby Development in 2023
Preamble Since I started a new job in April, I’ve been spending the majority of my time with legacy Ruby code for the first time since 2017 (I’d been mainly working on Elixir and Typescript codebases between then and now). Before my start-date at the new job, I spent some time setting up a basic Emacs configuration for Ruby. I’d made a good start, but with all those unknown unknowns swimming around, I was only able to make vague assumptions about what I needed.
Configuring DNS for Kubernetes Development
In the intervening 3 years between my last blog and this one, I’ve been on quite the adventure, partly involving setting up multiple Kubernetes clusters. While I’m absolutely sold on the ability of Kubernetes to slash server budgets, to drastically improve deployment compared with much of the home-grown CI systems out there (I am also guilty of this sin), and to provide a coherent configuration system that’s free of vendor lock-in poison; in my new occupation I’m focussed on improving the developer onboarding experience.
OpenSSL and Elixir
If you’re using the latest OpenSSL package from Homebrew, you might come across an error similar to this one from time to time: ==> fast_tls (compile) Compiled src/fast_tls_app.erl Compiled src/p1_sha.erl Compiled src/fast_tls_sup.erl Compiled src/fast_tls.erl Compiling c_src/fast_tls_drv.c c_src/fast_tls_drv.c:21:10: fatal error: 'openssl/err.h' file not found #include <openssl/err.h> ^ 1 error generated. ERROR: compile failed while processing /Users/john/Public/fap/api/api-2.1/deps/fast_tls: rebar_abort ==> api \* (Mix) Could not compile dependency :fast_tls, "/Users/john/.asdf/installs/elixir/1.2.3/.mix/rebar compile skip_deps=true deps_dir="/Users/john/Public/fap/api/api-2.1/_build/dev/lib"" command failed.
Elixir/Erlang and autoscaled EC2 servers - how to make them best buddies
At Find a Player, we’ve been trying to figure out how we want to cluster our Elixir servers - so that they can share state between each other - recently. Because we come from ruby (ie, not a high-availability background), when we want to discover other machines in a network we’d traditionally use something like Consul - of which I wrote a ruby library called Diplomat (which admittedly needs some love).
Pull-based Deployment at Find a Player
Most startups care a lot about scalability. Find a player is no different. A lot of people have asked me how I went about designing Find a Player’s deployment system, so I thought I’d document it here at a high level. Background Before we embarked on this project, we were using ansible to handle push-based deployments to multiple servers. However, when we looked into using an autoscaler in AWS to handle traffic spikes, we realised that a push-based deployment no longer makes sense as it requires an external widget to run the deploy on a server if it is spawned.