My request for a “better” solution is related to the following:
A whopping 71% of Elixir developers rate their OTP experience as below average. This tells me that we need to do a better job as a community on OTP-related outreach. Fault tolerance is one of the biggest selling points of Elixir, and OTP is the path to it.
I have two deployment-related takeaways from this. First, we as a community should find a way to expose new users to releases earlier in their Elixir experience. Secondly, we need more examples that clarify the simplicity and value of Erlang’s distribution – Docker and Heroku inherently cripple the value the Virtual Machine can provide.
Part of the issue, I think, is that a lot of learning resources for Elixir don’t teach OTP properly. I’m talking about Programming Elixir, and Elixir in Action. What I mean by this is that, to me, OTP isn’t just a set of modules that abstract functionality, they’re building blocks for architecting your software, and I don’t think these learning resources do justice by using toy problems to illustrate how to use them. It wasn’t until I went over Programming Phoenix that I saw a ‘real-world’ example with the wolfram infosys backend that gets built in the book as part of the Rumbl app.
I would love to see an example of a (feature-bare) application that uses OTP behaviours but still architected in the way it would be in the ‘real world’, with explanations as to why any particular behaviour was used and why it’s the right way to use them that way.
edit: For example I’m still pretty fuzzy on why and when you would use a GenServer.
Just a nitpick, the single quote in page title (the title you see on browser tab) got converted to html entity &39;. Otherwise thanks for sharing the result, interesting to know many people coming from JS, I think they may very well be NodeJS devs.
OTP releases are not needed the way Heroku does deploys or you can create releases and deploy the slug manually if you prefer that . Clustering is not needed for the vanilla web apps Heroku is targeted to and neither are hot upgrades. Besides the people doing proper production hot upgrades are a small minority.
If you need those things then don’t use Heroku, that’s easy. But saying that the platform inherently cripples VM is unfair.
If you don’t need then you don’t need it :). For most people it’s probably not worth the extra complexity and testing effort.
It runs on a single hobby dyno 512mb. Memory usage is around ~130mb and peaks at 250mb when rebuilding the registry. Load is around 0.1-0.2 except for during traffic peaks. The traffic is 100-200rpm with peaks over 2000rpm. We don’t host the repository on Heroku, so most traffic goes to Fastly CDN that hosts it.
I’m sure it’s a great book, in fact i bought it a couple of weeks ago and have it on my list. But I think this is part of my point that there needs to be better Elixir+OTP learning materials rather than being pointed to Erlang resources to get a better grasp on OTP.
edit: now maybe I’m just slow at grasping the concepts, that’s perfectly valid too.