Fl4m3Ph03n1x

Fl4m3Ph03n1x

Why isn't Elixir dominating serverless architecture?

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

  1. In your opinion why do you think Elixir is not dominating serverless architectures?
  2. What main issues do you think Elixir has when trying to go serverless?
  3. 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 !

First Post!

hauleth

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.

Most Liked

hubertlepicki

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? :wink:

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.

hubertlepicki

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

webdeb

webdeb

It’s surprisingly, that nobody mentioned the real benefit of serverless here. IMHO its deployment. you just deploy a function and it maps to an endpoint. Therefore the BEAM could actually dominate, by starting process with a bit of business logic in it, hold state, emit events, and stop again. So I think it could grow into somekind of Platform for Modular Applications. Just provide a simple declarative way to deploy Modules into a running BEAM cluster, and its even better then what we know as Serverless today.

This is what I think would make sense

Last Post!

webdeb

webdeb

Wow, that looks really cool!

Where Next?

Popular in Discussions Top

PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
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
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
paulanthonywilson
I like Umbrella projects and pretty much always use them for personal Elixir stuff, especially Nerves things. But I don’t think this is ...
New
matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
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

We're in Beta

About us Mission Statement