7 ms·
Wow, it's a bit surprising that they use C# under the hood. I wonder what was the cause for that decision; back when I started learning Java, C# was said to be
by BossingAround 6y ago
Wow, it's a bit surprising that they use C# under the hood. I wonder what was the cause for that decision; back when I started learning Java, C# was said to be the slower of the two.
Honestly, I never wanted to get into C# as much because typically, it also means getting into Windows (from personal experience, companies using C# are heavily invested in Windows, and I love using Linux for everything).
Do companies nowadays develop and deploy C# on Linux boxes?
Edit: Just a reaction to a number of responses, I know C# is now fully open source. That doesn't mean companies using C# develop using Linux and deploy on Linux. C# being open source means very little to me when all deployments are on a proprietary platform.
- easton 6y agoI think the major driver for it was that Joel Spolsky worked at Microsoft for a long time (among other things, he was a PM for Excel), and therefore knew the MS stack the best. For a long time, Stack Exchange ran on IIS + SQL Server, I don't know if that's true anymore.
- BossingAround 6y agoAh! That makes perfect sense. Interesting, thanks for the comment.
- randompwd 6y agoNot the case. Spolshy was not a coder. https://meta.stackexchange.com/a/122854 https://meta.stackexchange.com/a/122854 > The main reason, it was the development stack Jeff, Jarrod and Geoff knew best when they embarked on the mission. Jeff Atwood comments on linked answer also.
- GordonS 6y agoC# dev here, mainly working in enterprise size companies who are Microsoft shops. We usually deploy on Windows for on-prem services, and on Linux for cloud services (some on VMs, some on containers, some serverless). I'm more of a Windows guy for desktop, but always prefer Linux for server. Nowadays dotnet is a first class citizen on Linux and MacOS, through dotnet core. On performance, there has been a big focus on perf by the dotnet team over the past years - I'd be shocked if Java could beat dotnet on just about any metric. If you know what you're doing you can write allocation-free code, and you even have hardware intrinsics at your disposal - I recently ported a hashing algorithm to C# and got the performance pretty close to parity with native C code (almost memory speed). C# doesn't get much love on HN, but IMO it's a truely fantastic language.
- cheerlessbog 6y agoTheir recent blog post gives a flavor of some of the performance work in the platform: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/ https://devblogs.microsoft.com/dotnet/performance-improvemen...
- jeswin 6y ago> We usually deploy on Windows for on-prem services, and on Linux for cloud services. Which makes a lot of sense. AWS Windows machines cost ~50% more compared to Linux boxes. I was quite surprised at Windows pricing actually; that made it an easy decision to make given that .Net core has been stable on Linux for a while now.
- GordonS 6y agoI work with Azure a lot more than I do AWS, but even on Azure Windows VMs cost a lot more than Linux ones - typically around 75% more for smaller VMs, and 40% for larger ones, which means you can easily end up paying thousands each year on Windows licenses. Honestly, their high pricing of Windows VMs is insane - it's like they don't even want you to use them!
- giulianob 6y agoC# has gone completely open source and cross platform. .NET core was essentially a huge modernization of the entire runtime and ecosystem. It's becoming one of the most performant managed languages according to Techempower benchmarks. You can also see just how much it's improving in some areas and the level of detail they're paying to it: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/ https://devblogs.microsoft.com/dotnet/performance-improvemen...
- belltaco 6y ago>back when I started learning Java, C# was said to be the slower of the two. Which year was that? Java apps and the JVM in my opinion and experience are very bloated and have a lot of memory consumption and leaks, which cause frequent and annoying GC slowdowns. I shudder to run large Java apps on company servers like the Atlassian stack(Jira, Confluence etc.) and Tableau Server.
- oxfordmale 6y agoThere is a special circle of hell for the Atlassian stack. It is a classical example of legacy bloat.
- UglyToad 6y agoYes, though being an enterprise friendly language there's a bit of a lead time in most of the places using it, but NET core on Linux is increasing adoption. Just this week I built and deployed a new C#. NET core API running on a Microsoft provided Ubuntu docker image and it's now ticking along nicely in production. I still develop on Windows because Visual Studio is for my money the best development environment available but I almost never write new code to run on Windows, with core at publish time its as simple as a command line flag to target Linux. If you don't want to use Windows for development then other OSes are just as viable for developing on, I developed my personal blog on Linux. It's a shame that people (perhaps understandably) have this image of C# as a legacy environment when it's a language and environment that is constantly innovating and has been sitting around the top of some server benchmarks for quite a while.
- rockwotj 6y agoLast I heard hudl.com runs on C# and linux using Mono.
- alkonaut 6y ago> C# was said to be the slower of the two. I don't think that was ever the case, (Java VM's always had some clever optimizations in due to being more mature, but if you used C# properly and used its value types effectively, you could beat idiomatic Java hands down, and the Java that ran equally fast was often bastardized C-looking java that didn't use proper types but arrays. Basically High perf java only supports AoS, only SoA, which may or may not be convenient). For a lot of workloads obviously the difference is minuscule, especially if a database or web server is involved (in this case, both).
- p_l 6y agoLong long ago, they mentioned how it allowed them to use way less hardware - to quote, "MS licenses paid for itself in hw running costs". Features like AOT compilation, or the fact that SQL Server is really powerful database engine that they already knew - in fact, they knew windows platform very well, and do things like putting some critical paths directly using HTTP.SYS kernel driver webserver (IIS uses it as well, but build extra functionality on top) Compare it with popular open source web stacks of the time - Python, Ruby, PHP, all with no real compilation support, slow or otherwise problematic (PHP's emulation of CGI environment, for example). But ultimately - they knew their tools well, and applied that knowledge to very good results :)