Fl4m3Ph03n1x
Background
A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell.
In this talk, Dave made the following question (paraphrased by me):
Why aren’t we dominating the serverless space? Elixir is functional, it has multiple processes and is parallel. It has everything serverless needs and wants, and yet Elixir has not risen to be the dominant technology in the area.
I think this is a pertinent question.
Questions
- In your opinion why do you think Elixir is not dominating serverless architectures?
- What main issues do you think Elixir has when trying to go serverless?
- Do you believe there is a competing technology easier/more fitting to go serverless than Elixir?
Let me know, I would love to know what everyone thinks !
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hauleth
Because “serverless” is a temporary fad on resurrecting CGI.
“Serverless” scripts should be able to start and stop quickly, as these are “run once” scripts. Elixir is very bad at such approach, it is better to have long-standing VM that accepts connections.
On the other hand within BEAM machine it is “serverless” as each incoming connection (at least in most of the HTTP servers out there) is new process, just like in serverless.
Fl4m3Ph03n1x
First time I hear it. Could you elaborate?
You mean cowboy with ranch? It actually uses a pool of GenServers that take requests. Or perhaps I am not understanding your point. Could you specify what you mean?
Thanks for dropping by!
LostKobrakai
I’ve not listened to the podcast, but I see two point in terms of elixir and serverless technology:
For orchestration: I guess it’s because of existing knowledge in other languages in teams building those systems. Also the beam doesn’t really have a straight forward story for executing user-code within the vm, so it’s going to need a technology mix anyways.
As the executed runtime: The beam is not the best vm to be started up for a single task and stopped right afterwards.
I guess the beam excels at “self hosted serverless”, when you can deploy your own trusted code to be run.
hauleth
Aka serverless, but from 90s-00s. There was a reason why we stopped that, and IMHO there is no point in resurrecting that technology.
Ranch pool is number of acceptors not connections. Quote from docs:
So while connection gets accepted by the Ranch, “connection handling” takes place in separate process AFAIK.
hubertlepicki
Maybe because Elixir doesn’t shine as bright when you take away the OTP, the clustering and long-running processes that pass messages between each other thanks to the BEAM VM?
Surely, it’s a nice enough language to be used to write functions with, and in fact very nice with the pattern matching and language constructs it has, also macros. But that maybe has not enough weight to take away the huge popularity of JavaScript and Python has and user base, while the end result is going to be pretty much the same.
Elixir & Erlang make sense when you are building distributed, long-running, message-passing system, which is the counter-definition of “serverless” architecture.
dimitarvp
Simply put, because the current serverless hosting providers destroy the OS process after it has called one function (okay, most of the time; some of them keep the instance around for a bit) and because the BEAM isn’t starting up particularly quickly. It wasn’t designed to be started and stopped many times just to do one small task. It was designed to be a long-running service.
Contrast that to the average Go, Rust or OCaml compiled binary that starts up in 0.5 - 8.0 milliseconds.
bulldog_in_the_dream
Maybe I’m misunderstanding, but wasn’t Dave Thomas’ point to use Elixir as infrastructure for serverless? In other words, you would still write your small serverless functions in JS, Python, Go etc., but the system running them would be written in Elixir.
r8code
some links about serverless :
https://medium.com/coryodaniel/from-erverless-to-elixir-48752db4d7bc
hubertlepicki
I don’t believe BEAM is built with a level of sandboxing required to run untrusted code in mind. Whenever you have a “serverless” architecture, you are allowing programmers to send functions and execute them on a virtual machine somewhere in the cloud, along with other programmers doing the same. I don’t know how technically this is done, but I suspect a strong reliance of OS-level sandboxing and one-off virtual machines, possibly keeping a pool of them already started and allowing instant execution, and then discarding them after the execution. It’s an educated guess but you can probably get to the details here: https://d1.awsstatic.com/whitepapers/Overview-AWS-Lambda-Security.pdf
Now, you could replace all that with BEAM if beam was built to do so. But it’s not. There is a lot of ways to start processes, call functions on current or remote nodes, execute code dynamically. It’s just going to be a nightmare trying to secure that environment and allow execution of untrusted code that needs to be sandboxed. A nightmare to the point of “it ain’t going to happen”, I think.
Similar thread: How to create a sandbox to run untrusted code/modules? - #25 by OvermindDL1
peerreynders
As far as I’m concerned the concepts behind CGI continue to exists in the form of PHP which had and continues to have a good run.
PHP managed to stick around for a long time.
https://medium.com/@keithwhor/rise-of-functions-as-a-service-how-php-set-the-serverless-stage-20-years-ago-ccb560c5f422
I don’t see serverless/FaaS being a temporary fad. It has its problems but the initial cost/maintenance model can look way too attractive even though it can really bite you later.
So Jeff will likely stick around for a while.