Hacker News new | past | comments | ask | show | jobs | submit login
Effortless Elixir Releases and Deployment (alchemist.camp)
127 points by AlchemistCamp 66 days ago | hide | past | web | favorite | 28 comments



This is really great to see that at least some people have found my tutorial useful!

It's also interesting to see how much traffic being on the front of HN sends. So far it hasn't broken 200 requests in a minute (https://pbs.twimg.com/media/ECJVktXUEAE9kVN?format=jpg&name=...)

This is about 1/100th the traffic I load tested it to handle on a $5 Digital Ocean droplet (which I later upgraded to $10 due to TypeScript compilation using too much memory a different project).

Also, I completely forgot to set up any caching or any rate limiting on "articles" which are a new kind of thing on my site. Of course, it could easily be taken down with a DDOS.

But in the big scheme of things, this validates my belief that most people (including me) spend way too much time worrying about scalability in early stage projects!


You can save back your 5$/month by increasing your machine’s swap space. I did the same when more memory was only required for compiling.

https://www.digitalocean.com/community/tutorials/how-to-add-...


Does anyone know how accurate their warning about swap space on an SSD is? I know SSDs have limited reads and writes and swapping to them obviously uses those limited reads/writes, but how much of a concern actually is it? Especially if you're only using swap during the compile/deploy step?


As soon as you hit some kind of limit it will abort the process and output the error. So you will be notified about it and it wont go unnoticed. And if you only use it during compile and deploy then you are at no risk :)

(ps: bad grammar, on mobile)


another option is to take advantage of Gitlab's shared CI runners for small side projects


I do use Gitlab CI/CD for most my projects! It's great. I still build on the droplet after it passes, though.


I’m primarily a React / Node dev, but I’ve been thinking about picking up another language and framework for a while. I feel like Node / Express is great, but I also sometimes feel like it’s not a proper framework, in that you end up assembling a lot of code by hand (ex: auth, data modeling) and after a few projects it’s tedious. Also, Node only offers concurrency as an unnatural afterthought...

I’ve dabbled in Django and it seems to solve some of those problems, but I also feel like web programming in an OO dynamic scripting language isn’t that far away from doing it in JS so I might as well learn something mind-blowingly new...

I’ve been exposed to functional programming in OCaml in a rigorous college course and absolutely loved it, how would you guys rate learning Phoenix + Elixir in my case?


I think you're right to explore something else and I'm not aware of anything better than Elixir/Phoenix in the Web Framework world currently. It's incredibly well thought out and an absolute joy to use once you get through the initial learning curve.

I spent many years doing Python before getting talked into learning Clojure and it was incredibly eye-opening and made me a much better developer, so there is no bigger partisan than me for trying something completely different to your current skill-set. Give it a go!


why is elxir/phoenix better than clojure/luminus?


They a pretty comparable, I think the reason elixir is gaining more popularity, is mainly due to it looking like ruby rather than lisp. Also, I personally feel like the BEAM is better for handling concurrency than the JVM.


You'd probably pick it up pretty quickly.

I learned Phoenix + Elixir not too long ago and I felt quite productive with it after a few weeks with no formal functional programming experience. I started building a non-trivial app right from the start.

Here's how I tackled learning it in my spare time: https://nickjanetakis.com/blog/learning-a-new-web-framework-...


I started with Node and Backbone (then React) and then really got into Rails for a side project and then went to Elixir in 2016.

Especially if you've used ImmutableJS, I don't think you'll have a hard time with Elixir.

One thing I don't miss about Node is that there are a lot of choices different teams make differently. In Rails or Phoenix (and I'd assume Django), it's a lot more likely that you can jump into an existing project and mostly know where everything is.


Go for it! Only issue- you won't go back to node/django after going deep in Elixir. Really elegant + succinct.


This is one of the first hands-on tutorials available on v1.9 mix releases - great content!


Great writeup (even though it doesn't touch upon Distillery). Even cooler is that I discovered Render through this post.


Almost all the previous deployment screencasts I did used Edeliver and Distillery. That's what I do for my primary projects. It's a slightly more complex setup, though.


Great post and thanks for sharing! I've been seeing quite a bit of Render these days. Does anyone have any production experience with it and what are your thoughts? Also for those interested in using Elixir 1.9 releases along with Docker, I wrote a blog post a couple months ago: https://akoutmos.com/post/multipart-docker-and-elixir-1.9-re...


Indie Hackers runs Render in production.


First time I'm hearing of this community; first glance, it looks great! However, I was trying to check out the content in the footer, but the scrolling pagination makes it impossible. :(


Yeah, the UX on IH frustrates me sometimes, too.

Courtland has said before that he regrets going all in on making it a SPA instead of a more traditional back-end MVC. But he wanted to learn Ember and I can totally get that.


That is certainly a big community. Are there any other resources on how reliable this is for larger projects? How long has Render been around?

The name makes it quite hard to google for, without immediately diving into some React documentation :)


Is there a performance difference between Elixir and Erlang? I assume not since they both run on BEAM but I've never dabbled with Elixir.


Between Elixir and Erlang, there's no difference because it's all BEAM bytecode when it runs.

Between arbitrary individual functions you might encounter, there can be differences, but only in the sense that it could happen between Erlang and Erlang if the functions had different implementations or degrees of optimization or optimization choices.

Worth noting for prospective adopters is that you can seamlessly call Erlang functions from Elixir by adding a : prefix, such as :random.uniform(), and there's no weird overhead or surprises involved.


there are might be some minor overhead for Elixir:

- all uppercase elixir atoms / module names adding "Elixir." prefix

- idiomatic Elixir code uses structs (sugar over maps), where Erlang uses records (sugar over tuples)

- some other idiomatic Elixir code has overhead over Erlang, for example access operator []


Elixir compiles down to the same Erlang Abstract Format as Erlang itself, so performance should be the same.


I'm really not being facetious here, but I want to ask - why not deploy this in docker containers?


this looks awesome and is a great writeup.

Is it possible to use (peerage)[https://github.com/mrluc/peerage] to setup autodiscovery between vms like you can in gcp?


I'm not sure about peerage specifically, but here's an example with libcluster set up to discover nodes automatically when they join (or leave): https://render.com/docs/deploy-elixir-cluster




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: