Phoenix WebSockets Under a Microscope 🔬

This is a code-reading and exploration post about the WebSockets side of Phoenix. It builds upon some of the tracing techniques showcased in the previous post, to observe some of the internals of Phoenix. It also features some tricks I commonly employ to debug WebSocket related issues. The title and nature of this post are inspired by the marvellous book Ruby Under a Microscope written by Pat Shaughenessy. WebSockets The WebSocket Protocol enables two-way communication between a client running untrusted code in a controlled environment to a remote host that has opted-in to communications from that code »

Debugging & Tracing Elixir Applications

This post describes a few useful techniques to debug running Erlang / Elixir applications. It is meant to be a cheatsheet of things you can do to inspect and alter the state of an application without requiring the installation of packages. For any of the code snippets below, autoverse refers to my local hostname, which itself refers to one of my favourite science fiction novels, “Permutation City” by Greg Egan. »