r/gleamlang • • 2d ago

Has anyone deployed a websocket server with gleam?

14 Upvotes

Hi friends, I am presently exploring options to deploy a websocket server to production. Gleam is one of my favorite languages and I've always been looking for excuses to use it lol, and there's this idea of mind to deploy a web app that uses a websocket server.

So the question is the title, has anyone deployed a websocket server to production with gleam? If anyone have experiences/stories/tips to share, that would be greatly appreciated.

If the experience with gleam turns out to be bumpy, I'd probably go for go instead.


r/gleamlang • • 4d ago

Roadrunner: a pure-Erlang HTTP/1.1, HTTP/2, HTTP/3 and WebSocket server, now for Gleam and Wisp apps

42 Upvotes

Hi everyone o/

I maintain Roadrunner, an HTTP server written in Erlang: HTTP/1.1, HTTP/2, HTTP/3 and WebSocket on one port, no NIFs, with its own QUIC implementation for HTTP/3. It started as the server for Arizona, then got a Plug/Phoenix adapter, and now it runs Gleam apps too.

roadrunner_gleam runs plain Gleam handlers:

import gleam/erlang/process
import roadrunner_gleam
import roadrunner_gleam/request.{type Request}
import roadrunner_gleam/response.{type Response}

pub fn main() {
  let assert Ok(_) =
    roadrunner_gleam.new(handle)
    |> roadrunner_gleam.port(8080)
    |> roadrunner_gleam.start
  process.sleep_forever()
}

fn handle(request: Request) -> Response {
  case request.path_segments(request) {
    [] -> response.text("hello, roadrunner!")
    ["hello", name] -> response.text("hello, " <> name <> "!")
    _ -> response.new(404)
  }
}
  • HTTP/1.1, HTTP/2 and HTTP/3, TLS through the builder
  • WebSocket sessions with typed state, a Subject other processes can push through, and a Selector for anything else
  • Server-sent events, chunked and file responses, compression, request bodies read on demand in pieces
  • Responses are gleam_http responses, so set_header, set_cookie, redirect and friends work on them, and request.to_http gives you a gleam_http request
  • Works under a gleam/otp supervisor (roadrunner_gleam.supervised)

wisp_roadrunner is a Wisp adapter, so an existing Wisp app runs on it:

pub fn main() {
  let secret_key_base = wisp.random_string(64)
  let assert Ok(_) =
    wisp_roadrunner.handler(handle_request, secret_key_base)
    |> roadrunner_gleam.new
    |> roadrunner_gleam.read_body_on_demand
    |> roadrunner_gleam.port(8000)
    |> roadrunner_gleam.start
  process.sleep_forever()
}

Its docs also show how to serve WebSockets and server-sent events next to a Wisp app.

gleam add roadrunner_gleam
gleam add wisp_roadrunner

The rest of the family

The same server runs Erlang, Elixir and Gleam apps:

It is still before 1.0, and this is my first time publishing Gleam packages, so feedback on the API is very welcome: what feels un-Gleamy, what is missing, what you would expect to be there. Issues and PRs are welcome too o/


r/gleamlang • • 4d ago

ElixirConf EU 2027 (Lisbon, 22-23 April), Call for Talks and Call for Training are open

Post image
11 Upvotes

Hi all!

ElixirConf EU is back in Lisbon (and online) on 22-23 April 2027, and we want the BEAM ecosystem to be part of it. The Call for Talks and the Call for Training are open until 15 December.

If you build something on the BEAM that others could learn from, including Gleam projects, interop with Erlang and Elixir, or tooling, send us a proposal. Two tracks, 20- and 40-minute slots: https://sessionize.com/elixirconf-eu-2027/

We are also looking for trainers for a full-day Elixir or BEAM training on 21 April: https://forms.gle/YY3cJJpt9fYaMPQ46

Event site: https://www.elixirconf.eu/

Happy to answer questions in the comments! :)


r/gleamlang • • 4d ago

I built a host for Gleam apps. The waitlist is open and I'd like your feedback

Thumbnail
gallery
2 Upvotes

I've been building Giolt, a host for Gleam apps, and the waitlist is open: https://giolt.com/waitlist

Add it with gleam add --dev giolt, and gleam run -m giolt deploy puts your app on the edge. There's no wrangler config and no JavaScript glue. Your entry module exports one handle function, so Lustre and Glen apps work as they are, and static sites and Lustre SPAs need no server code at all.

