Hacker News new | ask | show | jobs
by mil22 56 days ago
The original Orkut site was written in C# - it was very slow and couldn't handle the growth. Orkut was only a big success in countries like Brazil and India where internet connections were already so poor that nobody noticed how slow the site was.
2 comments

> The original Orkut site was written in C# - it was very slow and couldn't handle the growth.

These are orthogonal facts presented as if they were related.

Not entirely orthogonal. Orkut's original C#/ASP.NET/SQL Server stack was an awkward fit for Google's predominantly Linux-based infrastructure, which made scaling and operating it more difficult. Almost all of Google's other web services were written in tight, optimized C++. David Jeske, Orkut's former technical architect, described problems with the .NET runtime, difficulties integrating with Google's infrastructure, and an eventual migration to Java and C++.

That doesn't mean C#'s execution speed was the primary bottleneck. In fact, Jeske's team reportedly made dramatic performance improvements while retaining .NET. But arguing that the choice of technology had no relationship to Orkut's scalability problems is just as misleading as blaming everything on C#.

The statement just mentions C#. Java is amazing and fast in capable hands, but so is C#. Of course you can have problems with a stack, but that's nothing to do with the stack in this case, but rather a skill problem associated with that stack.

If my current employer started having new software written in C instead of Java today, and while C has many problems, the problems we'd have would be all self-inflicted skill issues, not a direct problem with C.

And facebook was written in frikkin PHP. That means it was not C# that made it slow, probably just bad programming.
PHP did make it slow. They eventually wrote a tool to transpile PHP to C and then compile down to native.
Sure, PHP was obviously a very poor choice as an main language. Facebook still today suffers (i know people at facebook), and even pured in millions for HHVM and Hacklang.

If they had opted for C# they could probably have been able to run it as-is today.

Facebook is actually a good counterexample to the claim that language choice doesn't matter. PHP's execution overhead was significant enough that Facebook developed HipHop, a PHP-to-C++ compiler, which reduced their average CPU consumption by around 50%. They subsequently developed HHVM and Hack to address further performance and maintainability issues.

That doesn't mean PHP prevented Facebook from scaling, just as C# didn't inherently prevent Orkut from scaling. But being able to scale an application and being able to scale it efficiently are different things. You can compensate for language and runtime inefficiencies with more hardware and better architecture, but that doesn't make those inefficiencies irrelevant.

C# would arguably have given Facebook a better starting point in terms of execution performance and static typing than PHP, but claiming they could have run the original application unchanged today is a bit of a stretch. Facebook's architecture, infrastructure and requirements have evolved enormously, regardless of language.

Obviously. But a sane languge could/would just require better design and performance tuning. Not reinvent a new languge kind of change. At scale you need to design carefully no matter if its Java, C or Rust. But you mostly can keep the languge and not write you own.