Live data from Hacker News

Elixir saves Pinterest $2M a year in server costs

paraxial.io

451–460 of 481 posts

Re: Elixir saves Pinterest $2M a year in server costs

#451

Earlier quoted context omitted.

You can do that easily in modern Java--even for older JVMs, tools like Netty and later Vertx have been around forever. Or in Node, even more easily. Elixir/BEAM do have some benefits that are worth considering for many projects. But they absolutely are not special in this regard, and that's the junior-developer trap about which the person to whom you replied was referring.

I'm a seasoned Java and Node developer, but have never touched Elixir/Erlang. Could you spell out for me the benefits Elixir provides over Java concurrent code? Is it actually a performance gain, or simply a nicer syntax? I am a bit confused by the claims of this post and of the earlier comment. Thanks a lot

I recently saw a talk on Youtube about "structured concurrency" in Java. It looked pretty interesting. But it seemed to me the way to achieve parallelism is by starting on a procedural code flow and as you come to a part that can be parallelised, you split into a bunch of tasks in a scope and that scope will monitor how those are executed. Once the results are accumulated, we go back into the procedural flow. This is similar to what is done in go IMO and is a pretty good technique.

In Elixir, on the other hand, you could create a module which is like a server process. You can start this server in a procedural flow, or you can "connect" it to a supervisor by giving it the startup information needed and a strategy to be used on how to restart the process in case it crashes for some reason.

A client process (or processes) with it's own module can then send messages to the server which will handle the incoming messages in its inbox sequentially. If you squint at it from an angle, modules look like classes in that they provide a way to separate code logically.

This way of doing concurrency takes getting used to and has a higher initial learning investment. But it feels cleaner and is less prone to user errors. In go for example you have to be careful of closures and shadowing which will result in shared memory and hard to debug errors, even though the initial investment in learning Go is much lesser.

Re: Elixir saves Pinterest $2M a year in server costs

#452
post #64

Earlier quoted context omitted.

> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…

The advantages of Elixir are not performance-related. There is a lot of focus on raw performance on web-related services, when in reality most of their running time is spent waiting for IO. If there are two things the BEAM excels at, is IO and turning almost any problem into half a dozen processes that are scheduled and run in parallel, if not geographically-distributed, with 1/50th the effort of any other language.…

Doing concurrency in Elixir is only easier once you get your ass kicked doing concurrency in other setups.

Re: Elixir saves Pinterest $2M a year in server costs

#453

Earlier quoted context omitted.

Both of you are afflicted by that logical fallacy of failing to understand that you not encountering a phenomenon does not mean it does not happen or is rare, it just means you didn't encounter it. If you try telling people that did encounter that phenomenon that in practice they wouldn't/didn't then you shouldn't be surprised if they question why they started talking to you in the first place.

Yeah but when you don't have any evidence and just accuse him baselessly as you have been... well...

Do you genuinely fail to see how your behaviour proves my point?

You cannot just hound people with demands because you don’t like what they are saying.

Re: Elixir saves Pinterest $2M a year in server costs

#454

Earlier quoted context omitted.