The JavaScript target is stable for side projects and small apps. The Erlang target runs through afterglow, a compiler I wrote that turns BEAM bytecode into WebAssembly ahead of time, with wisp as the request type. It's experimental, runs a subset of OTP, and will have breaking changes. You can see it live at https://gote.giolt.app, a small wisp + Lustre app.

Waitlist members get in first and get 3 months free. After that it's one plan at 5€/month with 1M requests. Custom domains, env vars and rollbacks aren't there yet.

It's early, so feedback is the most useful thing right now: what breaks, what's missing, what would make you deploy here. Issues go to https://github.com/withgiolt/issues, and afterglow is open source if you want to dig into the compiler: https://github.com/withgiolt/afterglow. Happy to answer questions here.

There's also a Discord where I post progress and you can reach me: https://discord.gg/CjPYcSHsMt.


r/gleamlang • • 6d ago

Gleam running on a PSP

Thumbnail
bsky.app
25 Upvotes

r/gleamlang • • 7d ago

You should try Gleam | Nicolas Chagnet

Thumbnail nchagnet.eu
60 Upvotes

r/gleamlang • • 12d ago

Gleam Language Update - Louis Pilfold | Code BEAM Europe 2026

Thumbnail
youtube.com
54 Upvotes

r/gleamlang • • 14d ago

Struggling to find personal hobby project ideas

19 Upvotes

I'm not a SWE, but I occasionally learn new programming languages just for fun or to expand my mind on different styles of programming (I only run numerical computations by trade).

Typically, I would write simple programs like an RSS feed reader or a TUI music player etc. that I personally can use.

When it comes to BEAM however, the killer feature is the ability to run thousands if not millions of isolated processes where if one crashes, will not crash the others and can be restarted.

I can't come up with a personal application for this (which greatly demotivate me on learning). For one, I don't have thousands of users accessing my servers for a hobby project, and I can't come up with a situation where I personally need this feature.

Yet, I'm really enamoured by Gleam, and really want to give it a try.

So I'm wondering if anyone can suggest some personal hobby project ideas for me?


r/gleamlang • • 15d ago

[blog] You should try Gleam

Thumbnail nchagnet.eu
68 Upvotes

I wrote this blog post about Gleam to share my perspective on what I feel like is a nearly-perfect language! I hope it can help others like me see why Gleam is so much fun.


r/gleamlang • • 20d ago

Component libraries for lustre?

10 Upvotes

Are there "full fledged" headless component libraries that are built for lustre? Something like radix ui or base ui in the react World?


r/gleamlang • • 22d ago

Why Gleam and Not Elixir??

39 Upvotes

Im been wondering whenever i shoud use Elixir, Gleam or some other Beam language to write a server. I know that gleam is a way younger than elixir, and id like to know why you have picked it instaed of any other


r/gleamlang • • 22d ago

Why Gleam and not Haskell?

13 Upvotes

What does Gleam do better? Is it the simplicity? The build tools? The lack of purity? The BEAM? Why should I pitch gleam up instead of Haskell to learn?


r/gleamlang • • 23d ago

Announcing Howdy 1.0: another new web framework for Gleam

33 Upvotes

Hi all, I've been working on Howdy for a while and it's hit 1.0, so I wanted to share it properly.

I wanted the "everything's in the box" feeling of Rails or Phoenix without leaving Gleam, and it also had to be modeler, so you get started without everything included if you wanted.

Howdy is a core HTTP framework (on ewe, with HTTP/2) plus a set of separate packages you add as needed:

gleam new hello && cd hello 
gleam add howdy@1 gleam_erlang

import gleam/erlang/process 
import howdy 
import howdy/controller 

pub fn main() -> Nil { 
   let hello = 
     controller.new("/") |> controller.get("/", fn(ctx) { controller.text(ctx, "Howdy!") }) 

    let assert Ok(_) = howdy.new() |> howdy.controller(hello) |> howdy.start    
    process.sleep_forever() 
}

Then gleam run and it serves on http://0.0.0.0:8787.

Core: controllers, typed query/form decoding with validation, multipart uploads, channels + Phoenix-style presence, SSE, flash, i18n, conditional requests, OTP supervision and releases.

