6 ms·
And replace it with?
by orf 8y ago
And replace it with?
- CyberDildonics 8y agoReplace it with an SQLite db for OS settings and make programs save their settings in files so they are contained within a single directory.
- orf 8y agoAnd when you realize sqlite is both untyped and completely unsuitable for this (concurrent writes anybody?), then what? Also FYI the registry is stored in a single file.
- nightski 8y agoYea the storage format isn't the problem (MS has its own tech like LocalDB or some variant of SQL server that could be used). The problem has always been that the data is shared system wide, even if it doesn't need to be. That and there is no easy way to clean up the registry if uninstalled programs did not do so properly.
- orf 8y agoI agree, that's more of the issue. But how would you solve it? What is 'uninstalling'? Via what mechanism? Should 'rm -rf program/' clean up the registry? How?
- marcosdumay 8y agoWell, what does Android do? The uninstalling procedure should clean the registry. "Uninstalling" is whatever the OS standardize as the correct procedure, Windows has one already, but it's reminiscent of the way people did packages by the time Linux software was distributed in tgz archives.
- orf 8y agoAndroid is way more tightly controlled, uninstalling an applications scoped data is just removing a directory. In Windows it's up to the app to clean up. It's not as great as *nix, but nobody is saying it was. Apt and friends just do the cleanup for the app, in a standardized way. If they miss something it's still there.
- viraptor 8y ago> The problem has always been that the data is shared system wide, even if it doesn't need to be. If you do have a use case where that matters, you can create a new user and apply permissions you want at a single key level. Available since windows 8 (or maybe before?)
- Kuraj 8y agoIs it though? https://docs.microsoft.com/pl-pl/windows/desktop/SysInfo/registry-hives https://docs.microsoft.com/pl-pl/windows/desktop/SysInfo/reg...
- orf 8y agoOk, so there is a transaction log and one backup file.
- rincebrain 8y agoThat's 7 different files, and the txlog+backup of each.
- orf 8y agoSorry, I thought we where comparing to a sqlite database. Each of those 7 hives is equivalent an individual database.
- deleted 8y ago[deleted]
- MisterTea 8y agoHow about a file system? Because that is precisely what the registry is, a file system in a file. The keys are just paths to a variable which can be a text or binary file. And people who suggest SQL or another monstrous abstractions as an implementation need to take a step back and apply the idea of philosophical simplicity to their work. I honestly don't understand why people have this tendency to over engineer simple problems. I suppose it helps during review time.
- orf 8y agoIt has a few more types than that[1]. While the registry is not exactly super elegant and suffers from issues I think it's a pretty simplistic answer to a complex problem, especially one rooted in history and rife with backwards compatibility concerns (windows still supports the legacy format used only in Windows 2000!). People who sit back and say "replace it with text files/sqlite" don't really understand it or the problem it solves that well. Using the actual file system brings in file system concerns - how do you handle registry transactions or concurrent updates? 1. https://msdn.microsoft.com/en-us/library/windows/desktop/bb773476(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb7...
- AnIdiotOnTheNet 8y agoIt doesn't really matter how many types it has, just give each file an extension indicating the type, like filesystems already do.
- orf 8y agoAnd how would you handle concurrent updates and transactions? The registry is a database. There is a reason we use Postgres instead of flat files, and it is not people overdesigning things for review time. And again, if you think the registry maps 1-1 to the file system you don't understand it. And that's fine. Just don't hate it because of that.
- AnIdiotOnTheNet 8y ago