5 ms·
We do a lot of Erlang work here. The BEAM is so reliable that I wouldn't spend 1 minute looking at an experimental alternative.
by fortran77 7y ago
We do a lot of Erlang work here. The BEAM is so reliable that I wouldn't spend 1 minute looking at an experimental alternative.
- carapace 7y agoYeah, this. I'm just getting started with Erlang and I already feel like an idiot for not using it sooner. When I think of some of the things I've done to try to achieve what the BEAM does out-of-the-box...
- rhlsthrm 7y agoCan you give some examples? I've been getting more and more interested in Erlang.
- battery_cowboy 7y agoRPC is basically built in, so you'll probably never use REST internally. There's an in memory database built in (ETS) that will replace redis for most key value storage cases. There's easy recovery from crashes via supervision trees and associated features. You can do hot upgrades while your system is fully operational.
- dnautics 7y agoA few protips: hot reloads are outside of a few corner cases generally unnecessary these days. Be careful about erlang rpc if you expose it in any fashion over the network and follow the eef security working group guidelines re: erlang term format. I use Elixir's plug.crypto.non_executable_binary_to_term/2
- battery_cowboy 7y agoThanks, I knew both of those bits of info, but I didn't know about the guidelines and how to deal with the RPC issue, very helpful.
- dnautics 7y agoto be fair, the guidelines are hot off the presses. I literally went to CodeBEAM, ran into to Bram Verburg (whose fantastic X509 library i had just found a week prior) and he told me about those guidelines, which had just hit hours before we spoke. Bram is great, he's very modest, and was amused that I thought he was some sort of superstar.
- carapace 7y agoYou wouldn't happen to have a link handy would you? It would be much appreciated.
- dnautics 7y agoErlef security group guidelines: https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/ https://erlef.github.io/security-wg/secure_coding_and_deploy... X509 library: https://hex.pm/packages/x509 https://hex.pm/packages/x509 Bram verburg talk: https://youtu.be/0jzcPnsE4nQ https://youtu.be/0jzcPnsE4nQ
- battery_cowboy 7y agoWell I'm "hot off the press" when it comes to elixir, so it's a good time for me to learn this stuff, thanks for the link below, too.
- mleonhard 7y agoWhen I used Erlang in 2005, there was a problem with message queues growing and OOM-ing the process. The standard solution to that is RPC flow control and backpressure. Does this problem exist with modern Erlang? Google's gRPC/Stubby has the same problem. It's one reason why gRPC servers are never deployed on the public Internet and always use hefty reverse proxies.
- spockz 7y agoCan you share something on this reliability? Is it more reliable than the JVM? Or is it more predictable in terms of performance? I’ve found the jvm itself to be rock solid as well.
- hopia 7y agoErlang VM is consistent/predictable in terms of latency, it's engineered that way. For pure computational performance you won't find it optimal.
- battery_cowboy 7y agoErlang/OTP and BEAM have been around a long time and is probably just as mature as the JVM and Java, but they have slightly different goals: very low tail latency, easy error recovery, and easy distributed compute in erlang vs. better customization and median performance for the JVM. I'm sure there's more differences and more nuance than that, but I'd be very happy to use either language/VM in production.
- dnautics 7y agoIt's also harder to write abjectly wrong code in the BEAM. I found out that my code was effectively self-forkbombing, because I had hooked up an error reporter (I adapted myself because the version I wanted had bitrotted) to rollbar which (very rarely, when the service was in outage) cause a crash, which would try to report, crash, and exponentially grow. Amazingly, this caused no service degradation for our customers.
- jrobn 7y agoI always feel like Erlang and more generally BEAM is the language for a lot of today’s problems but will never see any kind of traction because of “worse is better”.