> Biased. And not arguing in good faith. :(

You are leaving the prior part of his sentence out. Regardless, Before he said that you weren't willing to answer either.

You are both gaslighting.

As I plainly explained, right at the top, it is not theoretical. There is no point engaging people with evidence if they are so dismissive of basic facts.

But then that is also true here. Your claims about him not saying what he plainly did are just bizarre.

Re: Elixir saves Pinterest $2M a year in server costs

#455
post #434
post #151

Earlier quoted context omitted.

> ... with 1/50th the effort of any other language. To junior developers reading this, such statements are never true.

To all junior developers--this developer doesn't know what he is talking about. Erlang and BEAM, the things underlying Elixir, were specifically engineered to be used in a reliable, distributed fashion including a gigantic amount of idioms and support that no other language comes close to. Erlang's bit syntax is hands down the best byte stream serialization that still exists--both from a perspective of performance as…

[dead]

Re: Elixir saves Pinterest $2M a year in server costs

#456
post #407

Earlier quoted context omitted.

> You should come to terms with the fact that some people just don't like python. Nobody cares about that - it’s a given that any language will have fans and detractors and most of us are mature enough to focus on what works for the projects and teams we’re part of. What we’re objecting to is portraying your experience as a global truth. If you don’t like it, sure, but unverifiable hyperbole isn’t contributing anythi…

What I am objecting to is you asserting my experience didn't happen.

You’re the only one doing that. Nobody here has questioned that you had an unpleasant project to work on - we’re only arguing that it’s not representative of the experience now (your initial hyperbole) or even 15 years ago when the 2.3-2.5 transition would have happened. Many of us have worked on larger codebases in that timeframe with very different experiences.

Re: Elixir saves Pinterest $2M a year in server costs

#457
post #406

Earlier quoted context omitted.

That’s three years, not months, and consider that it’s possible that how we develop software as a field might have matured over multiple decades. The edge case you’re referring two didn’t even affect most packages in the 2000s so it’s quite a stretch to say that something which happened in 2006 embodies how Python is developed now.

Don't take this the wrong way, but I don't really care about how your 2.3 apps were or were not affected. It's not my job to maintain them. The apps I cared about were the apps I had to mantain. And it turns out that if you have tens of thousands of lines of python, you eventually hit a problem that needs to be fixed. So sure... if you have a 200 line program, maybe you won't hit any code whose semantics have changed…

So say “when I worked on a Python project many years, we had a lot of problems with one release” – people might find it weird that you’re bringing up old history but nobody is going to doubt that you personally had an unpleasant experience. It’s okay not to like Python!

What’s getting criticism are these huge sweeping claims like “you rewrite your code every three months” or “syntax and semantics of the language change in non-reverse-compatible ways between every minor release” which you have been completely unable to support or the attempts to dismiss anyone else’s different experiences as somehow less valid.

Re: Elixir saves Pinterest $2M a year in server costs

#458

Earlier quoted context omitted.

The guy you are responding to was completely calm and reasonable. Didn't say anything attacking or otherwise. I'm not sure why you are seemingly trying to cast him (and the Beam) in such a bad light, with seemingly no reason to back it up.

Calling someone “biased” and “acting in bad faith” is a personal attack and violates this site’s rules. People get rate limited for far less on this site.

I'd argue taking things out of context and deliberately painting the commenter in a bad light is not a nice forum discourse.

I said, very plainly and visibly, that my parent commenter's unwillingness to back up negative claims COMES ACROSS as biased and ARGUING (NOT "acting") in bad faith.

Come on now, this stuff is not hard, the message is literally up there. Not sure why you had to editorialize it and thus misconstrue it?

Re: Elixir saves Pinterest $2M a year in server costs

#459

Earlier quoted context omitted.

Yeah but when you don't have any evidence and just accuse him baselessly as you have been... well...

Do you genuinely fail to see how your behaviour proves my point? You cannot just hound people with demands because you don’t like what they are saying.

> Do you genuinely fail to see how your behaviour proves my point?

I genuinely see only one thing: I asked you to elaborate but you are convinced that I am pretending to discuss while I, again genuinely, actually did want to discuss.

You asserting something about me, a person whose mind you cannot read is confusing and quite aggressive, in a very uncalled-for manner too. But as I said already -- have it your way, I disengaged because it became apparent you are not interested in discussing. OK. It's your right.

What's not OK is you claiming that I am not interested in discussing however, and I maintain that I was interested in discussing.

> You cannot just hound people with demands because you don’t like what they are saying.

1. I am not "hounding" you for anything, I asked a question.

2. You are again assuming my motivation and I assert that you have gotten it wrong. You that I "disliked what you said" is a borderline personal attack and an off-topic. I was confused why you claimed what you did and wanted you to elaborate, to find out what made you think like that and if I can change your mind with a few anecdotes and some facts (that are hard to look up because they require scanning a forum; yet they are there and are visible to everyone who engages with the platform).

BTW, if you really have known anything at all about the Elixir ecosystem you would know that its creator, to this day, engages with users on ElixirForum and asks for their feedback on what they find lacking. That sort of engagement and genuine discussion spirit that you claim I (as a part of the Elixir community) don't have.

That alone invalidates your point entirely.

I am disengaging second and final time, let future readers decide for themselves.

Re: Elixir saves Pinterest $2M a year in server costs

#460
post #361

Earlier quoted context omitted.

I would say that a person claiming that it provides better results with 1/50 the effort is a claim that needs substantiation and was born from a position of hype, yes.

And why is that so hard to believe for you? Do you think all technology is equal?

And that's why I am gonna drop HN one day, I get the gray treatment for asking questions and for people to clarify nebulous claims.
Post reply on HN