5 ms·
Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling com
by jhgg 7y ago
Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling components. Looking back years later - it’s safe to say we wouldn’t have chosen anything else.
- erk__ 7y agoWhat was the reason to choose Elixir over Erlang? Just familiarity with the language?
- superhawk610 7y agoNot OP, but have used Elixir pretty extensively; the major selling points for me are the friendlier syntax and more active community support, plus with rebar3 + Elixir's seamless Erlang interop you really don't give up anything, you can use any existing Erlang/Elixir libraries with a single syntax. It's pretty great.
- alskdj21 7y agoHaven't touched Erlang but has an entry level knowledge on Elixir. I often heard how easy it is to write macros on Elixir. Can you elaborate on this?
- arjan_sch 7y agoOne of the big differences between Erlang and Elixir is indeed that Elixir allows you to write macros in the language itself, using quote / unquote constructs just like lisps. This makes it easy to generate code on compile time, which is then executed in runtime without any performance penalty. A large part of Elixir itself is actually implemented as macros. For instance, the "unless" construct: defmacro unless(condition, do: do_clause, else: else_clause) do quote do if(unquote(condition), do: unquote(else_clause), else: unquote(do_clause)) end end (code simplified for clarity)
- fcbrooklyn 7y agoAnd the if-else construct is also a macro. The whole thing ends up being a case I think.
- dnautics 7y agoImho You shouldn't really write macros, they are there for libraries to make it easy to do the right thing with less boilerplate.
- uasm 7y ago> "Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling components. Looking back years later - it’s safe to say we wouldn’t have chosen anything else." You're a Staff Engineer at Discord. This response is extremely vague and non-informative. What does "running to much success" mean exactly? And why is it "safe to say you wouldn’t have chosen anything else" instead? Why could you not have achieved the same results using alternative tools? By the way - you've mentioned "real time distributed systems". What exactly is your definition of "real time" here?
- pdimitar 7y agoThey have blogged quite extensively about it, for several years. Check their blog.
- nurettin 7y agoYour question is very vague. What exactly do you mean by "the same results"? And which "alternative tools"? How do those tools provide "an alternative"?
- filleduchaos 7y agoThey're not obligated to write an entire book in passing response to a thread on HN.
- uasm 7y agoI was challenging jhgg's comment, by requesting actual clarification and proof for the very broad statements they made. But if I'm honest, this entire thread is full of many such comments - propping up and praising {tech name} whilst providing little to no data to show for it. And that's how we got cargo culting. But please downvote away :)
- EdwardDiego 7y ago> What does "running to much success" mean exactly? When you ask questions like this, you sound combative, rather than curious - because the success of Discord is rather well documented. > Why could you not have achieved the same results using alternative tools? How can this be answered without trialling every other tool? Again, you sound combative.
- faitswulff 7y agoThey link to a form at the bottom of the article where you can submit your own story, if you'd like to contribute: https://docs.google.com/forms/d/e/1FAIpQLScZnppXbZLz-vVfS8Mr4F1xKV49CSTUj1_azrhh-nIY-h9yNw/viewform https://docs.google.com/forms/d/e/1FAIpQLScZnppXbZLz-vVfS8Mr...