News for hackers. Stuff that matters.
Re:Practices for writing high-performance Go by jnordwick on Monday May 06, 2019 @12:05PM (#19840665)
"The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt."

– Rob Pike

Re:Practices for writing high-performance Go by shereadsthenews on Monday May 06, 2019 @12:25PM (#19840899)
That is taken out of context. Practically all Google server code is written in C++ or, at a much smaller scale, Java. Go is used for logs analysis, internal services, monitoring and automation, etc. Nobody at Google reaches for Go when they are thinking of high performance nor would anyone try to optimize a large service in Go. They would just write it in C++ instead as soon as it starts to cost non-trivial amounts of money. Remember that Pike wrote Sawzall and Go replaces it, in a similar role.
Re:Practices for writing high-performance Go by Thaxll on Monday May 06, 2019 @01:08PM (#19841449)
High performance is a very vague terms now days, there are company that have Google scale problems that don't use C++ as main language ( Nerflix Uber ect ) any modern runtime can do "high performance" especially for backend applications. YouTube primary language is Python for instance.
Re:Practices for writing high-performance Go by rightbyte on Monday May 06, 2019 @02:38PM (#19842401)
Netflix OK but Uber? They did 4 billions rides in 2017. Thats naivly about 130 rides per second with nice parallelism due to locality of the physical rider. That's not an insane amount of data crunching.
Re:Practices for writing high-performance Go by Thaxll on Monday May 06, 2019 @03:31PM (#19842903)
You could say the same for Netflix, it's a giant CDN so why do they need 150k ec2 instances?

The problem they solve looks simple on the outside, the reality is different.

https://eng.uber.com/managing-data-workflows-at-scale/

Re:Practices for writing high-performance Go by devonkim on Monday May 06, 2019 @11:21PM (#19846195)
In my experience, most non-trivial sites are similar to icebergs of code - users might see 5% of the codepath in normal usage for what they want, but there's boatloads of OLAP, data analysis, instrumentation, error handling, and reporting being done on those transactions to help make that 5% both more profitable and reliable.
Re:Practices for writing high-performance Go by weberc2 on Tuesday May 07, 2019 @09:40AM (#19849181)
It’s not just rides, but also matching drivers with riders, geofence lookups, etc. it’s not a CRUD app.
Re:Practices for writing high-performance Go by skybrian on Monday May 06, 2019 @12:59PM (#19841329)
Hmm, that seems a bit exaggerated. I seem to recall someone on the Go team describing the rewrite of a server that was originally in C++ and became much faster. (Largely because it started out at a heap of legacy code that was neglected for years.)

That's probably pretty unusual, but the point is, just because it was written in C++ doesn't mean it's any good. Not everything gets serious attention from people who know what they're doing.

Re:Practices for writing high-performance Go by shereadsthenews on Monday May 06, 2019 @01:07PM (#19841439)
You are thinking of dl.google.com. It was a Go program that replaced a very old single-threaded C++ server (using the ancient SelectServer C++ core, deprecated at that time). The thing you have to realize about Google infrastructure is it does not require vertical scalability of its service backends. It is very typical to write a program and deploy it with 100 replicas having one CPU each on 100 different machines. A variety of load balancers (all written in C++, naturally) papers over the complexity. Nobody at Google expects a Go program to occupy an entire machine because Borg packs hundreds of services onto a single machine. The question is for _you_ do _you_ have Borg or another workload coordinator that allows you to do this? Or do you have "the database machine" and "the server" where you expect individual processes to scale up to many cores?

BTW the reason dl.google.com rewrite was faster was not because it was in Go, it was because the C++ server was serving off its local disk and the rewrite was serving off a cluster file system with ~infinite I/O capabilities. Apples and oranges.

Re:Practices for writing high-performance Go by puzzle on Monday May 06, 2019 @01:25PM (#19841666)
It was even crazier: when the original download server was written, local disk was faster, mainly because the network wasn't too fast (rack locality was a concern, way back when), but also because GFS chunk servers weren't, either. At the time of the rewrite, Firehose and co. were being deployed everywhere, D did a better job at serving bytes and, later, local disk use was placed in a lower QOS level. Unless you were one of the few teams that had a good rationale for dedicated machines, if you fought for I/O time on a given disk against D, invariably you lost.
Re:Practices for writing high-performance Go by tmerr on Monday May 06, 2019 @08:42PM (#19845384)
Apples and oranges, though still an important lesson: many optimizations happen at the level of interactions between services. C++ is more micro-optimizable than Go, but it doesn't matter when the low hanging fruit has nothing to do with language (and I would argue this is more often than not).
Re:Practices for writing high-performance Go by pjmlp on Tuesday May 07, 2019 @02:40AM (#19847126)
It is not out of context, it was stated just like that on a talk given by Rob Pike at Microsoft, it is available on Channel 9.
Re:Practices for writing high-performance Go by wbl on Monday May 06, 2019 @12:14PM (#19840767)
For a company with supposedly high hiring standards. Granted domain knowledge also matters but that isn't what the people described have. So what does Google teach them?
Re:Practices for writing high-performance Go by erik_seaberg on Monday May 06, 2019 @02:09PM (#19842103)
Everyone I met there had my respect. I find "not capable of understanding a brilliant language" to be baseless contempt and I'm surprised he didn't get more heat over it. I wouldn't work with him, nor whatever people he's trying in vain to accommodate.
Re:Practices for writing high-performance Go by IOT_Apprentice on Monday May 06, 2019 @05:49PM (#19844271)
Yikes I think he is arguing against overwhelming programmers with complexity and the ability to hammer themselves with pointers, leaks and other banes of existence for average C programmers.
Re:Practices for writing high-performance Go by tensor on Monday May 06, 2019 @03:30PM (#19842886)
That's really quite ironic given: https://news.ycombinator.com/item?id=19825787
Re:Practices for writing high-performance Go by erik_seaberg on Monday May 06, 2019 @09:53PM (#19845727)
I should have worded that more gently. The greatest programmers in the world have demonstrated that even they can't use C reliably.