sntran

sntran

In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small processes, messages between them, and supervisors that restart a process when it fails. I wanted to build something with them.

But every time I wanted to spin up a quick experiment on a free evening, the onboarding friction felt disproportionate: matching compatible Erlang/Elixir toolchains, configuring releases, finding hosting, managing a VPS or container runtime, and handling deploy pipelines. For a casual idea, that first step was always a wall.

That led me down a rabbit hole: What would it take to make the BEAM truly portable—to build once and run anywhere with zero server or container management?

To see if this was even viable, I put together a minimal proof-of-concept running Phoenix LiveView on an ephemeral edge runtime without standard Linux servers, VMs, or containers.

The challenge, naturally, is reconciling the BEAM’s stateful, persistent nature and LiveView’s long-lived connections with an environment that manages no persistent infrastructure.

I’m currently expanding this into a broader runtime abstraction so developers can compile and run BEAM apps anywhere seamlessly, but before diving deeper into the technical architecture in future write-ups, I wanted to gauge community interest:

  1. Would a zero-ops, portable BEAM runtime change how or where you deploy small apps or microservices?
  2. Where do you feel the biggest friction exists today when deploying BEAM applications outside traditional VPS/container setups?

Curious to hear your thoughts and experiences.

In the meantime, I’ll leave this gem:

universal_server() ->
    receive
        {become, F} ->
            F()
    end.

Demo Link:

(Check the small table at the bottom of the page—it exposes the runtime environment details.)

The same build. A different cloud. We changed no line of the app.

An Erlang shell. No server answers it.
The VM is in the browser tab: 10,000 processes, crypto, and a static page.

Showing Posts 1 to 5

sntran

sntran OP

To show what the runtime can actually do, I put together an interactive sandbox called Studio:

:backhand_index_pointing_right: Try it: https://phx.fifo.workers.dev/

​Think of it like a zero-install Phoenix playground. When you click through to launch an instance, it creates a fresh project in an isolated VM:

  • ​Zero setup: Generates a project, compiles lib/ in ~2s, and serves it immediately.
  • Live editing: Tweak a template or run generators (phx.gen.live, migrations via SQLite), and the app reloads.
  • Export: Download the result as a clean zip file you can run locally with standard mix phx.server.

It requires no local Elixir, Node, or Docker setup. Would love to hear how the spin-up speed and compilation feel on your end.

rhcarvalho

rhcarvalho

Are you running the whole app on the client side? How do you isolate secrets or share state across clients (e.g. PubSub)?

sntran

sntran OP

On Cloudflare, it’s actually not running client-side at all.

When you hit the Workers demo, Cloudflare spins up a dedicated Durable Object with its own BEAM VM just for your session (at /t/NAME/), which stays alive for 30 minutes. Your browser is just acting as a standard, thin LiveView client over a WebSocket.

Because the VM lives on the edge inside that Durable Object:

Secrets: They stay on the server side in the isolate. The browser never sees them or executes the BEAM code. It just gets the usual HTML diffs.

State & PubSub: It’s standard Phoenix under the hood. If you open that same /t/NAME/ link in another tab, both connect to that same Durable Object, so native PubSub and in-memory state just work across those clients. Different visitors get separate DOs, so projects are isolated by default.

(The same demo can run purely client-side in the browser on GitHub Pages, where the VM runs in Wasm right in the tab.)

sntran

sntran OP

And here is LiveBook with executable code cells, running directly on GitHub Pages, i.e. directly on your browser! No server!

caleb-bb

caleb-bb

I feel like this is a problem a lot of people run into when they try to leverage the BEAM. Both Nerves and LiveView Native (RIP) wound up finding ways to spin up portable BEAM instances in multiple places.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

CodeSync
We have 4 in-person tickets to Code BEAM Europe 2026 (21-22 October, PHIL Haarlem) to give away: 1 diversity ticket (sponsored by AppSi...
New
gus
Happy Friday, all! :slight_smile: Our October meetup is coming up next week - Wednesday, October 14th at 19h CET via Zoom! This month we...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews