Elixir Phoenix vs. Serverless Node

Mike Rispoli - Nov 22 '19 - - Dev Community

So this is not another comparison post, I've read enough of those to understand the basic differences between these two. This is basically an open discussion for anyone familiar with both of these technologies.

But first, why write anything other than javascript if you are a web engineer? I know this sounds super naive on it's face but after writing javascript for nearly a decade it's very hard to justify building new projects with all the pain that comes from fumbling through an unfamiliar language. Most of the time, I'm more excited by the idea itself than the technology I'm going to use, so having a half completed project in elixir is more heartbreaking than a complete one in javascript.

But alas I think I'm getting tired of being fluent in one language and have an idea that can benefit from something else. I've also grown frustrated with a few things in javascript over the years.

  1. No type safety
  2. a single error can just tank the entire system
  3. Runs hot on memory
  4. Not great at concurrency

Here's where elixir phoenix comes in.

  1. Functional/immutable patterns deal with type safety
  2. Resilience, errors kill a process without taking down the entire app
  3. Runs lighter on memory
  4. A beast at concurrent tasks

But of course I've not yet dove in and while the setup was easy, I know there is much pain to come on this route.

So here's my javascript angel on my shoulder saying just come back to what you know.

  1. Typescript gives you back type safety
  2. If you use typescript in strict mode you should avoid most common errors
  3. You can go serverless here and use lambda functions to mitigate the issues of the old node monolith and memory problems.
  4. Serverless functions effectively spin up a new process for each call so really you would get the advantages of elixir phoenix concurrency.

Here's where you come in. Have you built apps in both of these types of setups? Am I correct in thinking there isn't much difference in the load a serverless node setup and elixir can handle? Anyone test any of these? And lastly but more generally, how do you resist the urge to just fall back on good ol' javascript when the learning gets tough?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player