Hacker News new | ask | show | jobs
by birracerveza 1207 days ago
The only thing I can agree is deploying, which is pretty daunting compared to Laravel, but still feasible (unless you have the horrible idea of using mnesia, God help you then) but everything else? I have no idea what framework you've bee using.

>Elixir is less forgiving and you can shoot yourself in the foot much easier.

What? If anything it's the other way around. Elixir does not let you shoot yourself in the foot, it will crash and tell you why exactly it crashed. PHP will chug along and you won't even feel pain even though you don't have a leg anymore. That is NOT a good thing.

2 comments

> The only thing I can agree is deploying, which is pretty daunting compared to Laravel

This really isn't true anymore. There are 4 different official guides for deployment[1], and none take much more than 30 minutes. Fly and Heroku are basically trivial. Using render[2] might be even easier. Setting up SSL is harder than deploying phoenix these days.

[1] https://hexdocs.pm/phoenix/deployment.html

[2] https://render.com/docs/deploy-phoenix

>unless you have the horrible idea of using mnesia

WhatsApp used (uses?) mnesia, what is the problem with it?

If I recall correctly, if some node desyncs, it's hard to get it started again. You have to manually transfer the entire database from another node which can obviously take a long time if you have a large database. It doesn't really handle netsplits by itself (there's https://github.com/uwiger/unsplit) so you have to be prepared to do this yourself.
Got it, thank you two for the answers.
I had a _really_ bad time using it. I used it for a relatively straightforward application but boy did I regret it.

It's not intuitive at all and configuring it is a PITA. While there are docs, they are as murky as bog water if you're new. Deployment? My god, it had me tearing my hair out and I should have just ditched it all right then and there. Migration? AHAHAahahahah...

And my experience was on a SINGLE node. I struggle to comprehend the herculean effort of getting multi-node to work. And for what? It does not offer anything compared to either Redis, SQL, or anything that is not mnesia aside from "you don't need to depend on an external service".

YMMV of course, but IMO it was absolutely not worth the effort. Yes, I understand people might feel the same way towards Elixir and Phoenix, but at least in that case there are incentives such as an active community and ecosystem. No such thing with mnesia.

That's why I keep the sole source of truth in Postgres and cache locally instead. Warming the cache can be tricky, but it works.