5 ms·
"There is a core architectural difference between Unix and Windows. Linux is a file-oriented OS and Windows is an API-oriented OS... The interesting thing is th
by ziggus 5y ago
"There is a core architectural difference between Unix and Windows. Linux is a file-oriented OS and Windows is an API-oriented OS... The interesting thing is that the Windows approach is winning in the world and that makes PowerShell the best tool to the modern world. That sounds controversial but it is clearly true - most of the world is moving towards REST APIs returning structured objects (JSON documents)."
I'm not sure if the web could have worked any other way. RPC over HTTP and other message/pub-sub web technologies are largely used by enterprise-level applications, and not by modern web sites, correct?
- ubercore 5y agoI feel like it could be as easily argued that this approach is out of place on a local OS? Like, he's not totally wrong in a lot of ways, but that conclusion doesn't seem obvious to me.
- bogwog 5y agoI've noticed that some Microsoft employee blogs sound like this brainwashed corporate propaganda. I wonder if that type of ass-kissing is a prerequisite for promotions, or if the environment just tends to turn people? Here's another example where it's discussing a weakness of MSVC, and every other sentence is just passive aggressively blaming the world for Microsoft's problems: https://devblogs.microsoft.com/oldnewthing/20190830-00/?p=102823 https://devblogs.microsoft.com/oldnewthing/20190830-00/?p=10...
- lukas099 5y ago> every other sentence is just passive aggressively blaming the world for Microsoft's problems His book, The Old New Thing, is like that throughout.
- tyingq 5y agoSOAP tried :)
- indymike 5y ago> That sounds controversial but it is clearly true - most of the world is moving towards REST APIs returning structured objects (JSON documents). Yes, but most RESTful apis are backed by an OS that is file oriented. Why? because the server deals with persistence while the API deals with compute. The Windows approach is not winning, hosting APIs on the file oriented OS works better for most. Why? because ultimately APIs are a compute problem not a persistence/storage problem. That said, for interacting with a RESTful api, what tool do you use? A programming language like JavaScript, C#, Python, or Java or a shell scripting language like bash, zsh, or PowerShell?
- JasonFruit 5y agoCompute is a verb. I will die on this hill.
- emteycz 5y agoIt can be both. Many words are both (or even more than these 2).
- Someone1234 5y ago> Yes, but most RESTful apis are backed by an OS that is file oriented. No? Most RESTful APIs are backed by databases. There's are a lot of variance there (Sql, NoSql, Cloudy Vs. Monothithic) but it isn't files. Even for file storage and delivery databases BLOB storage are often used rather than filesystem files. When all you're using a filesystem for is storing a large continuous memory-mapped blob so that you can avoid interacting with the filesystem's APIs almost entirely, you aren't exactly championing a filesystem's utility in the internet age. I'd go as far as to say that directly exposing filesystem files to the outside world is an anti-pattern (because it doesn't scale).
- ubercore 5y agoIn the context of a file-based vs api-based shell scripting language, I think the point stands though. That's the main problem with the original statement, I think.
- hnlmorg 5y agoHe's making a sales pitch rather than a factual statement. Linux is file-orientated but it is also API-orientated too. You cannot make syscalls via file descriptors, nor call shared objects via a fd. And most REST APIs in the world are running on top of Linux anyway. I also think it is disingenuous to talk about HTTP APIs when talking about shell scripting as if it's something that needs to be built into the fabric of the shells design when HTTP APIs can be an abstraction that bolts on top. In fact that's exactly how a lot of CLI tools work (awscli, Terraform, even Powershell scripts will make those API calls in composed functions rather than natively from shell).
- kaba0 5y agoBut even on a syscall level, Linux calls are way more barebones with not too user-friendly struct passings, etc. And due to their obsession with C, it is the same way in user space as well.
- hnlmorg 5y agoThere is more 20 years of lessons learned between UNIX and NT though. Yeah Linux is a distinct OS but it was written to be a UNIX-clone whereas NT was designed to be a new OS from the ground up. However if you look at NT's spiritual godfather, VMS, that primarily written in C as well. Plus C++ doesn't magically fix the complaints you're making anyway. It's also worth noting that Linux does have plenty of services that support RPCs too (X11, dbus, etc). I'm not try to argue that Linux and Windows are equivalent though. Just that it's a little silly to argue that Linux can't do APIs.
- blibble 5y agoI don't think I've ever come across a Windows API that was pleasant to use CreateProcess is probably my favourite example NT didn't inherit the problems of fork() with unix, but it's still a disaster of giant nested structures, combined with several different ways of creating lists of parameters (some params need quoting in weird ways, others need manual construction of arrays of null terminated strings) whereas the POSIX APIs tend to be small, clean and simple
- chubot 5y agoYeah this is puzzling. REST is much closer to Unix than Windows. "Uniform interface constraint" basically means using very few verbs (GET, POST) on nouns or "files". This is in contrast to a more highly typed RPC style. https://stackoverflow.com/questions/25172600/rest-what-exactly-is-meant-by-uniform-interface https://stackoverflow.com/questions/25172600/rest-what-exact... I'd go even further than that and say the web is a straightforward extension of Unix (basically adding URLs, which are amazing, and data driven UI) ... And I'll go even further and say that the Unix-y design CAUSED the success of the web, and if it were more like Windows, it wouldn't have scaled to be truly "world wide" !