News for hackers. Stuff that matters.
Re:Web Service Efficiency at Instagram with Python by sorenjan on Tuesday June 21, 2016 @04:27PM (#11949138)
If engineering time wasn't an issue, how much would a company of Instagram's scale save by switching from Python to a lower level language like C++? Pretend you could wave a magic wand and overnight have the entire code base transformed from Python to well written C++, how would that affect the hardware requirements, and future development?

I guess what I'm really asking is what pros and cons are there with using dynamic and relatively slow languages compared to faster languages like C++, Java, or C#? My uninformed reaction is that it's easy for startups to get started with these easy languages but that it leads to problems when it's time to scale up. Dropbox is writing their own Python implementation, and Facebook have their PHP to C++ compiler.

Re:Web Service Efficiency at Instagram with Python by Scramblejams on Tuesday June 21, 2016 @05:18PM (#11949482)
It's important to remember that for a lot of network server purposes, your code only has to be fast enough to saturate your network interface, and after that there isn't much point in trying to speed things up.

Not sure how often that's the case in Instagram's use, but I've been using Python and Twisted to saturate network interfaces effectively since 2003 :-), and in those situations I've been more interested in the correctness advantages of a good statically-typed language rather than the performance.

Re:Web Service Efficiency at Instagram with Python by abiox on Tuesday June 21, 2016 @07:23PM (#11950282)
time-to-saturation is also worth considering.
Re:Web Service Efficiency at Instagram with Python by nine_k on Tuesday June 21, 2016 @05:42PM (#11949647)
ะก++ is not exactly a comfortable language. While recent changes may be great, and there are quite nice libraries, the language still does little to prevent you from shooting yourself in the foot (and sometimes downright provokes it).

If I were about high speed, I'd take Java (which regularly rivals, and sometimes surpasses, C++ in speed), or Rust, or maybe Go. Other worthy contenders would be Haskell, OCaml, D, maybe even Elixir (unless they are CPU-heavy), though with these hiring becomes much harder than with Python or Java (and probably even C++).

Re:Web Service Efficiency at Instagram with Python by nemothekid on Tuesday June 21, 2016 @04:32PM (#11949171)
>how much would a company of Instagram's scale switching from Python to a lower level language like C++

I guess one thing you have to consider is

1. How many engineers do you have to hire to make Python "fast enough"

vs

2. What does it cost to deploy a full C++ team? Is it easier for new programmers to learn & write safe C++ code vs. Python.

I wonder what is cheaper?

Re:Web Service Efficiency at Instagram with Python by SEJeff on Wednesday June 22, 2016 @01:00AM (#11951663)

    s/C\+\+/golang/g
Re:Web Service Efficiency at Instagram with Python by kirkdouglas on Tuesday June 21, 2016 @04:33PM (#11949177)
From the users perspective they're doing fine (haven't had any problems with Instagram performance).
Re:Web Service Efficiency at Instagram with Python by sametmax on Wednesday June 22, 2016 @02:22AM (#11951923)
Even when engineering time is not an issue, Python stays. Look at dropbox: they convert a part of they code to rust for performance reasons. Yet they have no plan to replace the whole Python code base, because Python is very convenient to use for no performance critical part of the app that are affected by it's dynamic nature. And they are not that numerous. In the end, it's not just time, it's also a matter of confort and even pleasure.
Re:Web Service Efficiency at Instagram with Python by draw_down on Tuesday June 21, 2016 @05:09PM (#11949429)
Major con: Good luck finding people who want to write a web app in C++.
Re:Web Service Efficiency at Instagram with Python by weberc2 on Tuesday June 21, 2016 @05:11PM (#11949439)
This is probably an extension of the "if developer time wasn't an issue"; at least that's a major factor for me (not being able to develop quickly).
Re:Web Service Efficiency at Instagram with Python by pbreit on Wednesday June 22, 2016 @01:06AM (#11951682)
Developer productivity is crucial to figuring out a business and then in the rare event that you actual get product/market fit, scaling is trivial (ie, no one ever failed to scale, not even Friendster).