744 karma · joined Sep 8, 2013 (13y ago) · 18 submissions
comment 3y ago · link · parent
> I'm not sure what "distributed" means here? Any app in most languages can be coded to be "distributed" both on the scale of within a single machine and at the scale of deploying multiple small instances of it. (eg Kubernetes, running it on multiple EC2s etc etc) The BEAM has a bunch of the "distributed" bits baked in that you then (mostly) don't have to think about when writing your program. If you have two machines, A and B, your program can run on those machines as if it was conceptually a single machine. This is somewhat different from most "distributed" applications.
In general, I find a lot of the patterns around fault tolerance and concurrency to be conceptually easier to work with than languages like Java, C++, etc.
For instance, in Elixir, you might structure a connection to your database as a supervisor and a pool of 10 connections. If something happens to corrupt one of those connections, the process will simply die, the supervisor will see that the process died and spin up a new one to replace it and then re-run any pending queries the dead process was in charge of. You can still handle known exceptions in the process, etc, but the idea is to quickly get back to a good state. The runtime was originally built for managing phone connections so this design choice makes sense.
In terms of concurrency, I find the actor model (which other languages use too!) simpler to reason about vs a process forking model like in Ruby. Essentially, similar to Go, you get parallelism by composing concurrent functions. Unlike Go, however, the composition is at a module level rather than within individual functions. So each function in Elixir/Erlang runs in series, but you can compose modules together to run concurrently and pass messages back and forth.
In general, I would think about Elixir as a Ruby/Node/Python competitor rather than a Java/Rust/C++ competitor. You can very quickly build scalable web applications without a ton of code. My pitch for Phoenix is that it's essentially Rails but built 10 years later; so it has 10 years of learnings (+ solid concurrency support) but doesn't have 10 years of maintenance baggage.
I wrote this very quickly so it's possible some bits aren't clear/precise/etc and I would be happy to elaborate/clarify on some points later when I have time. But hopefully this was helpful. I would also endorse many of the links others have posted if you are interested in more details! Especially the YouTube talk and the Armstrong paper.
4.
Continuous Deployment with Rails, CircleCI, and Heroku(medium.com ↗)
1 points · by cnnrjcbsn · 9y ago · discuss
5.
Reflecting on the Equifax Hack: 143M Breached Identities(blog.hellobloom.io ↗)
3 points · by cnnrjcbsn · 9y ago · discuss
comment 9y ago · link · parent
I haven't had a chance to look through it in-depth yet, but this looks pretty interesting: https://github.com/donnemartin/system-design-primer
As far as things that have had an important impact in my learning path, I do have a few Ruby books I really like (the key here is to get your hands dirty with code as you read along): - https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Int... - https://www.amazon.com/Metaprogramming-Ruby-Program-Like-Fac... - https://gumroad.com/l/rebuilding_rails
I think reading about (and looking at the code) for things you use and trying to understand how they work under the hood has been super useful: http://aosabook.org/en/index.html
Having smart people around to learn from is extremely helpful too.
Happy to chat more if you'd like. Just drop me a line: connor[at]opendoor[dot]com
comment 10y ago · link · parent
comment 10y ago · link · parent
15.
Grooveshark co-founder, 28, found dead in home(gainesville.com ↗)
922 points · by cnnrjcbsn · 11y ago · 136 comments
comment 11y ago · link · parent
As a side note, it is (nearly) impossible for something that hasn't changed in almost 30 years (k&r) to keep up with something as dynamic as a program language. Even if the standard hadn't changed, the way a language is used is practically guaranteed to change over a period that long. Although, as somebody else said, the exercises in k&r are great and it covers a lot of interesting information, but does seem pretty light.
17.
College Vox Kickstarter(kickstarter.com ↗)
1 points · by cnnrjcbsn · 12y ago · discuss
18.
Grooveshark Accepting Bitcoin(tnw.co ↗)
6 points · by cnnrjcbsn · 12y ago · discuss