matthias_toepp

matthias_toepp

Gleam Has A New Web Framework

I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold.

Gleam, along with the efforts to bring static typing to Elixir definitely played a role in bringing me to Elixir. If Gleam continues to thrive and if Elixir’s new type system doesn’t work out, then I can imagine myself writing phoenix projects with business logic / domain modeling in Gleam (and not necessarily only under those circumstances.)

Most Liked

josevalim

josevalim

Creator of Elixir

Looks great! I like the context approach and how composition is done with use. Quick question: are responses immediately sent as side-effects or they require the middleware to finish?

Also, two nits if you don’t mind:

  • On the benchmarks, you should link to a reproducible source. From a glance, you are comparing to languages (Go and Node.JS) and then to “full web framework” in Phoenix (which does a lot out of the box) and in none of these cases I can see what is really being compared. However, publishing the source will 100% lead to bike-shedding, so beware. :smiley:

  • You mention pattern matching is faster than routing in the example but that’s not necessarily the case. In Phoenix and Plug, routing literally becomes pattern matching. Someone else could also implement a binary tree (or a trie) for routes and be equally fast (or faster). You are only guaranteed to be faster than linear routing (which when I checked 8 years ago, was the case for most JS and Ruby frameworks)

Thanks for reading!

10
Post #9
lpil

lpil

Creator of Gleam

The response is sent after the handler function returns a response, similar to Raxx in Elixir.

Quite! It’s a deliberately vague statement that is intended to assure you the performance is good enough for production use. Presently I’m not interested in maintaining or discussing benchmarks as I’ve too much work to do.

Aye, I know. I’m specifically talking about Gleam there, not Elixir, which can do more thanks to macros.

If in future someone makes Gleam router that is type safe and at least as fast as pattern matching then we can revisit this and decide if it’s worth the increase in complexity. So far all attempts have failed spectacularly at both.

lpil

lpil

Creator of Gleam

Wisp will continue to gain more feature over time, though there’s no specific roadmap. Wisp was extracted from real-world Gleam web applications where solutions to real problems were iterated on over time, and the same will likely be done for future features.

There’s a number of projects doing front and back integration in Gleam in a variety of ways, such as Lustre and Sockets. You may find them interesting.

I intend to soon create a template for Wisp web apps with all the usual stuff a business web application would need to get started.

I can’t say anything about Gleam with Phoenix as I’ve never used Gleam with Phoenix, and I don’t currently have Elixir in production.

Where Next?

Popular in Discussions Top

arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&*())^% %%:>" From this string, I want to only keep the integers, ...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
jesse
Hi everyone, I hesitated to post this here because I don’t want you to think I’m spamming, but I’ve been working on a Platform-as-a-Serv...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
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
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement