Vasya Pupkin · 2017-11-18 21:44
I am going to build a highly concurrent backend, and want to know which way to go: Erlang or Golang. It has to not die at all costs with a peak of 50k concurrent users.
Any tips? I'd like to do it in Erlang, but I worry that it might be overkill, and that the Erlang community seems to be quite dead.
list · 2017-11-18 23:15
Go if you have a strong background in C-like languages.
Erlang (or Elixir) if your down for whatever.
Honestly it won't matter too much what choice you make.
Cat Mother · 2017-11-18 23:48
>>5091
You definately want to go with Erlang/Elixir and I strongly recommend Elixir over Erlang as Erlang was never meant to for public facing apps but just to run systems-only infrastructure. Elixir has so much better syntax that is easier to understand and use as well has much better string handling instead of strings randomly turning into arrays of byte numbers. In order to maintain 50k concurrent users you absolutely have to use something like the OTP which you can think of as a mini operating system for managing green threads. It uses a hierarchy of processes with managing processes that observe worker processes and will kill and re-create processes that it errors for whatever reason. There is nothing that comes remotely close to Erlang/Elixir and the OTP.
sizeof · 2017-11-19 07:00
>>5091
I'd recommend going with Erlang/Elixir if it has to not die. BEAM has a really nice way of handling updates/crashes.
>>5094
>Elixir has so much better syntax
>Hating on Erlang's syntax
I can't even begin to express how wrong you are, prolog-like syntax is objectively 110% best syntax ever.
I agree with the rest of your post though.
byte · 2017-11-19 17:45
Erlang syntax is nice and if you go with the book "Learn You Some Erlang" it introduces servers/processes quite nicely, then builds them up a little until they're usable in the general case, then shows you how OTP does everything you just wrote and how that can be useful to your own programs. Then it introduces manager trees, so you can make sure that if one part of your program crashes the rest is unaffected.
I'll attach it here
Tyrell Wellick · 2018-01-23 07:09
>>5103
I know the LYSHaskell book is not really that good, is that book better ?
Kay · 2018-01-23 14:01
Erlang
>created for being used in telecommunication systems
>used for a system with 99.9999999% of reliability
>used in the Whatsapp's backbone
>not good for number crunching
>weird syntax, enforces functional programming and actor model
Go
>nice set of tools
>procedural with lambdas and bad OO support
>no generics, lol
>Communicating Sequential Processes (goroutines) used instead actor model
>adoption is growing
lietzu · 2018-01-26 03:42
>>5091
Do you know any of those languages already, or would learning them be part of the process?
I'm interested in knowing why you narrowed it down to these two to begin with.
↑ · 2018-01-27 14:29
Elixir is actually slowly growing in popularity. And since it compiles to the same byte code as Erlang, Erlang is growing in popularity too.