lawik

lawik

Nerves Core Team

Injecting tracing the hot way

Let’s do Open Telemetry tracing.. by doing Erlang tracing.

And also hot code updates for special software delivery.

Most Liked

krasenyp

krasenyp

Besides giving hot code loading another chance, I’d like to remove the stigma around spawning processes. Web developers are scared to spawn processes and instead settle on suboptimal designs which could’ve been correct with one or two more processes.

Lucassifoni

Lucassifoni

Excellent post, thank you. I am fully for influential voices in the community re-giving a chance to hot code loading.

I’m considering if this is a decent approach to a plugin system for another system I’m working with where plugins might make some sense. And for pure Elixir code this seems perfectly reasonable.

I am using hot code loading in prod to load tenant-specific features that conform to behaviours, so, kind of a plugin system with its idiosyncratic spec. This allows me to have the plugins part of the codebase and monorepo, so they are fully tested by mix test with the rest and in CI. Just at release building time, this source folder (and the matching test folder) is rm -rf’d so they are not included the release.

This, combined with a bespoke script I called an “abstraction boundary checker” allows me to have a nice development experience while guaranteeing that app code never calls plugin code, and plugin code does not call other plugin code. Since the plugins are part of the codebase, an incompatible API change breaks them in dev and test.

When I published an article about that last year, I insisted that what enabled that was my “1 client = 1 instance” rule but I am now doing it in a multi-node cluster with multiple tenants, so my stance about isolation wasn’t a real constraint.

lawik

lawik

Nerves Core Team

Charmer.

I do love experimenting with hot code updates. And of course since I develop a lot with Nerves the iteration cycle is a bit slower if I do a full firmware build plus upload so I am constantly pasting modules into iex.

I still want to do the art project of starting a project that is some online service where it is not allowed to be persisted. Ephemeral by nature and the sport is to keep updating and building it out without losing it.

Where Next?

Popular in Blog Posts Top

biportal
Hi, I recently thought about a name for this Stack: Rust + Elixir + Phoenix. I came up with Runix (RuNix) and blogged about it on Medium....
New
Paradox
Testing is an important part of any modern piece of software. But writing tests can quickly become an exercise in frustration, with tons ...
New
mssantosdev
Our take on how to build a frontend style guide with Phoenix Components, Atomic Design and plain CSS, with focus on reusability and code ...
New
New
brainlid
You are storing some Phoenix LiveView state in the browser. You want to retrieve that saved state as early as possible to improve the use...
New
JEG2
I’m closing out, for now, my series on questions at the heart of development with an analysis of when we need more abstraction. For exam...
New
bram209
Hello everyone, I just published my first blog post ever. I am learning Elixir, OTP & Phoenix and wanted to start a blog for a while...
New
axelson
I describe how we use Hot Reloading with Webpack to develop faster and show how to integrate Webpack 5, webpack-dev-server, and Phoenix f...
New
lawik
Building on other people’s work I bashed things together and suddenly I can know when someone is speaking using Elixir and Membrane.
New
brainlid
Dialyzer is a tool that you’ve probably heard about in the Elixir community. You may have even used it. However, adding Dialyzer to an ex...
New

Other popular topics Top

New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement