Does your project need distributed Erlang?
You deployed your brand new Phoenix webserver installation, or a data processing pipeline using Broadway - or any other piece of infrastructure running on the Beam VM, and it’s all working just great. Global interpreter lock and threads corrupting each other’s memory are but a faint memory, api request latencies are nice and predictable, production bottlenecks are a breeze to identify and fix, what else could one want at this point?
Google Pubsub gRPC-based client
Google Pubsub supports both REST and gRPC endpoints, and the latter is clearly the winner in terms of performance. For instance, it takes about 1 ms to receive a REST message with the pubsub emulator on my laptop but I can get out 50 of them via the gRPC endpoint in the same single millisecond (using HTTP 2 streaming over the same TCP connection of course so not a completely fair comparison but at the same time it’s not like I am forcing the REST endpoint to stick with HTTP 1.
Server-Sent Events (SSE) with Elixir
Server-Sent Events is an efficient way to stream data from a web server to client, supported by all modern browsers. It is a great fit for many use cases where one-way communication is sufficient, and is much simpler and has less overhead than web sockets: any sort of status updates, streaming quotes etc. This post will show how to use SSE with Elixir-based Phoenix Web Server. Demo I will demo an app with a single web page streaming server’s current time.
How to deploy Elixir release to kubernetes, using Helm
Elixir has (or at least tended to have) reputation as a hard-to-deploy platform. The goal of this post is to show a way to quickly deploy an Elixir-based service to a kubernetes environment, using only Elixir releases, docker and helm. Use Case: add a phoenix server to existing kubernetes cluster Let’s say you already have a configured kubernetes cluster (I’ll be using Google Cloud in this example) and you want to add a web server to it - could be serving some api requests with JSON payloads, or just regular web content.