Live data from Hacker News

How And Why We Switched from Erlang to Python (2011)

engineering.mixpanel.com

51–60 of 150 posts

Re: How And Why We Switched from Erlang to Python (2011)

#51
post #49

Previous HN discussion: https://news.ycombinator.com/item?id=2852415

The top comment is especially relevant: "This is more about the technical competency of a specific company than general technical issues. Or, to put it bluntly, it's more "Mixpanel sucks at Erlang" than "Erlang sucks". Don't get me wrong, I'd be really, really interested in a good analysis why in this case Erlang was the wrong choice, but this article didn't even get close to anything technically interesting"

Re: How And Why We Switched from Erlang to Python (2011)

#52
post #46

Earlier quoted context omitted.

I think Facebook chat had a very similar experience. The first version was written by someone who liked Erlang. Later on, when some performance issues came up (probably related to GC), no one knew Erlang, and all the high performance backend code in the company was in C++. So it made sense to rewrite the thing.

Then they acquired whatsapp that was written in Erlang.

And I think I had read that Whatsapp used Erlang because Facebook Chat was using Erlang and they thought Facebook knew what they were doing and decided to use the same tech. What a twist

Re: How And Why We Switched from Erlang to Python (2011)

#53
In our team we have two enthusiasts who propagate ReasonML for front-end development. Personally I like many its features (for instance, pattern-matching) that JS/TS is missing. There are a lot of talks about it in React community. We even tried it in some small projects and seems like we could start to use it wider. But situations like this described in the article make us concerned. We are following developments in ReasonML community, but for the moment we don't dare to start adopting it.

Re: How And Why We Switched from Erlang to Python (2011)

#54

I was an intern at Mixpanel at the time (but not the author of this article or involved in the discussed rewrite). For context, the company was then My recollection of events (of 8 years ago): The Erlang endpoint was written a year or two earlier as someone's first Erlang project, in a tiny org with no Erlang experience. The endpoint worked well enough and people moved onto other projects in the mostly Python codebas…

In general language diversity at a company is a big negative. Obviously sometimes there are even bigger negatives that mandate overriding that rule--you aren't going to use Java on the front end or javascript on the backend, that would be madness--but you never want two languages in the same niche. That's a cost with no benefit.

If you have some developer that wants to write something in a new (for your company) language, or even worse goes off and does so without asking, because he wants to try it out, you probably want to fire that guy. Either he doesn't understand the downsides or he does, but doesn't care.

Re: How And Why We Switched from Erlang to Python (2011)

#55
post #35

I was an intern at Mixpanel at the time (but not the author of this article or involved in the discussed rewrite). For context, the company was then My recollection of events (of 8 years ago): The Erlang endpoint was written a year or two earlier as someone's first Erlang project, in a tiny org with no Erlang experience. The endpoint worked well enough and people moved onto other projects in the mostly Python codebas…

Is it common for an intern to get such an impactful project?

Probably. That's why you will see an article next year detailing why they moved from Python to nodeJS.

Re: How And Why We Switched from Erlang to Python (2011)

#57
post #38
post #35

Earlier quoted context omitted.

Is it common for an intern to get such an impactful project?

Yeah; it’s actually pretty easy work. Interns have a lot of uncommitted time, and they’re going to leave soon so you don’t want to integrate them into the team too much. It’s also way easier to build to a well-defined spec (which an in-production endpoint would likely have). So you let them rewrite something that already works. If what they build is good, you‘ve just knocked out a good chunk of technical debt and fou…

The question isn't whether or not the work is easy for the intern, it's whether or not it's appropriate. And this cuts both ways: a company that is doing serious core refactoring/redevelopment on the back of an underpaid "intern" is probably exploiting that labor in an unfair way. If it's in fact an unpaid internship, then they're straight up in violation of the Fair Labor Standards Act.

And, of course, a company that puts this kind of work on the back of a temporary worker is not treating its own codebase with the respect it deserves. This is rolling the dice with your expertise store -- you have to hope they did it well, because they aren't going to be around to answer questions if they didn't.

Re: How And Why We Switched from Erlang to Python (2011)

#58
post #46

Earlier quoted context omitted.

Then they acquired whatsapp that was written in Erlang.

And I think I had read that Whatsapp used Erlang because Facebook Chat was using Erlang and they thought Facebook knew what they were doing and decided to use the same tech. What a twist

Where did you read that? I believe Whatsapp used erlang because they leveraged ejabberd [0] for XMPP. Wouldn't surprise me if this is why FB originally used Erlang for the chat servers too. [0] https://en.wikipedia.org/wiki/Ejabberd

Re: How And Why We Switched from Erlang to Python (2011)

#59

Earlier quoted context omitted.

> they'd written a monolith instead of building a system where the message delivery was designed to be sharded; n Do some languages handle this differently? Isnt this based on how the code was written rather than a language natively sharding?

Sharding is basically a data storage concern, so it's not something that the language can really control. There are however, frameworks that enforce some level of "shardability". The Datastore (now Firestore) in AppEngine/Firebase comes to mind, in that your data is shared all over the place (the details are hidden from you), and you can't write un-indexed queries that don't scale well. The Datastore has some limitat…

Sharding is not just about data storage. You can shard parallel units of work across multiple CPU cores in order to prevent single CPU bottlenecks.

Erlang encourages shardable solutions from OTP concepts being so strongly integrated into Erlang.

Re: How And Why We Switched from Erlang to Python (2011)

#60
post #17
post #8

Them not being able to utilize Erlang well seems to be the gist of the article. The rest seems like a post-hoc rationalization. It's fair to switch away from a technology your team doesn't know well and doesn't want to learn. Maybe that should have been the title.

Long time, Dimi.. It's a favorite pet peeve of mine too that people often try to rationalize either their lack of experience with a platform or a broken architecture as a problem with the language in question. Though sometimes it's done because it helps paper over internal politics (e.g. lack of clout to be perceived to criticize past decisions) by blaming something external like a language or framework to justify ar…

[deleted]
Post reply on HN