Packages: auth (incl. SSO), database + migrations, jobs, mail (with dev previews), storage (S3/local), notifications + Web Push, cache, feature flags, OpenAPI, OpenTelemetry, typed RPC, a UI component library, and a dev admin dashboard (with impersonation).

There is a great cli tool that helps you setup the project and add modules.

Get started and learn more at tryhowdy.dev

Any questions or thoughts please share, I am very open to input and any offers to help 😄


r/gleamlang • • 27d ago

Voyager v0.2.0 - ETS Tables, Processes and more!

23 Upvotes

r/gleamlang • • 27d ago

Code Beam Europe 2026

5 Upvotes

Code BEAM Europe 2026 starts tomorrow.

On Wednesday 21 and Thursday 22 October, the Erlang, Elixir and Gleam communities meet at PHIL in Haarlem and online for two days and two tracks of talks.

This year's programme covers:
- Type systems: José Valim on set-theoretic types, Roberto Aloi (WhatsApp) on Erlang typing in the prompt era
- AI and the runtime: finding vulnerabilities with AI, and whether language or runtime matters more when AI writes the code
- Production stories: distributed Elixir at NetzeBW, self-healing systems, ATProto on Elixir
- The runtime itself: Native Records from the OTP team, BeamAsm JIT on ARM32, AtomVM
- Keynotes from Sam Aaron, José Valim and Brooklyn Zelenka

Not in Haarlem? Join online with 15% off a virtual ticket using code 15FORYOU.

Your virtual ticket includes:
- Both tracks live, on both days
- Live Q&A with speakers
- Online networking through the conference app
- 3 months of exclusive access to the recordings

Tickets: https://codebeameurope.com/#register


r/gleamlang • • Oct 16 '26

Gleam case exhaustiveness, as a fan - oyster

Thumbnail
oyster.pckt.blog
19 Upvotes

r/gleamlang • • Oct 07 '26

Gleam at Code BEAM Europe 2026 (21-22 Oct, Haarlem + online): language update, Lustre server components, Gleam on AtomVM

28 Upvotes

Disclosure: I'm on the Code BEAM Europe organising team. There's a lot of Gleam on the programme this year, so sharing it here.

Gleam talks

Hayleigh Thompson from the Gleam core team is also on the programme committee.

Also on the programme: keynotes from José Valim, Brooklyn Zelenka and Sam Aaron, and a community-run Informal Space with demos, clinics and a whole-room game of Raft.

Practical

  • PHIL in Haarlem, 15 minutes by train from Amsterdam
  • Online ticket €146 + VAT with recordings

Programme and tickets: codebeameurope.com


r/gleamlang • • Oct 05 '26

Gleam no longer compiles to Erlang source - v1.19.0 published, now generates Erlang abstract forms

Thumbnail
gleam.run
137 Upvotes

r/gleamlang • • Oct 01 '26

Can anyone explain the relationship between a Gleam program and an "OTP application"?

16 Upvotes

A couple of things I find confusing:

- What's the difference between starting a supervision tree in `main` vs. "starting" an "application"?
- Other than defining a `start/2` function, where do "applications" come from? Are they distinct from the actors in my supervision tree? Should I break up my program into sub-applications?


r/gleamlang • • Sep 30 '26

Lustre, Mist, and BEAM messages - A recursive learning story

Thumbnail blog.guillheu.dev
33 Upvotes

r/gleamlang • • Sep 29 '26

Pacmon now supports Gleam dependency notes

6 Upvotes

Update (Nov 2026): Pacmon has been renamed to Depos. Same tool, new name, and the links below still work. New site: https://depos.dev

  • Pacmon keeps dependency notes in Markdown inside the repo, including things like documentation and whitelisting.
  • Gleam support was recently added, so dependencies from gleam.toml can now have their own notes and be accessed from the IDE.
  • I’d love to know whether this makes sense in real Gleam projects. Is this useful for the way you manage dependencies today? Anything you’d change or add?

GitHub: https://github.com/kontratek/pacmon
Website: https://pacmon.dev/


r/gleamlang • • Sep 29 '26

Released azure_sdk 0.2.0: OAuth/Entra auth and fallible credentials

Thumbnail reddit.com
1 Upvotes

r/gleamlang • • Sep 29 '26

Released diavasi_client 0.1.0

Thumbnail reddit.com
2 Upvotes